3
votes

We have jenkins setup configured with 1 Master and 3 slaves using SSH. Accessing jenkins via VPN, since placed in remote location.

We are able to log in, create jobs, Execute jobs successfully and got reports in email as well. But, logs are unable to open and throwing an error Opening Robot Framework report failed with asking to check the browser and java script log.

I have inspected the issue found below error Blocked script execution in 'http://xx.xx.3.9:8080/job/API_External_Staging/66/robot/report/report.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.

Screen shot attached for reference. I believe some where we need to enable this permission. If any body as solution please let me know.

RBF_Jenkins_Report_error

Thanks

2

2 Answers

2
votes

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

0
votes

You have to edit /etc/default/jenkins if your Jenkins instance is on linux.

  • Add following lines to your config file:

    JAVA_ARGS="-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' ;\"
    
  • Restart Jenkins:

    sudo service jenkins start
    

This is only a workaround please read linked Jira ticket for further information.

https://issues.jenkins-ci.org/browse/JENKINS-32118