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

          Shreyas Ravishankar created issue -

          Mark Waite added a comment - - edited

          Please provide enough details so that others can duplicate the issue from a fresh Jenkins installation. How to report an issue provides helpful scripts and a list of items to include.

          Please report the last version of Jenkins core that behaved the way that you expect.

          I'm unable to find any configuration option that places individual reports in the same list that includes the link to the reports. I've created a Pipeline job like this:

          pipeline {
              agent any
              stages {
                  stage('Hello') {
                      steps {
                          sh "echo '<html><h1>A1 ' `date` '</h1></html>' > a1.html"
                          sleep 1
                          sh "echo '<html><h1>B1 ' `date` '</h1></html>' > b1.html"
                          publishHTML([allowMissing: false, 
                                       alwaysLinkToLastBuild: true, 
                                       includes: '*.html', 
                                       keepAll: true, 
                                       reportDir: '.', 
                                       reportFiles: 'a1.html, b1.html', 
                                       reportName: 'A+B HTML Report', 
                                       reportTitles: 'A1 page title, B1 page title', 
                                       useWrapperFileDirectly: true])
                      }
                  }
              }
          }
          

          That creates an "A+B HTML Report" link and that link includes the expected two pages at the top level.

          I've created a freestyle project that includes the following shell script :

          echo '<html><h1>A1 ' `date` '</h1><a href="c1.html">C1</a></html>' > a1.html
          sleep 1
          echo '<html><h1>B1 ' `date` '</h1><a href="d1.html">D1</a></html>' > b1.html
          sleep 1
          echo '<html><h1>C1 ' `date` '</h1></html>' > c1.html
          sleep 1
          echo '<html><h1>D1 ' `date` '</h1></html>' > d1.html
          

          That freestyle project is configured to publish two pages, a1 and b1. I've confirmed that the navigation works as expected within those pages and I can click the C1 link and the D1 link to navigate to the nested pages.

          Mark Waite added a comment - - edited Please provide enough details so that others can duplicate the issue from a fresh Jenkins installation. How to report an issue provides helpful scripts and a list of items to include. Please report the last version of Jenkins core that behaved the way that you expect. I'm unable to find any configuration option that places individual reports in the same list that includes the link to the reports. I've created a Pipeline job like this: pipeline { agent any stages { stage( 'Hello' ) { steps { sh "echo '<html><h1>A1 ' `date` '</h1></html>' > a1.html" sleep 1 sh "echo '<html><h1>B1 ' `date` '</h1></html>' > b1.html" publishHTML([allowMissing: false , alwaysLinkToLastBuild: true , includes: '*.html' , keepAll: true , reportDir: '.' , reportFiles: 'a1.html, b1.html' , reportName: 'A+B HTML Report' , reportTitles: 'A1 page title, B1 page title' , useWrapperFileDirectly: true ]) } } } } That creates an "A+B HTML Report" link and that link includes the expected two pages at the top level. I've created a freestyle project that includes the following shell script : echo '<html><h1>A1 ' `date` '</h1><a href= "c1.html" >C1</a></html>' > a1.html sleep 1 echo '<html><h1>B1 ' `date` '</h1><a href= "d1.html" >D1</a></html>' > b1.html sleep 1 echo '<html><h1>C1 ' `date` '</h1></html>' > c1.html sleep 1 echo '<html><h1>D1 ' `date` '</h1></html>' > d1.html That freestyle project is configured to publish two pages, a1 and b1. I've confirmed that the navigation works as expected within those pages and I can click the C1 link and the D1 link to navigate to the nested pages.
          Mark Waite made changes -
          Sprint Original: Post-launch [ 151 ]
          Mark Waite made changes -
          Description Original: It looks like a Jenkins update with the HTML plugin update broker the plugin. 

          Report names are correctly visible but they are empty
          New: It looks like a Jenkins update with the HTML plugin update broker the plugin. 

          Report names are correctly visible but they are empty

          Report names were previously listed as shown in

           !Report_with_names_visible.png|thumbnail!
          Mark Waite made changes -
          Description Original: It looks like a Jenkins update with the HTML plugin update broker the plugin. 

          Report names are correctly visible but they are empty

          Report names were previously listed as shown in

           !Report_with_names_visible.png|thumbnail!
          New: It looks like a Jenkins update with the HTML plugin update broker the plugin. 

          Report names are correctly visible but they are empty

          Report names were previously listed as shown in

           !Report_with_names_visible.png|!
          Mark Waite made changes -
          Description Original: It looks like a Jenkins update with the HTML plugin update broker the plugin. 

          Report names are correctly visible but they are empty

          Report names were previously listed as shown in

           !Report_with_names_visible.png|!
          New: 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

           !Report_with_names_visible.png|!

          Shreyas Ravishankar added a comment - - edited

          Thanks for the quick response, Jenkins update was 2.452.2 -> 2.462.3. Here is a snippet of ours which always worked before the update:

           
          def html_files = [device_type + '-report.html', device_type + '-testautomation-link.html']

              publishHTML target: [
                  allowMissing: false,
                  alwaysLinkToLastBuild: false,
                  keepAll: true,
                  reportDir: '.',
                  reportFiles: html_files.join(', '),
                  reportName: device_type + '-TestReport' + test_verdict
              ]
           test_verdict and device_type comes from a definition above which is not visible in the snippet so please ignore this

          Also a very plain implementation( See below ) shows the same:

           
              publishHTML target: [
                  allowMissing: false,
                  alwaysLinkToLastBuild: false,
                  keepAll: true,
                  reportDir: '.',
                  reportFiles: report.html
                  reportName: TestReport
              ]

           

          Tried also with useWrapperFileDirectly: true and no luck..

          Shreyas Ravishankar added a comment - - edited Thanks for the quick response, Jenkins update was 2.452.2 -> 2.462.3. Here is a snippet of ours which always worked before the update:   def html_files = [device_type + '-report.html', device_type + '-testautomation-link.html']     publishHTML target: [         allowMissing: false,         alwaysLinkToLastBuild: false,         keepAll: true,         reportDir: '.',         reportFiles: html_files.join(', '),         reportName: device_type + '-TestReport' + test_verdict     ]   test_verdict and device_type comes from a definition above which is not visible in the snippet so please ignore this Also a very plain implementation( See below ) shows the same:       publishHTML target: [         allowMissing: false,         alwaysLinkToLastBuild: false,         keepAll: true,         reportDir: '.',         reportFiles: report.html         reportName: TestReport     ]   Tried also with useWrapperFileDirectly: true and no luck..

          Basil Crow added a comment -

          Does downgrading to 1.36 solve the issue?

          Basil Crow added a comment - Does downgrading to 1.36 solve the issue?
          Shreyas Ravishankar made changes -
          Attachment New: Plugin_status.png [ 63645 ]

          Cant downgrade it as its not an option as its greyed out in the Jenkins plugin overview

          Shreyas Ravishankar added a comment - Cant downgrade it as its not an option as its greyed out in the Jenkins plugin overview

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

              Created:
              Updated: