lxieyang / chrome-extension-boilerplate-react

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

index.js:1205 Uncaught Error: SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS #149

Open hungdev opened 1 year ago

hungdev commented 1 year ago

I get the error. please tell me how to fix it?

image
anass-qalqul commented 1 year ago

is there any fix for that error ?

lxieyang commented 1 year ago

Hmm, I haven't been able to reproduce. Would you try adding https: false to the webserver config?

ReAlign commented 1 year ago

content script error, when open a third-part page:

image
ReAlign commented 1 year ago

Anyone help?

kalyncoose commented 1 year ago

This is definitely an issue with the WebPack or Web Dev Server and I am not proficient enough at either to know how to fix it.

websocket-error

However I cloned @octohedron's updated fork with a completely custom web server. I was able to install, unpack, and try it out and it had no web socket errors and the content scripts loaded without issues and I could see the console logs it does from the template.

amitava82 commented 1 year ago

Yes this is an issue with content script not loading on any page due to this error

hadnet commented 1 year ago

This error still happens. Any update to fix this issue?

uri3000 commented 1 year ago

Content script not working due to this... it kind of makes the whole boilerplate unusable. any help?

kalyncoose commented 1 year ago

@hadnet @uri3000 Use this fork instead, it has a better and working dev server.

shawnvoss commented 1 year ago

In webserver.js, change https property to true **. This will get things working, even though you will still see errors on the console. Probably need to configure a local cert to completely silence this, but at least the content script will be loading/running.

** Better yet, replace https: true with server: 'https', as the https property is deprecated.

Suket-shah commented 1 year ago

Was anyone able to configure the local cert to silence the error?

** Edit: by making the change @shawnvoss suggests, the error no longer appears