• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • htmlpublisher-plugin
    • None
    • Jenkins 2.176.3, HTML Publisher 1.19

      Our CodeCoverage reports on Jenkins are no longer viewable - when you click the link in the menu we now see a blank screen with no tabs and no content, just the "Back to build" and "zip" links. Clicking the "zip" link allows the report to be downloaded, and it can be opened locally. Opening the Chrome dev tools, there is an error "Uncaught TypeError: Cannot read property 'setAttribute' of null"

      I've attached screenshots, and the report zip. 

          [JENKINS-59511] Error opening report with HTML Publisher

          Hi wilsoh58 - are you able to share a screenshot or similar of the HTML Publishing configuration too for reference? Also did this work on a previous version of the plugin and it has stopped working with the release of 1.19?

          Richard Bywater added a comment - Hi wilsoh58 - are you able to share a screenshot or similar of the HTML Publishing configuration too for reference? Also did this work on a previous version of the plugin and it has stopped working with the release of 1.19?

          Thomas Gimpel added a comment -

          Same here. The HTML Publishing worked with previous version, but stopped with release of 1.1.9.

          Thomas Gimpel added a comment - Same here. The HTML Publishing worked with previous version, but stopped with release of 1.1.9.

          git if you could please share your config for the HTML publisher and some background info that would be great as perhaps there's a particular use-case that was missed in the change.

          Richard Bywater added a comment - git if you could please share your config for the HTML publisher and some background info that would be great as perhaps there's a particular use-case that was missed in the change.

          Georgi Georgiev added a comment - - edited

          I had the same issue with 1.19.
          Just switched to previous version and everything works fine again.

          Here is my configuration for the plugin(I am using pipeline jobs):

          publishHTML(target: [
                  allowMissing         : false,
                  alwaysLinkToLastBuild: true,
                  keepAll              : true,
                  reportDir            : "test-output",
                  reportFiles          : "report-0.html, rerun-0.html",
                  reportName           : "MyReport"
          ])  

          Unfortunately, I have no special background info - the plugin got updated yesterday and this issue appeared immediately.

           

          Btw, I want to mention that this issue is not related only to pipeline scripts as I reproduced it with standard matrix job with same configuration.

          Georgi Georgiev added a comment - - edited I had the same issue with 1.19. Just switched to previous version and everything works fine again. Here is my configuration for the plugin(I am using pipeline jobs): publishHTML(target: [ allowMissing : false , alwaysLinkToLastBuild: true , keepAll : true , reportDir : "test-output" , reportFiles : "report-0.html, rerun-0.html" , reportName : "MyReport" ]) Unfortunately, I have no special background info - the plugin got updated yesterday and this issue appeared immediately.   Btw, I want to mention that this issue is not related only to pipeline scripts as I reproduced it with standard matrix job with same configuration.

          Thanks ggeorgiev - the publishHTML snippet helps to start investigating.

          Richard Bywater added a comment - Thanks ggeorgiev - the publishHTML snippet helps to start investigating.

          Thomas Gimpel added a comment -

          I'm also calling the publishHTML from a pipeline script:

          publishHTML(target: [
           allowMissing: true,
           alwaysLinkToLastBuild: true,
           keepAll: true,
           reportDir: 'testresults/smoketest',
           reportFiles: 'report.html, log.html, *.png',
           reportName: 'Smoke test result'
           ]);

          {{}}
          {{ }}

          Thomas Gimpel added a comment - I'm also calling the publishHTML from a pipeline script: publishHTML(target: [ allowMissing: true , alwaysLinkToLastBuild: true , keepAll: true , reportDir: 'testresults/smoketest' , reportFiles: 'report.html, log.html, *.png' , reportName: 'Smoke test result' ]); {{}} {{ }}

          Henry Wilson added a comment -

          r2b2_nz as per other comments I'm using pipeline configuration as below. Was definitely working with the previous version. 

           

          publishHTML([    
             allowMissing: true,
             alwaysLinkToLastBuild: false,
             keepAll: true,
             reportDir: 'packages/assistant-client-core/coverage/lcov-report',
             reportFiles: 'index.html',
             reportName: 'CodeCoverage',
             reportTitles: ''])

           

          Henry Wilson added a comment - r2b2_nz as per other comments I'm using pipeline configuration as below. Was definitely working with the previous version.    publishHTML([     allowMissing:  true ,    alwaysLinkToLastBuild:  false ,    keepAll:  true ,    reportDir:  'packages/assistant-client-core/coverage/lcov-report' ,    reportFiles:  'index.html' ,    reportName:  'CodeCoverage' ,    reportTitles: ''])  

          Henry Wilson added a comment -

          ggeorgiev is there an easy way to roll back to the previous version? Annoyingly the Jenkins UI only ever presents the latest version to install...

          Henry Wilson added a comment - ggeorgiev is there an easy way to roll back to the previous version? Annoyingly the Jenkins UI only ever presents the latest version to install...

          wilsoh58 if you go to Manage Jenkins / Manage Plugins and go to the Installed plugins tab, there hopefully is a Downgrade button there to take you back to 1.18.

          Richard Bywater added a comment - wilsoh58 if you go to Manage Jenkins / Manage Plugins and go to the Installed plugins tab, there hopefully is a Downgrade button there to take you back to 1.18.

          I've tried to reproduce locally but unfortunately as of yet haven't been able to. I'll keep on trying but in the meantime if you are having the issue are you able to produce a directory listing of your the directory in the workspace represented by reportDir (and subdirectories if applicable) just so I can get a feeling for what is present to see if there's anything different to what I'm testing.

          Richard Bywater added a comment - I've tried to reproduce locally but unfortunately as of yet haven't been able to. I'll keep on trying but in the meantime if you are having the issue are you able to produce a directory listing of your the directory in the workspace represented by reportDir (and subdirectories if applicable) just so I can get a feeling for what is present to see if there's anything different to what I'm testing.

          Henry Wilson added a comment -

          Just downgraded to 1.18 and can confirm it's working again

          Henry Wilson added a comment - Just downgraded to 1.18 and can confirm it's working again

          Also if anyone can share the portion of the log that relates to HTML publisher that would be great (The section should start along the lines of "[htmlpublisher] Archiving at...")

          Richard Bywater added a comment - Also if anyone can share the portion of the log that relates to HTML publisher that would be great (The section should start along the lines of " [htmlpublisher] Archiving at...")

          Thomas Gimpel added a comment -
          [2019-09-25T04:05:46.934Z] [htmlpublisher] Archiving HTML reports...
          [2019-09-25T04:05:46.935Z] [htmlpublisher] Archiving at BUILD level /jenkins/workspace/Project_Project_feature_develop5.0/testresults/smoketest to /var/lib/jenkins/jobs/Project/jobs/Project/branches/feature-develop5-0.8a6oo2/builds/881/htmlreports/Smoke_20test_20result

          Thomas Gimpel added a comment - [2019-09-25T04:05:46.934Z] [htmlpublisher] Archiving HTML reports... [2019-09-25T04:05:46.935Z] [htmlpublisher] Archiving at BUILD level /jenkins/workspace/Project_Project_feature_develop5.0/testresults/smoketest to / var /lib/jenkins/jobs/Project/jobs/Project/branches/feature-develop5-0.8a6oo2/builds/881/htmlreports/Smoke_20test_20result

          Richard Bywater added a comment - - edited

          Ok I think I might have found where the issue lies - are all you three running pipelines on an agent or similar that isn't the Jenkins master?

          Richard Bywater added a comment - - edited Ok I think I might have found where the issue lies - are all you three running pipelines on an agent or similar that isn't the Jenkins master?

          Henry Wilson added a comment -

          My log output looks exactly the same as that from Thomas above. I've also compared between a build on 1.19 and one on 1.18, log output is identical. 

          Henry Wilson added a comment - My log output looks exactly the same as that from Thomas above. I've also compared between a build on 1.19 and one on 1.18, log output is identical. 

          Henry Wilson added a comment -

          r2b2_nz yes our agents are separate from Master

          Henry Wilson added a comment - r2b2_nz yes our agents are separate from Master

          Thomas Gimpel added a comment -

          Also here: publishHTML was called on a node other than master.

          Thomas Gimpel added a comment - Also here: publishHTML was called on a node other than master.

          Thanks that reconciles my theory. Taking another look at the code it will only work currently if the job is run on the same machine as the Jenkins master. As its going to take a little while to solve that, I'm reverting the change and will be pushing out 1.20 soon which will revert the functionality back to the way 1.18 is working.

          Richard Bywater added a comment - Thanks that reconciles my theory. Taking another look at the code it will only work currently if the job is run on the same machine as the Jenkins master. As its going to take a little while to solve that, I'm reverting the change and will be pushing out 1.20 soon which will revert the functionality back to the way 1.18 is working.

          1.20 is released which should be available in the next few hours. This puts the logic back to 1.18 style handling.

          Richard Bywater added a comment - 1.20 is released which should be available in the next few hours. This puts the logic back to 1.18 style handling.

          Hello,

          I face the exact same issue with plugin version 1.23 and Jenkins 2.235.1

          only the zip download link is available

          running publisher from another node than master

           

          Federico Garcia added a comment - Hello, I face the exact same issue with plugin version 1.23 and Jenkins 2.235.1 only the zip download link is available running publisher from another node than master  

          Are you able to please provide the config and console output of the job that is creating the HTML?

          Richard Bywater added a comment - Are you able to please provide the config and console output of the job that is creating the HTML?

          Here is the config used in the pipeline

          publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'logs/', reportFiles: 'index.html', reportName: 'HTML Report', reportTitles: ''])

          and the output in the logs :

          [htmlpublisher] Archiving HTML reports... [htmlpublisher] Archiving at PROJECT level /home/jenkins/agent/checkout/devops.k8s/sahi/logs to /var/jenkins_home/jobs/filtering/branches/devops-k8s.knk400/htmlreports/HTML_20Report

          Federico Garcia added a comment - Here is the config used in the pipeline publishHTML([allowMissing: false , alwaysLinkToLastBuild: false , keepAll: false , reportDir: 'logs/' , reportFiles: 'index.html' , reportName: 'HTML Report' , reportTitles: '']) and the output in the logs : [htmlpublisher] Archiving HTML reports... [htmlpublisher] Archiving at PROJECT level /home/jenkins/agent/checkout/devops.k8s/sahi/logs to / var /jenkins_home/jobs/filtering/branches/devops-k8s.knk400/htmlreports/HTML_20Report

          I did a test on another environment,

          Jenkins ver. 2.222.1, plugin 1.22

          the same job running on master has the same result, only zip link available while it was working few months ago (probably plugin v1.18 or so).

          Federico Garcia added a comment - I did a test on another environment, Jenkins ver. 2.222.1 , plugin 1.22 the same job running on master has the same result, only zip link available while it was working few months ago (probably plugin v1.18 or so).

          Any update on this issue? Having the same behaviour with Jenkins 2.336 and Publisher Plugin 1.29.

          Tobias Schäfer added a comment - Any update on this issue? Having the same behaviour with Jenkins 2.336 and Publisher Plugin 1.29.

          I'm having the same error with Jenkins 2.336 and Publisher Plugin 1.29.

          Jessica Johnson added a comment - I'm having the same error with Jenkins 2.336 and Publisher Plugin 1.29.

            r2b2_nz Richard Bywater
            wilsoh58 Henry Wilson
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: