Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58324

HTML report do not show from Jenkins page (html error 404 on page js file)

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: htmlpublisher-plugin
    • Environment:
      Jenkins 2.165 (master)
      HTML Publisher plugin 1.18

      Win10 64bit (slave)
      IBM Rational Performance Tester 9.5

      Chrome 64 and MS IE11
    • Similar Issues:

      Description

      We have problem when viewing created and published http performance tests reports: its not working when served from Jenkins web server.
      ... "plugin is using the "Page Title" field as the base path for putting in the report's index.html and the file is not present there"

      In dev tools (Chrome) when loading page we see:  "HTTP ERROR 404" on several files.

      But physically files are there.

      • So, if we want to open published report directly e.g. from Jenkins as web page then http report won’t show (we see only blank page with title na link on zip)
      • but if then http report is downloaded locally (zip) and index.html runs from folder: then it works (show report normally).

      HTML report should be visible directly from/on jenkins page.
      Can you please help.
      Thank you.
      A:

        Attachments

          Activity

          Hide
          r2b2_nz Richard Bywater added a comment -

          Hi Ante Kevrić - are you able to confirm what the "file structure" image is supposed to be showing (i.e. the contents of the ZIP file or the build directory on the Jenkins server as the files showing as 404 in the browser console view don't appear in the "file structure" image. Also sharing your config would be useful for replication purposes. Thanks

          Show
          r2b2_nz Richard Bywater added a comment - Hi Ante Kevrić - are you able to confirm what the "file structure" image is supposed to be showing (i.e. the contents of the ZIP file or the build directory on the Jenkins server as the files showing as 404 in the browser console view don't appear in the "file structure" image. Also sharing your config would be useful for replication purposes. Thanks
          Hide
          anteid Ante Kevrić added a comment -

          Hi Richard Bywater - That structure is from downloaded ZIP.

          I added here zip file "Jenkins issue.zip" so you can see configuration, console output, and report.

          thx,

          A.

          Show
          anteid Ante Kevrić added a comment - Hi  Richard Bywater  - That structure is from downloaded ZIP. I added here zip file "Jenkins issue.zip" so you can see configuration, console output, and report. thx, A.
          Hide
          r2b2_nz Richard Bywater added a comment -

          Thanks - just taking a look at the attached console log it appears that the HTML directory in the config was set to "D:\jenkins_prod\workspace\test_9111\Schedules\test95_2_vise_usera\test95_2_vise_usera.stats.html" which looks more like a filename than a directory where the files are getting put. Is that just a case of the wrong config being attached to the issue? (Don't know much about RPT but by the looks of the console logs probably should be set to "D:\jenkins_prod\workspace\test_9111\Schedules\test95_2_vise_usera\"  and perhaps Index Page set to "test95_2_vise_usera.stats.html"?

          Show
          r2b2_nz Richard Bywater added a comment - Thanks - just taking a look at the attached console log it appears that the HTML directory in the config was set to "D:\jenkins_prod\workspace\test_9111\Schedules\test95_2_vise_usera\test95_2_vise_usera.stats.html" which looks more like a filename than a directory where the files are getting put. Is that just a case of the wrong config being attached to the issue? (Don't know much about RPT but by the looks of the console logs probably should be set to "D:\jenkins_prod\workspace\test_9111\Schedules\test95_2_vise_usera\"  and perhaps Index Page set to "test95_2_vise_usera.stats.html"?
          Hide
          anteid Ante Kevrić added a comment -

          "D:\jenkins_prod\workspace\test_9111\Schedules\test95_2_vise_usera\test95_2_vise_usera.stats.html" is valid folder. In it are all files (see .zip).

          Show
          anteid Ante Kevrić added a comment - "D:\jenkins_prod\workspace\test_9111\Schedules\test95_2_vise_usera\test95_2_vise_usera.stats.html" is valid folder. In it are all files (see .zip).
          Hide
          r2b2_nz Richard Bywater added a comment -

          Hi Ante Kevrić - sorry for the delay but I think I have found the issue is not with the HTML Publisher plugin but with the Javascript that is included with the RPT output.

          Basically it looks like when the page loads, it looks to see if the page is being served up using the file:// type protocol (which it would be when looking at locally from the zip) or if "force offline" is enabled (I have no idea how that gets set as it seems to the a RPT Javascript thing). If one of these conditions is true, it goes into some kind of offline mode and works with no issues.

          If those conditions aren't met however, it attempts to fetch stuff from "/analytics" and when that fails it appears to stop processing and just give you a blank screen. Obviously it will never be able to get the "/analytics" endpoint on Jenkins.

          Only thing I can think of is to find out, if you don't know already, how to force the offline mode to be set and then it will work perfectly. (I tested by taking the ZIP file contents and publishing that to HTML Publisher, and then manually debugging the Javascript and forcing offline and it showed with no issues within Jenkins).

          Going to close this issue for now but please feel free to comment if new information comes to hand.

          Show
          r2b2_nz Richard Bywater added a comment - Hi Ante Kevrić - sorry for the delay but I think I have found the issue is not with the HTML Publisher plugin but with the Javascript that is included with the RPT output. Basically it looks like when the page loads, it looks to see if the page is being served up using the file:// type protocol (which it would be when looking at locally from the zip) or if "force offline" is enabled (I have no idea how that gets set as it seems to the a RPT Javascript thing). If one of these conditions is true, it goes into some kind of offline mode and works with no issues. If those conditions aren't met however, it attempts to fetch stuff from "/analytics" and when that fails it appears to stop processing and just give you a blank screen. Obviously it will never be able to get the "/analytics" endpoint on Jenkins. Only thing I can think of is to find out, if you don't know already, how to force the offline mode to be set and then it will work perfectly. (I tested by taking the ZIP file contents and publishing that to HTML Publisher, and then manually debugging the Javascript and forcing offline and it showed with no issues within Jenkins). Going to close this issue for now but please feel free to comment if new information comes to hand.
          Hide
          anteid Ante Kevrić added a comment -

          Thank you, Richard Bywater

          I don't know how to force the offline mode, if you can please write here how you set up that forcing offline mode.

          br, and again thank you  for your help,

          A:

           

          Show
          anteid Ante Kevrić added a comment - Thank you,  Richard Bywater .  I don't know how to force the offline mode, if you can please write here how you set up that forcing offline mode. br, and again thank you  for your help, A:  
          Hide
          anteid Ante Kevrić added a comment -

          Update to this thread and Richard Bywater . 

          IBM has provided solution patch: TP_57096_HotFix_1.0.0

          Thank you, and best regards,

          Ante.

           

           

           

           

          Show
          anteid Ante Kevrić added a comment - Update to this thread and  Richard Bywater  .  IBM has provided solution patch: TP_57096_HotFix_1.0.0 Thank you, and best regards, Ante.        

            People

            • Assignee:
              r2b2_nz Richard Bywater
              Reporter:
              anteid Ante Kevrić
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: