[JIRA] (JENKINS-59511) Error opening report with HTML Publisher

44 views
Skip to first unread message

henry.wilson@bbc.co.uk (JIRA)

unread,
Sep 24, 2019, 10:11:03 AM9/24/19
to jenkinsc...@googlegroups.com
Henry Wilson created an issue
 
Jenkins / Bug JENKINS-59511
Error opening report with HTML Publisher
Issue Type: Bug Bug
Assignee: Richard Bywater
Attachments: CodeCoverage.zip, Screenshot 2019-09-24 at 15.07.17.png, Screenshot 2019-09-24 at 15.07.29.png
Components: htmlpublisher-plugin
Created: 2019-09-24 14:10
Environment: Jenkins 2.176.3, HTML Publisher 1.19
Priority: Minor Minor
Reporter: Henry Wilson

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. 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

richard@bywater.nz (JIRA)

unread,
Sep 24, 2019, 6:08:02 PM9/24/19
to jenkinsc...@googlegroups.com
Richard Bywater commented on Bug JENKINS-59511
 
Re: Error opening report with HTML Publisher

Hi Henry Wilson - 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?

gimpel@ferrari-electronic.de (JIRA)

unread,
Sep 25, 2019, 3:38:02 AM9/25/19
to jenkinsc...@googlegroups.com

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

richard@bywater.nz (JIRA)

unread,
Sep 25, 2019, 4:18:03 AM9/25/19
to jenkinsc...@googlegroups.com

Thomas Gimpel 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.

ggeorgiev2891@gmail.com (JIRA)

unread,
Sep 25, 2019, 4:45:02 AM9/25/19
to jenkinsc...@googlegroups.com

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"
])  

ggeorgiev2891@gmail.com (JIRA)

unread,
Sep 25, 2019, 4:47:04 AM9/25/19
to jenkinsc...@googlegroups.com
Georgi Georgiev edited a comment on Bug JENKINS-59511
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):
{code:java}

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

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

richard@bywater.nz (JIRA)

unread,
Sep 25, 2019, 4:50:02 AM9/25/19
to jenkinsc...@googlegroups.com

Thanks Georgi Georgiev - the publishHTML snippet helps to start investigating.

gimpel@ferrari-electronic.de (JIRA)

unread,
Sep 25, 2019, 4:53:02 AM9/25/19
to jenkinsc...@googlegroups.com

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'
 ]);

{{}}
{{ }}

ggeorgiev2891@gmail.com (JIRA)

unread,
Sep 25, 2019, 4:56:03 AM9/25/19
to jenkinsc...@googlegroups.com
Georgi Georgiev edited a comment on Bug JENKINS-59511
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):
{code:java}
publishHTML(target: [
        allowMissing         : false,
        alwaysLinkToLastBuild: true,
        keepAll              : true,

        reportDir            : "test-output",
        reportFiles          : "report-0.html, rerun-0.html",
        reportName           : "MyReport"
])  {code}

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.

henry.wilson@bbc.co.uk (JIRA)

unread,
Sep 25, 2019, 5:09:03 AM9/25/19
to jenkinsc...@googlegroups.com

Richard Bywater 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@bbc.co.uk (JIRA)

unread,
Sep 25, 2019, 5:14:03 AM9/25/19
to jenkinsc...@googlegroups.com

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

richard@bywater.nz (JIRA)

unread,
Sep 25, 2019, 5:15:02 AM9/25/19
to jenkinsc...@googlegroups.com

Henry Wilson 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.nz (JIRA)

unread,
Sep 25, 2019, 5:16:03 AM9/25/19
to jenkinsc...@googlegroups.com

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@bbc.co.uk (JIRA)

unread,
Sep 25, 2019, 5:26:01 AM9/25/19
to jenkinsc...@googlegroups.com

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

richard@bywater.nz (JIRA)

unread,
Sep 25, 2019, 5:34:02 AM9/25/19
to jenkinsc...@googlegroups.com

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

gimpel@ferrari-electronic.de (JIRA)

unread,
Sep 25, 2019, 5:40:02 AM9/25/19
to jenkinsc...@googlegroups.com
[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.nz (JIRA)

unread,
Sep 25, 2019, 5:44:02 AM9/25/19
to jenkinsc...@googlegroups.com

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

richard@bywater.nz (JIRA)

unread,
Sep 25, 2019, 5:44:03 AM9/25/19
to jenkinsc...@googlegroups.com
Richard Bywater edited a comment on Bug JENKINS-59511
Ok I think I might have found where the issue lies - are all your you three running pipelines on an agent or similar that *isn't* the Jenkins master?

henry.wilson@bbc.co.uk (JIRA)

unread,
Sep 25, 2019, 5:45:02 AM9/25/19
to jenkinsc...@googlegroups.com

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@bbc.co.uk (JIRA)

unread,
Sep 25, 2019, 5:45:02 AM9/25/19
to jenkinsc...@googlegroups.com

Richard Bywater yes our agents are separate from Master

gimpel@ferrari-electronic.de (JIRA)

unread,
Sep 25, 2019, 5:49:02 AM9/25/19
to jenkinsc...@googlegroups.com

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

richard@bywater.nz (JIRA)

unread,
Sep 25, 2019, 5:51:03 AM9/25/19
to jenkinsc...@googlegroups.com

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.

ggeorgiev2891@gmail.com (JIRA)

unread,
Sep 25, 2019, 5:52:03 AM9/25/19
to jenkinsc...@googlegroups.com

My input dir(reportDir) structure:

attachments/
bullet_point.png
collapseall.gif
emailable-report.html
failed.png
files/
index.html
jquery-1.7.1.min.js
junitreports/
Maven/
navigator-bullet.png
old/
passed.png
report-0.html
screenshots/
skipped.png
testng.css
testng-failed.xml
testng-reports.css
testng-reports.js
testng-results.xml
TestSuite.txt
TEST-TestSuite.xml

Log:

[htmlpublisher] Archiving at BUILD level /opt/jenkins/workspace/Mask/Mask1/Mask2@3/791/Mask3/Mask4/test-output to /opt/jenkins/jobs/Mask/jobs/Mask1/jobs/Mask2/builds/791/htmlreports/MyReport 

Please note that for the log, I have replaced real directories names with tokens("Mask", "Mask1"...), but values are still 1:1 matching in the source and target dir paths(example "Mask1" value in source dir is the same as "Mask1" value in target)

ggeorgiev2891@gmail.com (JIRA)

unread,
Sep 25, 2019, 5:53:02 AM9/25/19
to jenkinsc...@googlegroups.com
Georgi Georgiev updated an issue
 
Change By: Georgi Georgiev
Comment: My input dir(reportDir) structure:
{code:java}

attachments/
bullet_point.png
collapseall.gif
emailable-report.html
failed.png
files/
index.html
jquery-1.7.1.min.js
junitreports/
Maven/
navigator-bullet.png
old/
passed.png
report-0.html
screenshots/
skipped.png
testng.css
testng-failed.xml
testng-reports.css
testng-reports.js
testng-results.xml
TestSuite.txt
TEST-TestSuite.xml
{code}

Log:
{code:java}
[htmlpublisher] Archiving at BUILD level /opt/jenkins/workspace/Mask/Mask1/Mask2@3/791/Mask3/Mask4/test-output to /opt/jenkins/jobs/Mask/jobs/Mask1/jobs/Mask2/builds/791/htmlreports/MyReport {code}

Please note that for the log, I have replaced real directories names with tokens("Mask", "Mask1"...), but values are still 1:1 matching in the source and target dir paths(example "Mask1" value in source dir is the same as "Mask1" value in target)

richard@bywater.nz (JIRA)

unread,
Sep 25, 2019, 6:09:02 AM9/25/19
to jenkinsc...@googlegroups.com
Richard Bywater resolved as Fixed
 

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

Change By: Richard Bywater
Status: Open Resolved
Resolution: Fixed
Released As: https://github.com/jenkinsci/htmlpublisher-plugin/releases/tag/htmlpublisher-1.20

richard@bywater.nz (JIRA)

unread,
Sep 26, 2019, 6:59:03 AM9/26/19
to jenkinsc...@googlegroups.com
Richard Bywater closed an issue as Fixed
Change By: Richard Bywater
Status: Resolved Closed
Reply all
Reply to author
Forward
0 new messages