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)

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • htmlpublisher-plugin
    • Jenkins 2.165 (master)
      HTML Publisher plugin 1.18

      Win10 64bit (slave)
      IBM Rational Performance Tester 9.5

      Chrome 64 and MS IE11

      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:

          [JENKINS-58324] HTML report do not show from Jenkins page (html error 404 on page js file)

          Hi anteid - 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

          Richard Bywater added a comment - Hi anteid - 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

          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.

          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.

          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"?

          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"?

          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).

          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).

          Hi anteid - 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.

          Richard Bywater added a comment - Hi anteid - 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.

          Ante Kevrić added a comment -

          Thank you, r2b2_nz

          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:

           

          Ante Kevrić added a comment - Thank you,  r2b2_nz .  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:  

          Ante Kevrić added a comment -

          Update to this thread and r2b2_nz . 

          IBM has provided solution patch: TP_57096_HotFix_1.0.0

          Thank you, and best regards,

          Ante.

           

           

           

           

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

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

              Created:
              Updated:
              Resolved: