Open sarya opened 9 months ago
Looks similar to this Java client issue from a few years back: https://github.com/pusher/pusher-websocket-java/issues/197
Any solution to this problem ??
We have made some changes that may help in this area, I will look into getting a new release made so you can upgrade.
We just released version 10.1.5 - could you upgrade and let me know if this helps resolve the issue? https://github.com/pusher/pusher-websocket-swift/releases/tag/10.1.5
@benw-pusher I updated to 10.1.5 but started seeing a handshake problem:
[PUSHER DEBUG] websocketDidReceiveMessage {"event":"pusher:error","data":{"code":4201,"message":"Pong reply not received"}}
<PusherSwift.PusherError: 0x600000c1fc60>
nw_read_request_report [C5] Receive failed with error "Socket is not connected"
[PUSHER DEBUG] Websocket received error. Error: POSIXErrorCode(rawValue: 57): Socket is not connected
[PUSHER DEBUG] Websocket received error. Error: POSIXErrorCode(rawValue: 57): Socket is not connected
[PUSHER DEBUG] Websocket is disconnected but no error received Close code: Optional(1001). Reason: The websocket disconnected unexpectedly.
[PUSHER DEBUG] Websocket is disconnected but no error received Close code: Optional(1001). Reason: The websocket disconnected unexpectedly.
Just rolled back to 10.1.4 and will get back to you if I see this problem persisting in the older version, making this comment unrelated.
EDIT: The problem is 10.1.5 specific. EDIT2: This issue is happening after ~2 hours of receiving messages in foreground.
We are also facing some reconnection issues after a long time in background. Any news on this? Using 10.1.4 can't be a solution for us since there are even more reconnection issue. Thanks
Steps to reproduce
Open the app, put the app in the background (e.g. switch to another app or lock the sreen), return to the app. Sometimes Pusher will reconnect in this scenario, but eventually the app will come into the foreground and Pusher will not reconnect. The user will have to force quit/relaunch the app to restore the connection.
Expected behavior
Pusher reconnects/resubscribes to channels every time the app is moved from background to foreground.
Actual behavior
The app is brought back into the foreground but Pusher stays in the "disconnected" state (according to the debug console).
I have attempted to play around with the
maxReconnectGapInSeconds
andreconnectAttemptsMax
settings on the PusherConnection object but am still seeing the same outcome....