Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios 15.1.1 safari Unable to link #4263

Closed
sandywk opened this issue Jan 26, 2022 · 12 comments
Closed

ios 15.1.1 safari Unable to link #4263

sandywk opened this issue Jan 26, 2022 · 12 comments

Comments

@sandywk
Copy link

sandywk commented Jan 26, 2022

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

@wejew
Copy link

wejew commented Jan 26, 2022

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

@darrachequesne
Copy link
Member

@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

@sandywk
Copy link
Author

sandywk commented Jan 27, 2022

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

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

@sandywk
Copy link
Author

sandywk commented Jan 27, 2022

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

@sandywk
Copy link
Author

sandywk commented Jan 27, 2022

@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

@wejew
Copy link

wejew commented Jan 28, 2022

@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.

@darrachequesne
Copy link
Member

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

Related: react-native-webview/react-native-webview#2281

@sandywk
Copy link
Author

sandywk commented Mar 16, 2022

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

@sandywk
Copy link
Author

sandywk commented Mar 16, 2022

IOS 15.4 Fixed this problem

@spencercap
Copy link

i have not experienced your luck with iOS 15.4 @sandywk

@AlvinStefanus
Copy link

IOS 15.5 has this problem

@darrachequesne
Copy link
Member

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

Please reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants