iOS 15 WKWebView websocket behaviour

Hello,

in our app we are reliant on a web socket inside a WKWebview. In previous releases this web socket worked well. In the iOS 15 betas though this web socket behaves differently: it connects to our server successfully but once the client tries to send any data through it the web socket throws an error and closes with a non descriptive error:

The operation couldn’t be completed. (kNWErrorDomainPOSIX error 54 - Connection reset by peer)

Looking into the system log the deepest error I can make out is:

nw_protocol_boringssl_error(1772) [C12.1.1:2][0x102e0d540] Lower protocol stack error post TLS handshake. [54: <private>]

A test web socket to another server seems to be working.

I also notices that a MitM proxy like Charles no longer shows web socket connections in the iOS 15 beta. This just indicates that something might have changed.

Because the communication via this socket is very important for the functionality of our app I must know what the issue is. I tried adding ATS exceptions for the URL of the socket to no avail.

Maybe this is a temporary bug in iOS 15 that will be fixed until its released? Or maybe anyone has experienced this kind of error in the past?

Same here, having the same issues with web socket in IOS 15 safari browser. We can’t ask everyone who are viewing our website to turn off NSURLSession WebSocket experimental features 😂 if they are using Safari. It is working for IOS 14, for my colleagues who haven’t upgraded, asking them to hold back on upgrading cause IOS is buggy

Its been over many months now, my ticket (https://feedbackassistant.apple.com/feedback/9665293) had no responses. Can the technical team update the status about this? Otherwise I'll have to make other decisions since I can't hold off the IOS upgrades any longer.

I have tested IOS 15.3, the issue remains.

Sorry, I wrote to the wrong thread. Please disregard.

My nodejs->socket.io webapp runs on ios15.3 when opened via http in the lan if i use the same app via https via nginx, the websocket fails. we also allowd tls1.2 and disabled this NSUrl, but nothing helps at the moment.

I came from this question

https://github.com/socketio/socket.io/issues/4263

In IOS 15 environment, WSS cannot connect, but WS can link. No matter how to replace the certificate, the result of TLS is the same!

This problem has plagued us for a long time! Hope to get attention!

Yea

iOS 15 WKWebView websocket behaviour
 
 
Q