You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a legacy project I'm stuck with version 0.53.0 of Apollo-iOS.
I noticed once thing, the subscription is not restored when it's disconnected initially. I even tried manually disconnecting and reconnecting but in vain.
Here's
nw_connection_get_connected_socket_block_invoke [C24] Client called
nw_connection_get_connected_socket on unconnected nw_connection
TCP Conn 0x60000332e080 Failed : error 0:50 [50]
"websocket is disconnected: Error Domain=NSPOSIXErrorDomain Code=50 \"Network is down\" UserInfo={_kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}"
Version
0.53.0
Steps to reproduce the behavior
I disconnected the device from internet, landed on a screen where a subscription is fired. The subscription failed with these errors.
nw_connection_get_connected_socket_block_invoke [C24] Client called
nw_connection_get_connected_socket on unconnected nw_connection
TCP Conn 0x60000332e080 Failed : error 0:50 [50]
"websocket is disconnected: Error Domain=NSPOSIXErrorDomain Code=50 \"Network is down\" UserInfo={_kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}"
I reconnected the internet, made another mutation from same screen, and it's successful, however, the subscription errors are still being logged at the reconnection interval rate.
I noticed two things while debugging..
Even if I set reconnect = false and try to manually deallocate the subscription by setting to nil or call .cancel and reassign it again, the same errors are getting logged.
I was debugging the library source code, and added few breakpoints here and there, and surprisingly sometimes the subscription was restored. This happened few times but I couldn't infer the exact steps to reproduced.
The text was updated successfully, but these errors were encountered:
@oolabib sounds like maybe some internal state is getting messed up, have you tried creating a completely new web socket instance when network connectivity is restored to see if that gets around the issue?
@oolabib No that shouldn't be an issue, was just suggesting trying to clear your existing web socket instance and create a new one to test if that resolves your issue since it could be that there is some internal state in the web socket maybe not being reset correctly potentially causing the issue you are seeing. Imagine you could add a way to reset the internal state of your singleton instance to allow you to do so.
Summary
In a legacy project I'm stuck with version
0.53.0
of Apollo-iOS.I noticed once thing, the subscription is not restored when it's disconnected initially. I even tried manually disconnecting and reconnecting but in vain.
Here's
Version
0.53.0
Steps to reproduce the behavior
I disconnected the device from internet, landed on a screen where a subscription is fired. The subscription failed with these errors.
I reconnected the internet, made another mutation from same screen, and it's successful, however, the subscription errors are still being logged at the reconnection interval rate.
I noticed two things while debugging..
Even if I set reconnect = false and try to manually deallocate the subscription by setting to nil or call
.cancel
and reassign it again, the same errors are getting logged.I was debugging the library source code, and added few breakpoints here and there, and surprisingly sometimes the subscription was restored. This happened few times but I couldn't infer the exact steps to reproduced.
The text was updated successfully, but these errors were encountered: