multinet-app / multinet-server

Multinet server application
https://multinet-app.readthedocs.io
Apache License 2.0
4 stars 2 forks source link

Web socket connection errors on the main site #194

Closed JackWilb closed 4 years ago

JackWilb commented 4 years ago

There seems to be an infinitely looping error on my machine where firefox (also verified that this happens in chrome) keeps trying to connect to a websocket. This goes on until I close the page. The full error is below. Is this caused by webpack thinking that it's a dev server and not the prod server?

[HMR] Waiting for update signal from WDS... log.js:24
Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools vue.runtime.esm.js:8423
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost/sockjs-node/info?t=1571939363350. (Reason: CORS request did not succeed).
[WDS] Disconnected! client:172
Firefox can’t establish a connection to the server at wss://multinet.app/sockjs-node/962/ksvg3vlb/websocket. app.js line 4559 > eval:1684:9
Invalid Host/Origin header index.js:169
[WDS] Disconnected! index.js:172
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost/sockjs-node/info?t=1571939364427. (Reason: CORS request did not succeed).
Firefox can’t establish a connection to the server at wss://multinet.app/sockjs-node/276/tyabz3t0/websocket. app.js line 4559 > eval:1684:9
Invalid Host/Origin header index.js:169
[WDS] Disconnected! index.js:172
Firefox can’t establish a connection to the server at wss://multinet.app/sockjs-node/560/xdoyxtiw/websocket. app.js line 4559 > eval:1684:9
Invalid Host/Origin header index.js:169
[WDS] Disconnected! index.js:172
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost/sockjs-node/info?t=1571939366542. (Reason: CORS request did not succeed).
Firefox can’t establish a connection to the server at wss://multinet.app/sockjs-node/442/am5ewrda/websocket. app.js line 4559 > eval:1684:9
Invalid Host/Origin header index.js:169
JackWilb commented 4 years ago

Any ideas what might be causing this @waxlamp?

waxlamp commented 4 years ago

This happens when you visit multinet.app from your browser?

waxlamp commented 4 years ago

It definitely looks like it's what you said, coming from the webpack dev server.

I think we can resolve this sort of thing by being more careful about how we serve our production sites.

waxlamp commented 4 years ago

Now that we're serving in production mode from our deployment, this is fixed.