Error: Opening Robot Framework log failed

前端 未结 8 1658
無奈伤痛
無奈伤痛 2021-02-04 02:50

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 l

相关标签:
8条回答
  • 2021-02-04 03:19

    The configuration change persists for me with Jenkins 2.235.2 installed via yum on CentOS 7 by placing the following content in a new file at $JENKINS_ROOT/init.groovy, changing ownership of the file to the jenkins user, and then restarting Jenkins with service jenkins restart

    import jenkins.model.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' ;");
    
    0 讨论(0)
  • 2021-02-04 03:26

    Please follow these steps to configure content security policies around Jenkins should resolve this issue: 1. Go to Jenkins 2. Click on Manage Jenkins 3.Click on Script Console 4.Enter unset header text shown in content security policies: System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")

    Click Run

    The output should just show Result. If you see any thing other than this, that mean content policy is not updated successfully

    If you are still facing the issue, please add the error details, what you tried, so we would be able to help you

    0 讨论(0)
  • 2021-02-04 03:29

    The easiest thing to do is (if there are no worries on security aspects) also a permanent fix.

    1. open the jenkins.xml file and

    2. add the following

      <arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dhudson.model.DirectoryBrowserSupport.CSP="" -jar "%BASE%\jenkins.war" -- httpPort=8080 --webroot="%BASE%\war"</arguments>

    3. restart the jenkins server

    4. rerun your jenkins jobs to see the result files.

    If we are using the script console, every time you restart the jenkins server, the changes will be lost.

    0 讨论(0)
  • 2021-02-04 03:34

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

    For 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' ;")

    5. Click on Run button.

    6. Execute your Jenkins build.

    0 讨论(0)
  • 2021-02-04 03:34

    The accepted answer works for me but is not persistent. To make it persistent, modify the file /etc/default/jenkins and after JAVA_ARGS line, add the following line:

    JAVA_ARGS="$JAVA_ARGS -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' ;\""

    Change will apply and be persistent after reboot

    0 讨论(0)
  • 2021-02-04 03:36

    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.

    0 讨论(0)
提交回复
热议问题