lxieyang / chrome-extension-boilerplate-react

A Chrome Extensions boilerplate using React 18 and Webpack 5.
MIT License
3.6k stars 1.1k forks source link

SockJS Error #188

Open TonyMella opened 1 year ago

TonyMella commented 1 year ago

hello,I have encountered the following error, can you help me see what the problem is.thank you!

Uncaught runtime errors: ERROR SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS at new SockJS (chrome-extension://mkfffbnmdcjmekfjlfmfiebgagldcgde/contentScript.bundle.js:9679:13) at new SockJSClient (chrome-extension://mkfffbnmdcjmekfjlfmfiebgagldcgde/contentScript.bundle.js:7423:17) at initSocket (chrome-extension://mkfffbnmdcjmekfjlfmfiebgagldcgde/contentScript.bundle.js:14342:12) at ./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=localhost&port=3000&pathname=%2Fws&logging=info&overlay=true&reconnect=10&hot=true&live-reload=false (chrome-extension://mkfffbnmdcjmekfjlfmfiebgagldcgde/contentScript.bundle.js:7877:55) at options.factory (chrome-extension://mkfffbnmdcjmekfjlfmfiebgagldcgde/contentScript.bundle.js:17353:31) at __webpack_require__ (chrome-extension://mkfffbnmdcjmekfjlfmfiebgagldcgde/contentScript.bundle.js:16810:33) at chrome-extension://mkfffbnmdcjmekfjlfmfiebgagldcgde/contentScript.bundle.js:17928:11 at chrome-extension://mkfffbnmdcjmekfjlfmfiebgagldcgde/contentScript.bundle.js:17933:12

TonyMella commented 1 year ago

找到解决方法了,切记重启项目,如果还无法解决,将插件移除再次加载。https://github.com/lxieyang/chrome-extension-boilerplate-react/issues/150

Romstar commented 1 year ago

you can switch it to ws and it should work.