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

以前能正常运行的包,现在报错 #41

Open
boringtu opened this issue Jan 5, 2025 · 2 comments
Open

以前能正常运行的包,现在报错 #41

boringtu opened this issue Jan 5, 2025 · 2 comments

Comments

@boringtu
Copy link

boringtu commented Jan 5, 2025

问题描述:

同样的源码编译后的chrome扩展,以前可以正常运行,现在跑不起来,报错:

image

Refused to load the script 'chrome-extension://2f188206-574c-4001-82fa-ac39af35e072/assets/index.1a64a8ba.js' because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

@boringtu boringtu closed this as completed Jan 5, 2025
@boringtu boringtu reopened this Jan 5, 2025
@boringtu
Copy link
Author

boringtu commented Jan 5, 2025

刚才查了一下,应该是大概在2024年10月份前后的 Chrome 130版本的更新,对Chrome扩展做了进一步的限制,导致chrome.runtime.getURL不能正常加载content-script
我尝试Fork处理一下~

@boringtu
Copy link
Author

boringtu commented Jan 5, 2025

@Jervis2049 我提了个PR,你看下 #42

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

1 participant