Skip to content
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

Extension fails to start due to CSP error #22

Closed
Spurlos opened this issue Sep 27, 2024 · 8 comments
Closed

Extension fails to start due to CSP error #22

Spurlos opened this issue Sep 27, 2024 · 8 comments

Comments

@Spurlos
Copy link

Spurlos commented Sep 27, 2024

Using Chrome Beta 130 and I have started getting the following error while the extension tires to start:

Refused to load the script 'chrome-extension://6f71604d-c584-491e-9c77-58aca79e2ce1/assets/main.tsx-f6dd0cda.js' because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
main.tsx-loader-971cff2c.js:8

It seems a misconfiguration of Manifest V3 for the CSP policies.
image

Unfortunately i can't go back to Chrome stable, but I believe it has\will get the same behaviour when v130 lands in stable.

@Spurlos
Copy link
Author

Spurlos commented Oct 5, 2024

Core issue documented at crxjs/chrome-extension-tools#918

Example fix during build process from a similar extension: Zortrox/steamchecker@f06f4b2#diff-2f655a9559f7bbabd6e1f6035dc69cf3e3078491d348ecc40aefd178be735506R2

@richard-jr-lewis
Copy link

I can confirm the above issue. I am not on a Chrome Beta. This is happening on version 130.0.6723.70.

@Haaxor1689
Copy link
Owner

thank you for reporting, I'll hopefully be able to get to it in coming days, was super busy past few months

@richard-jr-lewis
Copy link

No worries, I appreciate the hard work you've put into this.

@Spurlos
Copy link
Author

Spurlos commented Nov 1, 2024

thank you for reporting, I'll hopefully be able to get to it in coming days, was super busy past few months

Busy dev here also. I feel you! Keep up the good work!

@Spurlos
Copy link
Author

Spurlos commented Nov 10, 2024

The core issue has been fixed in the crxjs/chrome-extension-tools#918

@richard-jr-lewis
Copy link

I can see it's been fixed in 3.1. This issue can be closed. 🎉

@Haaxor1689
Copy link
Owner

thank you for verifying :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants