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
Devtools can't open on Electron #273
Labels
need reproduction
Reproduction is needed
Comments
Can you provide a mini repo? thanks 🙏 |
@major697 Hi, can you upgrade to the latest version and try again? |
I have updated to the latest version (7.0.20). Works fine, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have app in Electron, Vite and Vue3.
This is my dependencies:
When I try open Devtools, I have an error in console:
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' 'unsafe-inline'".
Inside index.html file I have:
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
Whe I change this to this:
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-eval';" />
The Electorn return error:
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-oQFZCLbDrsnK+JwZN6u488PGfhj52jozs93UXp01Puo='), or a nonce ('nonce-...') is required to enable inline execution.
I back to 7.0.15, but still I have this same errors.
The text was updated successfully, but these errors were encountered: