[Feature Request] [Issue #279] Error in runEval code: Refused to evaluate a string as JavaScript because 'unsafe-eval'

Chrome:

[error]

Error in runEval code: Refused to evaluate a string as JavaScript because ‘unsafe-eval’ is not an allowed source of script in the following Content Security Policy directive: “script-src ‘self’ ‘sha256-ryoU+5+IUZTuUyTElqkrQGBJXr1brEv6r2CA62WUw8w=’ https://js.stripe.com https://js.braintreegateway.com https://www.paypalobjects.com”.

None of these domains is referenced on the page I’m loading.
“https://js.stripe.com https://js.braintreegateway.com https://www.paypalobjects.com”

I’ve figured out this happens when I switch between tabs. If I stay on the tab where the main part of the script was happening and increment i before switching to the next one this error goes away.

This is the same issue as

Workaround: See JSON.stringify error while looping input file - #2 by admin - UI.Vision RPA - UI.Vision RPA Software Forum | Discuss RPA Automation, Selenium IDE and OCR API Text Recognition

The planned solution is to introduce a command like “ExecuteJSinSandbox”.

1 Like

Meanwhile available as executeScript_Sandbox