'Desktop Safari websockets hangs on connection. All others (including iOS) work

My websocket connection works:

  • When testing on localhost on Desktop Chrome, Desktop Safari, and iOS
  • When testing on production on Desktop Chrome and iOS.

It DOES NOT work:

  • When testing on production on Desktop Safari

There are no console errors in the browser. I can see the websocket is created, but it never fires "open" event on Desktop Safari. On the server side, the connection comes through fine everywhere other than from Desktop Safari, where I don't see anything come in.

The websocket is on the exact domain as the origin, and both are using secure connection (https/wss)

There are a lot of moving parts on production (e.g. load balancer). I've looked at and configured things like "stickiness" and TLS versions on each layer in production.

Again, it works most places.

I'm thinking there must be something like TLS, CORS, etc that I'm not fulling understanding that is causing the breakdown.

This is what happens on iOS (and about the same in Chrome desktop, etc):

enter image description here

This is what happens in Desktop Safari on Mac:

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source