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
Describe the bug
AppSync SDK is not trying to reconnect after connection failure.
com.apollographql.apollo.exception.ApolloException: Subscription failed.
at com.amazonaws.mobileconnectors.appsync.WebSocketConnectionManager.notifyFailure(WebSocketConnectionManager.java:212)
at com.amazonaws.mobileconnectors.appsync.WebSocketConnectionManager.access$400(WebSocketConnectionManager.java:39)
at com.amazonaws.mobileconnectors.appsync.WebSocketConnectionManager$1.onFailure(WebSocketConnectionManager.java:141)
at okhttp3.internal.ws.RealWebSocket.failWebSocket(RealWebSocket.kt:592)
at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:197)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: javax.net.ssl.SSLException: Read error: ssl=0x7b1b2808: I/O error during system call, Software caused connection abort
at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)
at com.android.org.conscrypt.NativeSsl.read(NativeSsl.java:399)
at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:546)
at okio.InputStreamSource.read(JvmOkio.kt:90)
at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:129)
at okio.RealBufferedSource.request(RealBufferedSource.kt:207)
at okio.RealBufferedSource.require(RealBufferedSource.kt:201)
at okio.RealBufferedSource.readByte(RealBufferedSource.kt:210)
at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:119)
at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:102)
at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293)
at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
To Reproduce
For example you can disable Wi-Fi while a subscription is active.
Expected behavior
AppSync SDK should try to reconnect if subscriptionsAutoReconnect is enabled (which is by default).
Environment(please complete the following information):
AppSync SDK Version: 3.1.1
Device Information (please complete the following information):
Device: All devices
Android Version: Pie 9.0
Additional context The only place where subscriptionsAutoReconnect is used in the library seems to be the legacy MQTT-related code.
In the code where WebSockets are created, there is no occurences of subscriptionsAutoReconnect and no reconnecting logic in the onFailure callback of the WebSocketListener, which is needed because OkHttp will not automatically try to reconnect unless you mannually do so.
The text was updated successfully, but these errors were encountered:
Describe the bug
AppSync SDK is not trying to reconnect after connection failure.
To Reproduce
For example you can disable Wi-Fi while a subscription is active.
Expected behavior
AppSync SDK should try to reconnect if
subscriptionsAutoReconnect
is enabled (which is by default).Environment(please complete the following information):
Device Information (please complete the following information):
Additional context
The only place where
subscriptionsAutoReconnect
is used in the library seems to be the legacy MQTT-related code.In the code where WebSockets are created, there is no occurences of
subscriptionsAutoReconnect
and no reconnecting logic in theonFailure
callback of theWebSocketListener
, which is needed because OkHttp will not automatically try to reconnect unless you mannually do so.The text was updated successfully, but these errors were encountered: