Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Opening Robot Framework log failed

If I open any .html file that generated by Robot Framework and try to convert it in any other format(for example, docx formate) using either any python code or inbuilt command line tool that are available. I am getting below error,

  1. 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 getting this error even though I have already enabled JavaScript in my browser.I am using Mozilla Firefox version 45.0.2 on mac.

Can anyone please help me to solve this issue?

like image 941
dharpatel Avatar asked Apr 13 '16 19:04

dharpatel


3 Answers

Answer is explained at Jenkins issue tracking system: https://issues.jenkins-ci.org/browse/JENKINS-32118

To resolve your problem you must :

  1. Connect on your Jenkins URL (http://[IP]:8080/)
  2. Click on Manage Jenkins from left side panel.
  3. Click on Script Console
  4. Copy this into the field
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' ;")
  1. Click on Run button.

  2. Execute your Jenkins build.

like image 198
Toral Avatar answered Oct 21 '22 22:10

Toral


I managed to make it work by editing the file /etc/sysconfig/jenkins and adding -Dhudson.model.DirectoryBrowserSupport.CSP= to the JENKINS_JAVA_OPTIONS setting. On my installation, the setting looks like

JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.model.DirectoryBrowserSupport.CSP= "

Then restart jenkins

service jenkins restart

Sources

https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy

System properties management

like image 7
Emil Salageanu Avatar answered Oct 21 '22 21:10

Emil Salageanu


We used to face same issue, however since we did not have access to jenkins, we could do it at client side be installing CSP plugin on chrome and enabling the plugin.

like image 5
Karthik Prasad Avatar answered Oct 21 '22 21:10

Karthik Prasad