Firefox Websocket security issue

I fixed this. The app itself is under SSL but the websocket being accessed is not. Chrome and Opera don't care but Firefox does. According to:

https://bugzilla.mozilla.org/show_bug.cgi?id=303952

This is known and is not considered a bug. Mozilla's response: wontfix

Solution, put websocket server under SSL and use wss://


As you point out in another answer, https:// to ws:// is disallowed by default on firefox.

Going to firefox's about:config and toggling network.websocket.allowInsecureFromHTTPS will get rid of the SecurityError.


Had the same problem and attempted to fix by changing network.websocket.allowInsecureFromHTTPS in about:config which did not work.

Ended up finding this post => Unhandled Rejection (SecurityError): The operation is insecure. On a fresh create-react-app project

Changing this in index.js ended up working for me

serviceWorker.register();
//serviceWorker.unregister();