Mattermost, Inc.

[SOLVED] SocketCluster stopping load on Firefox

Summary

SocketCluster is connecting to 'ws://localhost:5678/socketcluster/' when it shouldn’t be connecting at all, or at the least, connecting to 'wss://localhost:5678/socketcluster/' - Firefox, in particular, prevents loading of the page when this happens, siting: SecurityError: The operation is insecure. in sctransport.js line 10

Details

Currently running v5.0.0 of a modified MM server and app (takes a while to update to newer versions) and when I deploy MM to my testing server I get the above errors. The full error in Chrome is: WebSocket connection to 'ws://localhost:5678/socketcluster/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED. Not only am I not entirely sure as to why it’s trying to connect to my localhost at all, but on Firefox (Mac) it stops the loading of the site entirely, presumably because it’s trying to connect over ws instead of wss. I disabled logging and remote web-socket debugging from the console, in an attempt to prevent this behaviour, but that didn’t make a difference. Does anyone have any ideas?

As a note, it’s connecting correctly the web-sockets of the MM server app just fine, this is something different.

I appreciate any help.

Kind regards,
Mike

Fixed this. The last build I made of the web-app wasn’t using a production build of React, hence why devToolsEnhancer was being used, which is where this issue was coming from.