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

Document Jenkins security settings so Robot Framework log/report can be opened

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • robot-plugin
    • None
    • Jenkins 1.642, Robot Framework plugin 1.6.2
    • 2.1.2

      When trying to open Robot Framework log (or report) I get an error in my browser:
      "...
      Opening Robot Framework log failed

      Verify that you have JavaScript enabled in your browser.
      Make sure you are using a modern enough browser. Firefox 3.5, IE 8, or equivalent is required, newer browsers are recommended.
      Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
      ..."

      I am using Firefox v. 43 where javascript.enabled is true.

       

      EDIT:

      Per danielbeck in this comment, a possible solution to study is used in Cucumber-plugin: https://github.com/jenkinsci/cucumber-reports-plugin/pull/66/files

          [JENKINS-32118] Document Jenkins security settings so Robot Framework log/report can be opened

          Bassam Khouri added a comment -

          Jenkins implemented CSP for valid security reasons.  So I'm changing the priority from Major to Critical as the ideal of circumventing CSP is alot less than ideal.

          Bassam Khouri added a comment - Jenkins implemented CSP for valid security reasons.  So I'm changing the priority from Major to Critical as the ideal of circumventing CSP is alot less than ideal.

          Tatu Kairi added a comment -

          Possbile solution to study used in Cucumber-plugin:

          https://github.com/jenkinsci/cucumber-reports-plugin/pull/66/files

          Tatu Kairi added a comment - Possbile solution to study used in Cucumber-plugin: https://github.com/jenkinsci/cucumber-reports-plugin/pull/66/files

          Still facing the issue in Jenkins ver. 2.107.2 for opening report.html of Robot framework.
          Log.html file is coming after workaround suggested, but report.html still displays the same error

          Subodh Agnihotri added a comment - Still facing the issue in Jenkins ver. 2.107.2 for opening report.html of Robot framework. Log.html file is coming after workaround suggested, but report.html still displays the same error

          Tatu Kairi added a comment - - edited

          subodh2691 the workaround does work, though. I'd suggest you double check have you employed it correctly.

          Tatu Kairi added a comment - - edited subodh2691 the workaround does work, though. I'd suggest you double check have you employed it correctly.

          Yeah it worked. There was a caching issue which was resolved later. I will mark this closed

          Subodh Agnihotri added a comment - Yeah it worked. There was a caching issue which was resolved later. I will mark this closed

          Tatu Kairi added a comment -

          Should not have been closed to begin with

          Tatu Kairi added a comment - Should not have been closed to begin with

          Tatu Kairi added a comment -

          subodh2691 This is not your issue, why on earth do you think you can close it?!

          Tatu Kairi added a comment - subodh2691 This is not your issue, why on earth do you think you can close it?!

          Dinesh J added a comment -

          does anybody have permanent solution for this? I can able to resolve this as temporary by adding following in the script console in manage Jenkins System.setProperty("hudson.model.DirectoryBrowserSupport.CSP","sandbox allow-scripts; default-src 'none'; img-src 'self' data: ; style-src 'self' 'unsafe-inline' data: ; script-src 'self' 'unsafe-inline' 'unsafe-eval' ;") but every time Jenkins server restart changes disappeared. any permanent solution for this?

          Dinesh J added a comment - does anybody have permanent solution for this? I can able to resolve this as temporary by adding following in the script console in manage Jenkins System.setProperty("hudson.model.DirectoryBrowserSupport.CSP","sandbox allow-scripts; default-src 'none'; img-src 'self' data: ; style-src 'self' 'unsafe-inline' data: ; script-src 'self' 'unsafe-inline' 'unsafe-eval' ;") but every time Jenkins server restart changes disappeared. any permanent solution for this?

          My team gave up on doing the work around. We just shuffle the robot logs off to a different storage static web host, along with a lot of logs that Jenkins doesn't capture for us anyway.

           

           

          Andrew Grimberg added a comment - My team gave up on doing the work around. We just shuffle the robot logs off to a different storage static web host, along with a lot of logs that Jenkins doesn't capture for us anyway.    

          Aleksi Simell added a comment -

          dinesh18 Since Jenkins 2.200, it has encouraged the use of a Resource Root URL to show external resources (such as Robot Framework log.html). I've updated the plugin documentation, which has a link to Configuring content security policy.

          Since the ticket is about adding documentation, I'm closing this as done.

          Aleksi Simell added a comment - dinesh18 Since Jenkins 2.200, it has encouraged the use of a Resource Root URL to show external resources (such as Robot Framework log.html). I've updated the plugin documentation, which has a link to Configuring content security policy . Since the ticket is about adding documentation, I'm closing this as done.

            aleksisimell Aleksi Simell
            romek_es Roman Solus
            Votes:
            51 Vote for this issue
            Watchers:
            68 Start watching this issue

              Created:
              Updated:
              Resolved: