-
Notifications
You must be signed in to change notification settings - Fork 15
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
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'". #10
Comments
Mmm... seems it is caused by proxy settings. I just delete the proxy setting from apm, now it stops throwing errors. |
Is there anyway to let atom json works behind proxy? It begins to throw all kinds of parsing errors when I try it at work. Make it impossible to edit .json files. |
I'm getting the same error message, but i'm not behind the proxy. @melcloud, why do You think it is related to using proxy server? My stack trace is quite similar, with some line defferences that may be caused by version difference (you can see the diff from https://www.diffchecker.com/kxba1ch9 for one month). Maybe it helps to reproduce the issue:
|
@atsu85 Like I said, once I delete the proxy setting from apm, everything works. But it seems to be fixed in the latest release. I would close this for now. |
as far as i know, I wasn't using proxy :/ How exactly You deleted proxy settings from apm?
As i said, i tried version 0.1.13, that seems to be the latest version |
sounds like it may be an issue with CSP... I'll try and look at this soon. |
Same error here. I'm not behind any proxy or corporate firewall. Dup: #15 Atom 1.2.0-beta1 |
Also getting this message. |
I just installed the Atom json-schema package (0.1.15) tonight and am seeing the same error trying to edit my package.json file. |
Editing JSON files with these error messages has become untenable (every key press spawns an error). |
Any leads here, @david-driscoll ? |
I have this error right now:
|
I am receiving these errors any time I try editing my tsconfig.json file and I am not getting any intellisense. When I disable atom-json-schema the errors go away.
|
It looks like this was supposed to be fixed by e68e8e9, but it doesn't seem to have worked. I was able to hack the makeValidator function in ~/.atom/packages/json-schema/lib/schema-linter.js to:
which did seem to fix the problem. |
I've applied your code, @rjmunro but I still get the EvalError |
Got following error when trying to edit .json file after upgrading to 0.1.13.
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'".
at Function (native)
at Function.line.toFunction (c:\home.atom\packages\json-schema\node_modules\is-my-json-valid\node_modules\generate-function\index.js:55:21)
at compile (c:\home.atom\packages\json-schema\node_modules\is-my-json-valid\index.js:543:23)
at visit (c:\home.atom\packages\json-schema\node_modules\is-my-json-valid\index.js:326:16)
at c:\home.atom\packages\json-schema\node_modules\is-my-json-valid\index.js:523:9
at Array.forEach (native)
at visit (c:\home.atom\packages\json-schema\node_modules\is-my-json-valid\index.js:520:31)
at compile (c:\home.atom\packages\json-schema\node_modules\is-my-json-valid\index.js:537:3)
at module.exports (c:\home.atom\packages\json-schema\node_modules\is-my-json-valid\index.js:564:10)
at c:\home.atom\packages\json-schema\lib\schema-linter.js:45:12
at memoized (C:\Users\yzhang\AppData\Local\atom\app-1.0.9\resources\app.asar\node_modules\babel-core\node_modules\lodash\index.js:7912:27)
at MapObservable.selector (c:\home.atom\packages\json-schema\lib\schema-linter.js:56:49)
at c:\home.atom\packages\json-schema\node_modules\rx\dist\rx.js:4785:67
at tryCatcher (c:\home.atom\packages\json-schema\node_modules\rx\dist\rx.js:567:29)
at InnerObserver.onNext (c:\home.atom\packages\json-schema\node_modules\rx\dist\rx.js:4806:43)
at InnerObserver.tryCatcher (c:\home.atom\packages\json-schema\node_modules\rx\dist\rx.js:567:29)
The text was updated successfully, but these errors were encountered: