New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js_interop test failing with content security policy (csp) on dart2js #31082

Open
whesse opened this Issue Oct 12, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@whesse
Member

whesse commented Oct 12, 2017

The failure is because we have JS code in a string. There is another issue that mentions this error, and suggests a fix: #19329

This is reproducible with: tools/test.py --mode=release --arch=x64 --compiler=dart2js --runtime=chrome --csp --use-sdk dart2js_extra/js_interop_test

Also drt and firefox, probably all browsers, give the error.

The error that we are getting is:

"type": "sync_exception",
"value": "Exception: EvalError: 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'".\n\nStack: EvalError: 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'".\n\n at a2.P.a2.b9 (http://127.0.0.1:38683/root_build/generated_compilations/dart2js-checked-minified-csp-sdk/tests_compiler_dart2js_extra_js_interop_test/test.js:3360:106)

@whesse

This comment has been minimized.

Show comment
Hide comment
@whesse

whesse Oct 12, 2017

Member

This seems to have started with the land of https://dart-review.googlesource.com/c/sdk/+/12460
@efortuna

Member

whesse commented Oct 12, 2017

This seems to have started with the land of https://dart-review.googlesource.com/c/sdk/+/12460
@efortuna

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment