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

Opening Robot Framework log failed

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: robot-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.642, Robot Framework plugin 1.6.2
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            romek_es Roman Solus created issue -
            oleg_nenashev Oleg Nenashev made changes -
            Field Original Value New Value
            Component/s robot-plugin [ 15773 ]
            Component/s _unsorted [ 19622 ]
            oleg_nenashev Oleg Nenashev made changes -
            Assignee Oleg Nenashev [ oleg_nenashev ] jpiironen [ jpiironen ]
            Hide
            martinotu martino tu added a comment -

            Same issue for me.

            Show
            martinotu martino tu added a comment - Same issue for me.
            Hide
            jimbojd72 Bob Lafortune added a comment -

            Same thing here

            Show
            jimbojd72 Bob Lafortune added a comment - Same thing here
            Hide
            guit Zeebee Z added a comment -

            On my chrome, 47.0.2526.106 m, the same bug

            Show
            guit Zeebee Z added a comment - On my chrome, 47.0.2526.106 m, the same bug
            Hide
            alexei38 Alexei Margasov added a comment -

            The bug appeared after I updated version jenkins from 1.616 to 1.625.3

            Show
            alexei38 Alexei Margasov added a comment - The bug appeared after I updated version jenkins from 1.616 to 1.625.3
            Show
            danielbeck Daniel Beck added a comment - This is likely a result of the security content in Jenkins 1.625.3 and 1.641: https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2015-12-09 https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy
            Hide
            jimbojd72 Bob Lafortune added a comment -

            Has suggested by the links provided, I was able to get around the issue by adding:
            java -Dhudson.model.DirectoryBrowserSupport.CSP= -jar jenkins.war

            In my service startup file.

            Show
            jimbojd72 Bob Lafortune added a comment - Has suggested by the links provided, I was able to get around the issue by adding: java -Dhudson.model.DirectoryBrowserSupport.CSP= -jar jenkins.war In my service startup file.
            Hide
            jovello Jhonny Peppy added a comment -

            Same issue from Jenkins ver. 1.643.

            Show
            jovello Jhonny Peppy added a comment - Same issue from Jenkins ver. 1.643.
            Hide
            tkahler Thorsten Kahler added a comment -

            This is a duplicate of JENKINS-32077.

            Show
            tkahler Thorsten Kahler added a comment - This is a duplicate of JENKINS-32077 .
            tkahler Thorsten Kahler made changes -
            Link This issue duplicates JENKINS-32077 [ JENKINS-32077 ]
            Hide
            danielbeck Daniel Beck added a comment - - edited

            Resolved the other issue and referred users back to this one.

            Show
            danielbeck Daniel Beck added a comment - - edited Resolved the other issue and referred users back to this one.
            danielbeck Daniel Beck made changes -
            Link This issue is duplicated by JENKINS-32077 [ JENKINS-32077 ]
            danielbeck Daniel Beck made changes -
            Link This issue duplicates JENKINS-32077 [ JENKINS-32077 ]
            Hide
            tapsa Tapio Reijonen added a comment -

            Same thing here, and -Dhudson.model.DirectoryBrowserSupport.CSP= temporary solve the problem

            Show
            tapsa Tapio Reijonen added a comment - Same thing here, and -Dhudson.model.DirectoryBrowserSupport.CSP= temporary solve the problem
            Hide
            selurvedu selur vedu added a comment - - edited

            In my case this helped:

            I added

            -Dhudson.model.DirectoryBrowserSupport.CSP=\"sandbox allow-scripts allow-same-origin; default-src 'none'; img-src 'self' data: ; style-src 'self' 'unsafe-inline' data: ; script-src 'self' 'unsafe-inline' 'unsafe-eval' ;\"
            

            to $JENKINS_JAVA_OPTIONS.

            JFYI, this is not a proper solution, just a workaround. It weakens a security feature called Content Security Policy. You need to be sure that disabling it is suitable for you.

            Show
            selurvedu selur vedu added a comment - - edited In my case this helped: I added -Dhudson.model.DirectoryBrowserSupport.CSP=\"sandbox allow-scripts allow-same-origin; default-src 'none'; img-src 'self' data: ; style-src 'self' 'unsafe-inline' data: ; script-src 'self' 'unsafe-inline' 'unsafe-eval' ;\" to $JENKINS_JAVA_OPTIONS . JFYI, this is not a proper solution, just a workaround. It weakens a security feature called Content Security Policy. You need to be sure that disabling it is suitable for you.
            Hide
            kalahari Blake MItchell added a comment -

            Thank you selur vedu, your work around works for me. But I always get nervous disabling security features, even for private sites behind a firewall. Is there a better long term solution for this issues, will the robot framework people need to be involved?

            Show
            kalahari Blake MItchell added a comment - Thank you selur vedu , your work around works for me. But I always get nervous disabling security features, even for private sites behind a firewall. Is there a better long term solution for this issues, will the robot framework people need to be involved?
            Hide
            yang928 Yang Li added a comment - - edited

            same issue, any updates on this? I am using Ubuntu
            SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
            Jenkins 2.0

            Show
            yang928 Yang Li added a comment - - edited same issue, any updates on this? I am using Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Jenkins 2.0
            zilahir Richard Zialhi made changes -
            Comment [ hi guys. i am still facing this issue, after updating the java options, as suggested above:

            echo $JENKINS_JAVA_OPTIONS
            -Dhudson.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' ;"

            any idea would be really appreciated. ]
            tarik_remous Tarik Remous made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Assignee jpiironen [ jpiironen ] Tarik Remous [ tarik_remous ]
            Resolution Fixed [ 1 ]
            tarik_remous Tarik Remous made changes -
            Comment [ For resolve your problem you must :
             - Connect on your jenkins url (http://[IP]:8080/)
             - Click on administer Jenkins
             - Click on consol jenkins
             - Copy this into the field and execute :
                       {color:#d04437}_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' ;")_{color}

            ]
            tarik_remous Tarik Remous made changes -
            Comment [ For resolve your problem you must :

                Connect on your jenkins url (http://[IP]:8080/)
                Click on administer Jenkins
                Click on consol jenkins
                Copy this into the field and execute :
                _{color:#d04437}*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' ;")*{color}_

            ]
            Hide
            tarik_remous Tarik Remous added a comment -

            For resolve your problem you must :

            Connect on your jenkins url (http://[IP]:8080/)
            Click on administer Jenkins
            Click on consol jenkins
            Copy this into the field and execute :
            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' ;")

            Show
            tarik_remous Tarik Remous added a comment - For resolve your problem you must : Connect on your jenkins url ( http://[IP]:8080/ ) Click on administer Jenkins Click on consol jenkins Copy this into the field and execute : 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' ;")
            Hide
            danielbeck Daniel Beck added a comment -

            Tarik Remous As this undermines an important security feature, it cannot be more than a short to medium term workaround until the plugin is adapted in some way to handle it. Please reconsider your stance.

            Show
            danielbeck Daniel Beck added a comment - Tarik Remous As this undermines an important security feature, it cannot be more than a short to medium term workaround until the plugin is adapted in some way to handle it. Please reconsider your stance.
            tarik_remous Tarik Remous made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            Hide
            selurvedu selur vedu added a comment -

            I just updated my answer, in essence, I added allow-same-origin after sandbox allow-scripts. That is needed to make report.html work properly in Chromium-based browsers (no test cases were shown in report.html). I think this should be in Tarik Remous's answer as well.

            Show
            selurvedu selur vedu added a comment - I just updated my answer, in essence, I added allow-same-origin after sandbox allow-scripts . That is needed to make report.html work properly in Chromium-based browsers (no test cases were shown in report.html). I think this should be in Tarik Remous 's answer as well.
            Hide
            markhu Mark Hudson added a comment -

            FWIW, Safari has the same issue. Another workaround is using wget or curl to grab the file onto another server, and view the log.html files there.

            Show
            markhu Mark Hudson added a comment - FWIW, Safari has the same issue. Another workaround is using wget or curl to grab the file onto another server, and view the log.html files there.
            Hide
            ecelgp Luis Gomez added a comment -

            This issue is impacting the OpenDaylight project, from what I see here the proposed solutions are temporary workarounds that btw did not work in our environment. So any plan to fix this in the robot-plugin code?

            Show
            ecelgp Luis Gomez added a comment - This issue is impacting the OpenDaylight project, from what I see here the proposed solutions are temporary workarounds that btw did not work in our environment. So any plan to fix this in the robot-plugin code?
            Hide
            causten Chris Austen added a comment -

            Same problem, is there a way to back off from this version? This breaks my org's excitement over Jenkins and Robot

            Show
            causten Chris Austen added a comment - Same problem, is there a way to back off from this version? This breaks my org's excitement over Jenkins and Robot
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 167601 ] JNJira + In-Review [ 186336 ]
            uriesk Andreas Gattringer made changes -
            Comment [ Same problem.
            I tried your workaround and it works on Firefox, Internet Explorer and Edge, but it doesn't work on chrome. ]
            Hide
            haison8x Jacob Phan added a comment -

            To workaround in firefox:
            Go to page about:config
            Set security.csp.enable = false

            Show
            haison8x Jacob Phan added a comment - To workaround in firefox: Go to page about:config Set security.csp.enable = false
            Hide
            gpsingh Gurpreet Singh added a comment -

            For chrome we can use this plugin: Disable Content-Security-Policy

            Show
            gpsingh Gurpreet Singh added a comment - For chrome we can use this plugin: Disable Content-Security-Policy
            Hide
            danielbeck Daniel Beck added a comment -

            Tarik Remous FYI I have a work in progress library plugin that has already been incorporated in Cucumber Reports Plugin to make it work. You may be able to adapt that approach for your plugin.

            https://github.com/daniel-beck/jenkins-checksum-archive-demo-plugin
            https://github.com/jenkinsci/cucumber-reports-plugin/pull/66

            While archiving HTML reports and serving them verbatim is still (and will remain) a flawed approach for Jenkins, this is at least an improvement over the current implementation (with CSP having to be disabled on the Jenkins side).

            Show
            danielbeck Daniel Beck added a comment - Tarik Remous FYI I have a work in progress library plugin that has already been incorporated in Cucumber Reports Plugin to make it work. You may be able to adapt that approach for your plugin. https://github.com/daniel-beck/jenkins-checksum-archive-demo-plugin https://github.com/jenkinsci/cucumber-reports-plugin/pull/66 While archiving HTML reports and serving them verbatim is still (and will remain) a flawed approach for Jenkins, this is at least an improvement over the current implementation (with CSP having to be disabled on the Jenkins side).
            Hide
            edsherwin Ed Sherwin Nonog added a comment -

            Hi everyone, any solution on this problem? Thanks

            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.

            Show
            edsherwin Ed Sherwin Nonog added a comment - Hi everyone, any solution on this problem? Thanks 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.
            Hide
            gpsingh Gurpreet Singh added a comment -

            Ed Sherwin Nonog

            To workaround in firefox:
            Go to page about:config
            Set security.csp.enable = false

            For chrome we can use this plugin: Disable Content-Security-Policy

            Show
            gpsingh Gurpreet Singh added a comment - Ed Sherwin Nonog To workaround in firefox: Go to page about:config Set security.csp.enable = false For chrome we can use this plugin: Disable Content-Security-Policy
            selurvedu selur vedu made changes -
            Link This issue is duplicated by JENKINS-38338 [ JENKINS-38338 ]
            Hide
            edsherwin Ed Sherwin Nonog added a comment -

            Gurpreet Singh

            This works for me. Thanks a lot.

            Show
            edsherwin Ed Sherwin Nonog added a comment - Gurpreet Singh This works for me. Thanks a lot.
            Hide
            vipsaran Robert Saric added a comment -

            A more universal workaround is described [here](http://stackoverflow.com/a/36996036/451962).

            To fix this error add below entry to Jenkins configuration file (jenkins.xml):
            -Dhudson.model.DirectoryBrowserSupport.CSP=
            and restart Jenkins (with http://(jenkins_url)/safeRestart).

            Show
            vipsaran Robert Saric added a comment - A more universal workaround is described [here] ( http://stackoverflow.com/a/36996036/451962 ). To fix this error add below entry to Jenkins configuration file (jenkins.xml): -Dhudson.model.DirectoryBrowserSupport.CSP= and restart Jenkins (with http://(jenkins_url)/safeRestart ).
            Hide
            alec_m Alec Matschiner added a comment -

            I've been using SCP plugin to publish the resulting log.html out to a directory I can grab it from. Sort of a way of dealing with this. However it would be extremely nice to be able to have this working without a work around. Is there any update on this?

            Show
            alec_m Alec Matschiner added a comment - I've been using SCP plugin to publish the resulting log.html out to a directory I can grab it from. Sort of a way of dealing with this. However it would be extremely nice to be able to have this working without a work around. Is there any update on this?
            alec_m Alec Matschiner made changes -
            Attachment Selection_243.png [ 35127 ]

              People

              • Assignee:
                tarik_remous Tarik Remous
                Reporter:
                romek_es Roman Solus
              • Votes:
                34 Vote for this issue
                Watchers:
                51 Start watching this issue

                Dates

                • Created:
                  Updated: