matrix icon indicating copy to clipboard operation
matrix copied to clipboard

WebSocket handshake: Unexpected response code: 400

Open bgbraga opened this issue 4 years ago • 5 comments

Description

Browser / Javascript Console Error: morpheus-526f73e90268c8a4ff10.js:54 WebSocket connection to 'wss://matrix...........&transport=websocket&sid=....... failed: Error during WebSocket handshake: Unexpected response code: 400

Steps to Reproduce

  1. Deploy matrix to GCP Cloud Run
  2. Use matrix
  3. See Browser Console Log

Possible Solution

  • I this it is happening because websocket is not supported at Cloud Run: https://github.com/ahmetb/cloud-run-faq#are-websockets-supported-on-cloud-run https://cloud.google.com/run/docs/issues

Have you tested matrix in another GCP (App Engine, GKE) or AWS environment? Any steps or concerns about deployment?

bgbraga avatar Mar 21 '20 18:03 bgbraga

Hi, @bgbraga thanks for this report.

In our production environment, we are running in GCP using Kubernetes and we don't have this error. But I just deployed using a 'Google Cloud Button' in the README.md file in the us-central1 region and in the console I can see the same error.

failed: Error during WebSocket handshake: Unexpected response code: 400

But I notice the socket.io change to long pulling connection way and the main features are working well.

In your environment, is something not working well?

juliemar avatar Mar 21 '20 21:03 juliemar

I can't invite someone to meeting room. I don't know if it is related with WebSocket.

At this medium post ( that now I'm seeing that you as the author ;) ) I see some options like GET menu that is not appearing to me. https://medium.com/rd-shipit/matrix-d4cfc4ad4c75

Do you suggest me to forgot "Google Cloud Button" for a while and deploy using GKE? Are you using GKE standard or Cloud Run for GKE?

bgbraga avatar Mar 21 '20 22:03 bgbraga

I can't invite someone to meeting room. I don't know if it is related with WebSocket.

This function is not supported in the Morpheus layout. There is an issue reporting this problem :)

Do you suggest me to forgot "Google Cloud Button" for a while and deploy using GKE?

You can continue using the "Google Cloud Button" for deploy in Google Cloud Run.

Are`` you using GKE standard or Cloud Run for GKE?

In the Resultados Digitais, we are using GKE and we created on Spinnaker our pipeline deploy

juliemar avatar Mar 21 '20 22:03 juliemar

Ok. I comment there to see if there a way to use the previous layout instead of Morpheus. Thanks

bgbraga avatar Mar 21 '20 23:03 bgbraga

Same issue here.

Deployed on-premise using Docker. #matrix work just fine besides some users keeping getting disconnected (which is somewhat annoying since the "enter room" notification keeps popping up all the time).

Great tool anyway.

igortg avatar May 13 '20 11:05 igortg