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

HTML Reports empty: Only report names visible but the html is empty v1.37.0

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • htmlpublisher-plugin
    • None
    • Jenkins Version 2.462.3
      Browser Chrome version 131.0.6778.69
      HTML Publisher plugin Version 1.37

      It looks like a Jenkins update with the HTML plugin update broke the plugin. 

      Report names are correctly visible but they are empty

      Report names were previously listed as shown in

          [JENKINS-74902] HTML Reports empty: Only report names visible but the html is empty v1.37.0

          Yaroslav Afenkin added a comment - - edited

          The report isn't clear to me. I see Mark mentions lack of links to HTML reports in dropdown menu in build history. But the screenshot in the description of the issue is from a regular side panel, no dropdowns involved. And then there's a screenshot of an empty HTML report. I'm not sure how to start and what exactly to look at given these bits.

          Yaroslav Afenkin added a comment - - edited The report isn't clear to me. I see Mark mentions lack of links to HTML reports in dropdown menu in build history. But the screenshot in the description of the issue is from a regular side panel, no dropdowns involved. And then there's a screenshot of an empty HTML report. I'm not sure how to start and what exactly to look at given these bits.

          Basil Crow added a comment -

          ravishan Can you please provide steps to reproduce the problem from scratch on a clean Jenkins installation?

          Basil Crow added a comment - ravishan Can you please provide steps to reproduce the problem from scratch on a clean Jenkins installation?

          Edward Nys added a comment -

          If it can help I seem to have the same issue.

          There Is a JS error when loading the repport:

          htmlpublisher.js:2 Uncaught TypeError: Cannot read properties of null (reading 'setAttribute')
              at updateBody (htmlpublisher.js:2:39)
              at init (htmlpublisher.js:10:3)
              at htmlpublisher.js:16:3 

          Edward Nys added a comment - If it can help I seem to have the same issue. There Is a JS error when loading the repport: htmlpublisher.js:2 Uncaught TypeError: Cannot read properties of null (reading 'setAttribute' )     at updateBody (htmlpublisher.js:2:39)     at init (htmlpublisher.js:10:3)     at htmlpublisher.js:16:3

          Thanks enys. Has this been reproduced from scratch on your instance or did it just happen randomly? I'd gladly look into this and fix if I have steps that I can follow.

          Yaroslav Afenkin added a comment - Thanks enys . Has this been reproduced from scratch on your instance or did it just happen randomly? I'd gladly look into this and fix if I have steps that I can follow.

          Edward Nys added a comment -

          yafenkin this happened post upgrade of Jenkins, with the update of the plugin from 1.36 to 1.37. I'm going to ask my team to reproduce.
          We use docker images with plugins.txt file so should be pretty straight forward.

          Edward Nys added a comment - yafenkin this happened post upgrade of Jenkins, with the update of the plugin from 1.36 to 1.37. I'm going to ask my team to reproduce. We use docker images with plugins.txt file so should be pretty straight forward.

          Edward Nys added a comment -

          yafenkin I believe I have pinned down the functional use case.

          Given a html report folder, with an index.html at the top level no issue.

          With a report with no index.html at the top level, but data in sub-folders, triggers the bug.

          Reproducible with a sh step:

          rm -rf toto
          mkdir -p toto/titi
          mkdir -p toto/tita
          curl -v https://google.com > toto/titi/index.html
          curl -v https://google.com > toto/tita/index.html
           

          and then having html report point to `toto`

           

          Be it 1.36 or 1.37 this use case provides the js error.

          Since 1.37, the "zip" button no longer works any more.

           

          Edward Nys added a comment - yafenkin I believe I have pinned down the functional use case. Given a html report folder, with an index.html at the top level no issue. With a report with no index.html at the top level, but data in sub-folders, triggers the bug. Reproducible with a sh step: rm -rf toto mkdir -p toto/titi mkdir -p toto/tita curl -v https: //google.com > toto/titi/index.html curl -v https: //google.com > toto/tita/index.html and then having html report point to `toto`   Be it 1.36 or 1.37 this use case provides the js error. Since 1.37, the "zip" button no longer works any more.  

          Yaroslav Afenkin added a comment - - edited

          Thanks enys, I've followed the steps and managed to get the same error.

          If data is in subfolders then in the "Index page[s]" field you can provide a list of paths that point to the index.html pages that you'd like to see in the report. I.e. for the example you provided I've set the field value to 

          titi\index.html, tita\index.html

          and reports are rendered properly.

          Yaroslav Afenkin added a comment - - edited Thanks enys , I've followed the steps and managed to get the same error. If data is in subfolders then in the "Index page [s] " field you can provide a list of paths that point to the index.html pages that you'd like to see in the report. I.e. for the example you provided I've set the field value to  titi\index.html, tita\index.html and reports are rendered properly.

          Edward Nys added a comment -

          yafenkin I thought that was the role of the glob pattern '*/' ?

          In my case, the subfolders are hashes provided by running e2e tests via codecept, not know in advance.

          Edward Nys added a comment - yafenkin I thought that was the role of the glob pattern '* / ' ? In my case, the subfolders are hashes provided by running e2e tests via codecept, not know in advance.

          Abhinandan added a comment -

          Is there any fix for the same, as its a blocker for us and the reports are not getting generated. Also, for me “Zip” is getting blank.

          Abhinandan added a comment - Is there any fix for the same, as its a blocker for us and the reports are not getting generated. Also, for me “Zip” is getting blank.

          Mark Waite added a comment -

          abhi_jain1911 can you confirm that 1.36.0 does not have an issue for you?

          Mark Waite added a comment - abhi_jain1911 can you confirm that 1.36.0 does not have an issue for you?

            yafenkin Yaroslav Afenkin
            ravishan Shreyas Ravishankar
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: