Sev Kni
Katalon Apprentice
04/08/2018

Getting Content Security Policy errors now

Hey guys,

I'm running into this error sometimes (but not always, oddly) that's causing my runScript commands to fail:

Refused to execute inline script because it violates the following Content Security Policy directive

What's strange is I have three Katalon test cases using the exact same JS - two fail with the above error but one of them works fine.

Any ideas?
Upvote
Quote

Comments

  • Alex
    Katalon Moderator
    04/16/2018
    Thank you for using our product.

    Were three Katalon test cases executed against the web application? If possible, could you please share the scripts with us - that would help us a lot in debugging? You can send them to info@katalon.com.
    Upvote
    Quote
  • Sev Kni
    Katalon Apprentice
    04/24/2018
    @Alex Just emailed a test script, sorry for the delay. Thanks!
    Upvote
    Quote
  • Alex
    Katalon Moderator
    05/07/2018
    edited May 7
    Hi,

    Thank you so much for the test script - we really appreciate your help. We are looking for a solution right now. Technically, it's possible to overwrite CSP rules with add-ons, but it would be insecure to do that on every web page.

    For now, to work around the issue, users can use a third-party add-on (e.g. Disable Content-Security-Policy https://chrome.google.com/webstore/detail/disable-content-security/ieelmcmcagommplceebfedjlakkhpden?hl=en) to disable CSP rules, then execute the test in KR as usual. Don't forget to disable that add-on when unused.
    Upvote
    Quote
  • Alex
    Katalon Moderator
    05/07/2018
    We've added this question to the FAQ #5 https://docs.katalon.com/x/7gHR. Thank you again for you feedback.
    Upvote
    Quote
Sign In or Register to comment.