socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

ios 15.1.1 safari Unable to link

Open sandywk opened this issue 3 years ago • 11 comments

Error {type: "TransportError", description... description: Event {isTrusted: true} isTrusted: true proto: Event {type: (...), target: (...), current... type: "TransportError" column: 22 line: 64 message: "websocket error" stack: "@\n@\nclose@[native code]\n@\n@\n@\nclose@\n@\n@" proto: Error {}

WebSocket connection to 'wss://..../socket.io/?type=a&hash=b&EIO=3&transport=websocket' failed: WebSocket is closed before the connection is established.

"socket.io-client": "^2.3.0",

Ios14 can link normally Android is also all normal Please tell me what to do

sandywk avatar Jan 26 '22 06:01 sandywk

I'm having the same issue. Looks to be something to do with TLS but have not found a solution.

wejew avatar Jan 26 '22 17:01 wejew

@sandywk which version of the server are you using? Please see the compatibility table here: https://github.com/socketio/socket.io-client-swift/blob/master/Usage%20Docs/Compatibility.md

darrachequesne avatar Jan 26 '22 22:01 darrachequesne

The server version is the same as the client version @darrachequesne

node v10.19.0 "socket.io": "^2.3.0",

sandywk avatar Jan 27 '22 03:01 sandywk

@wejew I once thought it was a TLS problem, but after I tried many TLS solutions, I still couldn't solve this problem.

sandywk avatar Jan 27 '22 03:01 sandywk

@darrachequesne I link through the web

import io from 'socket.io-client'; io('wss://..../socket.io/?type=a&hash=b', { transports: ['websocket'] });

Several IOS 15 mobile phones have been tested, and safari has this problem

sandywk avatar Jan 27 '22 03:01 sandywk

@sandywk that's discouraging. I was thinking it was TLS because if you look at the headers on safari it doesn't have the host header. And I think AWS uses the host header in the TLS negotiation. I sure hope that someone has a solution for this soon. Like you, I have gone down many rabbit holes and wasted weeks of time trying to fix this in our apps.

wejew avatar Jan 28 '22 17:01 wejew

OK, so it seems to be a known bug with iOS 15 and WebSockets: https://developer.apple.com/forums/thread/685403

Related: https://github.com/react-native-webview/react-native-webview/issues/2281

darrachequesne avatar Mar 10 '22 10:03 darrachequesne

@darrachequesne @wejew @darrachequesne Upgrading to 15.4 has solved this problem

sandywk avatar Mar 16 '22 09:03 sandywk

IOS 15.4 Fixed this problem

sandywk avatar Mar 16 '22 09:03 sandywk

i have not experienced your luck with iOS 15.4 @sandywk

spencercap avatar Mar 30 '22 17:03 spencercap

IOS 15.5 has this problem

AlvinStefanus avatar Jun 19 '22 08:06 AlvinStefanus

I'm going to close this, as I don't think there is much we can do on our side.

Please reopen if needed.

darrachequesne avatar Jun 20 '23 14:06 darrachequesne