• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • htmlpublisher-plugin
    • None
    • Jenkins ver. 1.643,
      HTML Publisher plugin 1.10

      I publish several HTML reports after a build and after sorting out the Content Security Policy updates, one error remains.

      Checksum mismatch

      The checksum of the current wrapper file (5ea0d2ed1f4d0710e3ceaa8d2c3d9b35a3a13475) does not match the recorded checksum (6db1021567d9b39bdcd2b32a86e1dad589f620dd). This indicates a possible security issue, therefore Jenkins will not serve this file. You can access the archived HTML files here.

      I don't know what this means or how to address it and I can't find any information in the HTML publisher plugin docs. Each report is configured like this one:

      The problem only occurs when I click on the project-level report link, for example:

      https://example.com/job/ExampleProject/Tests/
      

      If I click the build-specific report, it displays fine, for example:

      https://example.com/job/ExampleProject/101/Tests/
      

      The same problem goes unanswered on Stack Overflow: http://stackoverflow.com/questions/34419223/jenkins-html-publisher-plugin-checksum-mismatch

          [JENKINS-32281] HTML report shows "Checksum mismatch"

          I tried wiping out the workspace and that didn't change anything.

          Anthony Mastrean added a comment - I tried wiping out the workspace and that didn't change anything.

          I found the source code that produces this message, but don't know how I get into this state to try to fix it

          Anthony Mastrean added a comment - I found the source code that produces this message, but don't know how I get into this state to try to fix it

          Daniel Beck added a comment - - edited

          Ugh. This shouldn't happen…

          Could you provide the wrapper HTML file archived in Jenkins next to the HTML report, as well as the build.xml file?

          Daniel Beck added a comment - - edited Ugh. This shouldn't happen… Could you provide the wrapper HTML file archived in Jenkins next to the HTML report, as well as the build.xml file?

          Daniel Beck added a comment -

          The job's config.xml can't hurt either.

          Daniel Beck added a comment - The job's config.xml can't hurt either.

          Daniel Beck added a comment -

          What happens starting in HTML Publisher 1.10 is that the generated HTML Publisher wrapper file gets its checksum recorded during creation, and that checksum is stored in the build.xml.

          Before serving the file afterwards, if the checksum in the build.xml is present (for backward compatibility), it gets recalculated from the archived file. If there's a mismatch, the file isn't served.

          Daniel Beck added a comment - What happens starting in HTML Publisher 1.10 is that the generated HTML Publisher wrapper file gets its checksum recorded during creation, and that checksum is stored in the build.xml. Before serving the file afterwards, if the checksum in the build.xml is present (for backward compatibility), it gets recalculated from the archived file. If there's a mismatch, the file isn't served.

          Is the wrapper file something I'd get off the filesystem of the Jenkins server (and not through the web interface)?

          Anthony Mastrean added a comment - Is the wrapper file something I'd get off the filesystem of the Jenkins server (and not through the web interface)?

          I'm uncomfortable uploading the entire build or config file (there's some sensitive URLs, etc in these files), so let me snip the relevant parts. Let me know if you need more.

          build.xml

              <htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction plugin="htmlpublisher@1.10">
                <actualHtmlPublisherTarget>
                  <reportName>Tests</reportName>
                  <reportDir>bin/reports/unittest</reportDir>
                  <reportFiles>index.html</reportFiles>
                  <alwaysLinkToLastBuild>true</alwaysLinkToLastBuild>
                  <keepAll>true</keepAll>
                  <allowMissing>true</allowMissing>
                </actualHtmlPublisherTarget>
                <outer-class reference="../actualHtmlPublisherTarget"/>
                <wrapperChecksum>5ea0d2ed1f4d0710e3ceaa8d2c3d9b35a3a13475</wrapperChecksum>
                <outer-class defined-in="htmlpublisher.HtmlPublisherTarget$HTMLBuildAction" reference="../actualHtmlPublisherTarget"/>
              </htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction>
          

          config.xml

              <htmlpublisher.HtmlPublisher plugin="htmlpublisher@1.10">
                <reportTargets>
                  <htmlpublisher.HtmlPublisherTarget>
                    <reportName>Tests</reportName>
                    <reportDir>bin/reports/unittest</reportDir>
                    <reportFiles>index.html</reportFiles>
                    <alwaysLinkToLastBuild>true</alwaysLinkToLastBuild>
                    <keepAll>true</keepAll>
                    <allowMissing>true</allowMissing>
                  </htmlpublisher.HtmlPublisherTarget>
                </reportTargets>
              </htmlpublisher.HtmlPublisher>
          

          Anthony Mastrean added a comment - I'm uncomfortable uploading the entire build or config file (there's some sensitive URLs, etc in these files), so let me snip the relevant parts. Let me know if you need more. build.xml <htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction plugin= "htmlpublisher@1.10" > <actualHtmlPublisherTarget> <reportName>Tests</reportName> <reportDir>bin/reports/unittest</reportDir> <reportFiles>index.html</reportFiles> <alwaysLinkToLastBuild> true </alwaysLinkToLastBuild> <keepAll> true </keepAll> <allowMissing> true </allowMissing> </actualHtmlPublisherTarget> < outer - class reference= "../actualHtmlPublisherTarget" /> <wrapperChecksum>5ea0d2ed1f4d0710e3ceaa8d2c3d9b35a3a13475</wrapperChecksum> < outer - class defined-in= "htmlpublisher.HtmlPublisherTarget$HTMLBuildAction" reference= "../actualHtmlPublisherTarget" /> </htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction> config.xml <htmlpublisher.HtmlPublisher plugin= "htmlpublisher@1.10" > <reportTargets> <htmlpublisher.HtmlPublisherTarget> <reportName>Tests</reportName> <reportDir>bin/reports/unittest</reportDir> <reportFiles>index.html</reportFiles> <alwaysLinkToLastBuild> true </alwaysLinkToLastBuild> <keepAll> true </keepAll> <allowMissing> true </allowMissing> </htmlpublisher.HtmlPublisherTarget> </reportTargets> </htmlpublisher.HtmlPublisher>

          Dave Ferran added a comment -

          I am also seeing this issue after I have updated to Jenkins 1.645 and updating HTML Publisher Plugin from 1.06 to 1.10. Please let me know if more details are needed.

          build.xml
          <htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction plugin="htmlpublisher@1.10">
          <actualHtmlPublisherTarget>
          <reportName>WUG TA HTML Report</reportName>
          <reportDir>nm\QA_Automation\v17.0\WUGEmailableReport</reportDir>
          <reportFiles>Results.html</reportFiles>
          <alwaysLinkToLastBuild>false</alwaysLinkToLastBuild>
          <keepAll>true</keepAll>
          <allowMissing>true</allowMissing>
          </actualHtmlPublisherTarget>
          <outer-class reference="../actualHtmlPublisherTarget"/>
          <wrapperChecksum>b804be0e5318971e835d34f9aa44b2f0962f83bc</wrapperChecksum>
          <outer-class defined-in="htmlpublisher.HtmlPublisherTarget$HTMLBuildAction" reference="../actualHtmlPublisherTarget"/>
          </htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction>
          <htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction plugin="htmlpublisher@1.10">
          <actualHtmlPublisherTarget>
          <reportName>TestNG XSLT Report</reportName>
          <reportDir>nm\QA_Automation\v17.0\testng-xslt</reportDir>
          <reportFiles>index.html</reportFiles>
          <alwaysLinkToLastBuild>false</alwaysLinkToLastBuild>
          <keepAll>true</keepAll>
          <allowMissing>true</allowMissing>
          </actualHtmlPublisherTarget>
          <outer-class reference="../actualHtmlPublisherTarget"/>
          <wrapperChecksum>796cbf0a49a412ba89a93f58bbf63abf9f5af936</wrapperChecksum>
          <outer-class defined-in="htmlpublisher.HtmlPublisherTarget$HTMLBuildAction" reference="../actualHtmlPublisherTarget"/>
          </htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction>
          <htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction plugin="htmlpublisher@1.10">
          <actualHtmlPublisherTarget>
          <reportName>ST Email HTML Report</reportName>
          <reportDir>nm\QA_Automation\v17.0\SanityTestEmailReport</reportDir>
          <reportFiles>STEmailReport.html</reportFiles>
          <alwaysLinkToLastBuild>false</alwaysLinkToLastBuild>
          <keepAll>true</keepAll>
          <allowMissing>true</allowMissing>
          </actualHtmlPublisherTarget>
          <outer-class reference="../actualHtmlPublisherTarget"/>
          <wrapperChecksum>ffc2f816b50b1c16b1039117586a3b4077678142</wrapperChecksum>
          <outer-class defined-in="htmlpublisher.HtmlPublisherTarget$HTMLBuildAction" reference="../actualHtmlPublisherTarget"/>
          </htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction>
          config.xml
          <publishers>
          <htmlpublisher.HtmlPublisher plugin="htmlpublisher@1.10">
          <reportTargets>
          <htmlpublisher.HtmlPublisherTarget>
          <reportName>WUG TA HTML Report</reportName>
          <reportDir>nm\QA_Automation\v17.0\WUGEmailableReport</reportDir>
          <reportFiles>Results.html</reportFiles>
          <alwaysLinkToLastBuild>false</alwaysLinkToLastBuild>
          <keepAll>true</keepAll>
          <allowMissing>true</allowMissing>
          </htmlpublisher.HtmlPublisherTarget>
          <htmlpublisher.HtmlPublisherTarget>
          <reportName>TestNG XSLT Report</reportName>
          <reportDir>nm\QA_Automation\v17.0\testng-xslt</reportDir>
          <reportFiles>index.html</reportFiles>
          <alwaysLinkToLastBuild>false</alwaysLinkToLastBuild>
          <keepAll>true</keepAll>
          <allowMissing>true</allowMissing>
          </htmlpublisher.HtmlPublisherTarget>
          <htmlpublisher.HtmlPublisherTarget>
          <reportName>ST Email HTML Report</reportName>
          <reportDir>nm\QA_Automation\v17.0\SanityTestEmailReport</reportDir>
          <reportFiles>STEmailReport.html</reportFiles>
          <alwaysLinkToLastBuild>false</alwaysLinkToLastBuild>
          <keepAll>true</keepAll>
          <allowMissing>true</allowMissing>
          </htmlpublisher.HtmlPublisherTarget>
          </reportTargets>
          </htmlpublisher.HtmlPublisher>
          </publishers>

          Dave Ferran added a comment - I am also seeing this issue after I have updated to Jenkins 1.645 and updating HTML Publisher Plugin from 1.06 to 1.10. Please let me know if more details are needed. build.xml <htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction plugin="htmlpublisher@1.10"> <actualHtmlPublisherTarget> <reportName>WUG TA HTML Report</reportName> <reportDir>nm\QA_Automation\v17.0\WUGEmailableReport</reportDir> <reportFiles>Results.html</reportFiles> <alwaysLinkToLastBuild>false</alwaysLinkToLastBuild> <keepAll>true</keepAll> <allowMissing>true</allowMissing> </actualHtmlPublisherTarget> <outer-class reference="../actualHtmlPublisherTarget"/> <wrapperChecksum>b804be0e5318971e835d34f9aa44b2f0962f83bc</wrapperChecksum> <outer-class defined-in="htmlpublisher.HtmlPublisherTarget$HTMLBuildAction" reference="../actualHtmlPublisherTarget"/> </htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction> <htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction plugin="htmlpublisher@1.10"> <actualHtmlPublisherTarget> <reportName>TestNG XSLT Report</reportName> <reportDir>nm\QA_Automation\v17.0\testng-xslt</reportDir> <reportFiles>index.html</reportFiles> <alwaysLinkToLastBuild>false</alwaysLinkToLastBuild> <keepAll>true</keepAll> <allowMissing>true</allowMissing> </actualHtmlPublisherTarget> <outer-class reference="../actualHtmlPublisherTarget"/> <wrapperChecksum>796cbf0a49a412ba89a93f58bbf63abf9f5af936</wrapperChecksum> <outer-class defined-in="htmlpublisher.HtmlPublisherTarget$HTMLBuildAction" reference="../actualHtmlPublisherTarget"/> </htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction> <htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction plugin="htmlpublisher@1.10"> <actualHtmlPublisherTarget> <reportName>ST Email HTML Report</reportName> <reportDir>nm\QA_Automation\v17.0\SanityTestEmailReport</reportDir> <reportFiles>STEmailReport.html</reportFiles> <alwaysLinkToLastBuild>false</alwaysLinkToLastBuild> <keepAll>true</keepAll> <allowMissing>true</allowMissing> </actualHtmlPublisherTarget> <outer-class reference="../actualHtmlPublisherTarget"/> <wrapperChecksum>ffc2f816b50b1c16b1039117586a3b4077678142</wrapperChecksum> <outer-class defined-in="htmlpublisher.HtmlPublisherTarget$HTMLBuildAction" reference="../actualHtmlPublisherTarget"/> </htmlpublisher.HtmlPublisherTarget_-HTMLBuildAction> config.xml <publishers> <htmlpublisher.HtmlPublisher plugin="htmlpublisher@1.10"> <reportTargets> <htmlpublisher.HtmlPublisherTarget> <reportName>WUG TA HTML Report</reportName> <reportDir>nm\QA_Automation\v17.0\WUGEmailableReport</reportDir> <reportFiles>Results.html</reportFiles> <alwaysLinkToLastBuild>false</alwaysLinkToLastBuild> <keepAll>true</keepAll> <allowMissing>true</allowMissing> </htmlpublisher.HtmlPublisherTarget> <htmlpublisher.HtmlPublisherTarget> <reportName>TestNG XSLT Report</reportName> <reportDir>nm\QA_Automation\v17.0\testng-xslt</reportDir> <reportFiles>index.html</reportFiles> <alwaysLinkToLastBuild>false</alwaysLinkToLastBuild> <keepAll>true</keepAll> <allowMissing>true</allowMissing> </htmlpublisher.HtmlPublisherTarget> <htmlpublisher.HtmlPublisherTarget> <reportName>ST Email HTML Report</reportName> <reportDir>nm\QA_Automation\v17.0\SanityTestEmailReport</reportDir> <reportFiles>STEmailReport.html</reportFiles> <alwaysLinkToLastBuild>false</alwaysLinkToLastBuild> <keepAll>true</keepAll> <allowMissing>true</allowMissing> </htmlpublisher.HtmlPublisherTarget> </reportTargets> </htmlpublisher.HtmlPublisher> </publishers>

          Daniel Beck added a comment -

          Are all of you on Windows (Jenkins master)?

          Daniel Beck added a comment - Are all of you on Windows (Jenkins master)?

          I'm running the master on CentOS 6

          Anthony Mastrean added a comment - I'm running the master on CentOS 6

          Daniel Beck added a comment -

          Please provide the output of the following script when run in Manage Jenkins » Script Console:

          java.nio.charset.Charset.defaultCharset()

          Daniel Beck added a comment - Please provide the output of the following script when run in Manage Jenkins » Script Console: java.nio.charset.Charset.defaultCharset()

          Tal Machani added a comment -

          Have the same issue.

          Master is on Ubuntu 15.04

          And the script output is:
          UTF-8

          Tal Machani added a comment - Have the same issue. Master is on Ubuntu 15.04 And the script output is: UTF-8

          UTF-8

          Anthony Mastrean added a comment - UTF-8

          Dave Ferran added a comment -

          windows-1252

          Dave Ferran added a comment - windows-1252

          Jon Wxxxx added a comment -

          I also have the problem that I usually get the "Checksum mismatch" error. (Jenkins and all plugins are up-to-date.)
          I hope I can shed some light on the problem. There are certain conditions I have noticed.

          • The problem does not occur when there is a single HTML report.
          • The problem does not occur for the first HTML report.
          • The incorrect checksum is reported, an example:
            "The checksum of the current wrapper file (checksum from 2nd report) does not match the recorded checksum (checksum from 1st report)."
          • Sometimes no error is reported, so it may not be deterministic.
          • The problem does not occur if you select the job and open the report from left column.
            Checksum error -> http://.../job/JOB-NAME/HTML-NAME
            No checksum error -> http://.../job/JOB-NAME/JOB-ID/HTML-NAME

          Jon Wxxxx added a comment - I also have the problem that I usually get the "Checksum mismatch" error. (Jenkins and all plugins are up-to-date.) I hope I can shed some light on the problem. There are certain conditions I have noticed. The problem does not occur when there is a single HTML report. The problem does not occur for the first HTML report. The incorrect checksum is reported, an example: "The checksum of the current wrapper file (checksum from 2nd report) does not match the recorded checksum (checksum from 1st report)." Sometimes no error is reported, so it may not be deterministic. The problem does not occur if you select the job and open the report from left column. Checksum error -> http://.../job/JOB-NAME/HTML-NAME No checksum error -> http://.../job/JOB-NAME/JOB-ID/HTML-NAME

          Daniel Beck added a comment -

          jonw Thanks for the detailed analysis! It helps a lot. I'll see what I can do. I'll be traveling next week, so I hope to get this done this week. No promises though.

          Daniel Beck added a comment - jonw Thanks for the detailed analysis! It helps a lot. I'll see what I can do. I'll be traveling next week, so I hope to get this done this week. No promises though.

          Joachim Nilsson added a comment - - edited

          Same issue

          RHEL 6.5
          Jenkins 1.645
          HTML Publisher plugin 1.10

          Output from script console: UTF-8

          Great finding Jon! Yes that is applicable for us as well, we have several reports per job.
          Note: I cannot reproduce the error if I only create 2 reports, I also must mark the publishing option: 'Keep past HTML reports'

          Joachim Nilsson added a comment - - edited Same issue RHEL 6.5 Jenkins 1.645 HTML Publisher plugin 1.10 Output from script console: UTF-8 Great finding Jon! Yes that is applicable for us as well, we have several reports per job. Note: I cannot reproduce the error if I only create 2 reports, I also must mark the publishing option: 'Keep past HTML reports'

          Daniel Beck added a comment -

          jonw (and everyone else watching): Proposed fix at https://github.com/jenkinsci/htmlpublisher-plugin/pull/23

          Please take a look, maybe give the PR build https://jenkins.ci.cloudbees.com/job/plugins/job/htmlpublisher-plugin/61/ a try?

          Daniel Beck added a comment - jonw (and everyone else watching): Proposed fix at https://github.com/jenkinsci/htmlpublisher-plugin/pull/23 Please take a look, maybe give the PR build https://jenkins.ci.cloudbees.com/job/plugins/job/htmlpublisher-plugin/61/ a try?

          Jon Wxxxx added a comment -

          Thanks for the quick fix. I only tested it superficially, but it looks good.

          Jon Wxxxx added a comment - Thanks for the quick fix. I only tested it superficially, but it looks good.

          I also tested it briefly, looks OK for me as well.

          Joachim Nilsson added a comment - I also tested it briefly, looks OK for me as well.

          Jon Wxxxx added a comment -

          > Note: I cannot reproduce the error if I only create 2 reports, I also must mark the publishing option: 'Keep past HTML reports'

          This was my experience as well but I was unsure about it and not sure if it was relevant.

          Jon Wxxxx added a comment - > Note: I cannot reproduce the error if I only create 2 reports, I also must mark the publishing option: 'Keep past HTML reports' This was my experience as well but I was unsure about it and not sure if it was relevant.

          Daniel Beck added a comment -

          Yep, it's important, otherwise a different branch in the code is taken. So you need a) multiple reports per build, b) archiving reports of past builds, c) access reports through project-level links. Therefore the instructions how to reproduce the issue were essential.

          (This is really a bit of a hack because if you archive reports for past build, it switches to a different mode in which reports are attached to builds rather than to the project, and the project-level links essentially forward to the build-level archive… and that's where I messed up the checksum change for 1.10 – but it's only apparent when you archive multiple different reports.)

          Daniel Beck added a comment - Yep, it's important, otherwise a different branch in the code is taken. So you need a) multiple reports per build, b) archiving reports of past builds, c) access reports through project-level links. Therefore the instructions how to reproduce the issue were essential. (This is really a bit of a hack because if you archive reports for past build, it switches to a different mode in which reports are attached to builds rather than to the project, and the project-level links essentially forward to the build-level archive… and that's where I messed up the checksum change for 1.10 – but it's only apparent when you archive multiple different reports.)

          Code changed in jenkins
          User: Daniel Beck
          Path:
          src/main/java/htmlpublisher/HtmlPublisherTarget.java
          http://jenkins-ci.org/commit/htmlpublisher-plugin/014ee3838bc5a617e2cf6474423099c34e947abe
          Log:
          [FIX JENKINS-32281] Consider multiple reports per build

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: src/main/java/htmlpublisher/HtmlPublisherTarget.java http://jenkins-ci.org/commit/htmlpublisher-plugin/014ee3838bc5a617e2cf6474423099c34e947abe Log: [FIX JENKINS-32281] Consider multiple reports per build

          Code changed in jenkins
          User: Mike Rooney
          Path:
          src/main/java/htmlpublisher/HtmlPublisherTarget.java
          http://jenkins-ci.org/commit/htmlpublisher-plugin/9dd6fe1ea02d48ea411125b54369752f5be4f494
          Log:
          Merge pull request #23 from daniel-beck/JENKINS-32281

          [FIX JENKINS-32281] Consider multiple reports per build

          Compare: https://github.com/jenkinsci/htmlpublisher-plugin/compare/4a8d86addf84...9dd6fe1ea02d

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mike Rooney Path: src/main/java/htmlpublisher/HtmlPublisherTarget.java http://jenkins-ci.org/commit/htmlpublisher-plugin/9dd6fe1ea02d48ea411125b54369752f5be4f494 Log: Merge pull request #23 from daniel-beck/ JENKINS-32281 [FIX JENKINS-32281] Consider multiple reports per build Compare: https://github.com/jenkinsci/htmlpublisher-plugin/compare/4a8d86addf84...9dd6fe1ea02d

          mcrooney added a comment -

          Released as HTML Publisher 1.11, let us know how it works for you

          mcrooney added a comment - Released as HTML Publisher 1.11, let us know how it works for you

          I converted all of my custom reports to plugin-based-reports! If no one else can repro the fix, I'll try to spin up one of my older configurations.

          Anthony Mastrean added a comment - I converted all of my custom reports to plugin-based-reports! If no one else can repro the fix, I'll try to spin up one of my older configurations.

            danielbeck Daniel Beck
            anthonymastrean Anthony Mastrean
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: