Amplify-android: javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: I/O error during system call, Software caused connection abort

Created on 17 Aug 2020  路  26Comments  路  Source: aws-amplify/amplify-android

I have done successful setup as mentioned here. But I see this in my device's logs. What could be the issue? Please let me know if needed any more information.

2020-08-17 17:41:10.221 21649-21697/org.ankur.amplifydemo W/amplify:aws-api: Websocket connection failed.
    javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: 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.SslWrapper.read(SslWrapper.java:384)
        at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:541)
        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:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
2020-08-17 17:41:10.222 21649-21661/org.ankur.amplifydemo I/zygote64: Debugger is no longer active
2020-08-17 17:41:10.227 21649-21697/org.ankur.amplifydemo W/amplify:aws-datastore: An error occurred on the remote Todo subscription for model ON_CREATE.
    AmplifyException {message=Error during subscription., cause=AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}, recoverySuggestion=Evaluate details.}
        at com.amplifyframework.datastore.appsync.AppSyncClient.lambda$subscription$3(AppSyncClient.java:292)
        at com.amplifyframework.datastore.appsync.-$$Lambda$AppSyncClient$8gXTT9bgLZGP51blif6hkh7EwIc.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionOperation.lambda$null$1$SubscriptionOperation(SubscriptionOperation.java:94)
        at com.amplifyframework.api.aws.-$$Lambda$SubscriptionOperation$EfR-sAOj2xzA_-vAoxWBdb2iFk8.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$Subscription.dispatchError(SubscriptionEndpoint.java:377)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)
        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:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)聽
        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:1162)聽
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)聽
        at java.lang.Thread.run(Thread.java:764)聽
     Caused by: javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: 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.SslWrapper.read(SslWrapper.java:384)
        at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:541)
        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:1162)聽
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)聽
        at java.lang.Thread.run(Thread.java:764)聽
2020-08-17 17:41:10.233 21649-21697/org.ankur.amplifydemo W/amplify:aws-datastore: An error occurred on the remote Todo subscription for model ON_DELETE.
    AmplifyException {message=Error during subscription., cause=AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}, recoverySuggestion=Evaluate details.}
        at com.amplifyframework.datastore.appsync.AppSyncClient.lambda$subscription$3(AppSyncClient.java:292)
        at com.amplifyframework.datastore.appsync.-$$Lambda$AppSyncClient$8gXTT9bgLZGP51blif6hkh7EwIc.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionOperation.lambda$null$1$SubscriptionOperation(SubscriptionOperation.java:94)
        at com.amplifyframework.api.aws.-$$Lambda$SubscriptionOperation$EfR-sAOj2xzA_-vAoxWBdb2iFk8.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$Subscription.dispatchError(SubscriptionEndpoint.java:377)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)
        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:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)聽
        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:1162)聽
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)聽
        at java.lang.Thread.run(Thread.java:764)聽
     Caused by: javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: 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.SslWrapper.read(SslWrapper.java:384)
        at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:541)
        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:1162)聽
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)聽
        at java.lang.Thread.run(Thread.java:764)聽
2020-08-17 17:41:10.250 21649-21697/org.ankur.amplifydemo W/amplify:aws-datastore: An error occurred on the remote Todo subscription for model ON_DELETE.
    AmplifyException {message=Error during subscription., cause=AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}, recoverySuggestion=Evaluate details.}
        at com.amplifyframework.datastore.appsync.AppSyncClient.lambda$subscription$3(AppSyncClient.java:292)
        at com.amplifyframework.datastore.appsync.-$$Lambda$AppSyncClient$8gXTT9bgLZGP51blif6hkh7EwIc.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionOperation.lambda$null$1$SubscriptionOperation(SubscriptionOperation.java:94)
        at com.amplifyframework.api.aws.-$$Lambda$SubscriptionOperation$EfR-sAOj2xzA_-vAoxWBdb2iFk8.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$Subscription.dispatchError(SubscriptionEndpoint.java:377)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)
        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:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)聽
        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:1162)聽
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)聽
        at java.lang.Thread.run(Thread.java:764)聽
     Caused by: javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: 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.SslWrapper.read(SslWrapper.java:384)
        at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:541)
        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:1162)聽
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)聽
        at java.lang.Thread.run(Thread.java:764)聽
2020-08-17 17:41:10.255 21649-21697/org.ankur.amplifydemo W/amplify:aws-datastore: An error occurred on the remote Todo subscription for model ON_CREATE.
    AmplifyException {message=Error during subscription., cause=AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}, recoverySuggestion=Evaluate details.}
        at com.amplifyframework.datastore.appsync.AppSyncClient.lambda$subscription$3(AppSyncClient.java:292)
        at com.amplifyframework.datastore.appsync.-$$Lambda$AppSyncClient$8gXTT9bgLZGP51blif6hkh7EwIc.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionOperation.lambda$null$1$SubscriptionOperation(SubscriptionOperation.java:94)
        at com.amplifyframework.api.aws.-$$Lambda$SubscriptionOperation$EfR-sAOj2xzA_-vAoxWBdb2iFk8.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$Subscription.dispatchError(SubscriptionEndpoint.java:377)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)
        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:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)聽
        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:1162)聽
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)聽
        at java.lang.Thread.run(Thread.java:764)聽
     Caused by: javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: 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.SslWrapper.read(SslWrapper.java:384)
        at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:541)
        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:1162)聽
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)聽
        at java.lang.Thread.run(Thread.java:764)聽
2020-08-17 17:41:10.259 21649-21659/org.ankur.amplifydemo I/zygote64: Do partial code cache collection, code=29KB, data=20KB
2020-08-17 17:41:10.275 21649-21659/org.ankur.amplifydemo I/zygote64: After code cache collection, code=29KB, data=20KB
2020-08-17 17:41:10.275 21649-21659/org.ankur.amplifydemo I/zygote64: Increasing code cache capacity to 128KB
2020-08-17 17:41:10.278 21649-21689/org.ankur.amplifydemo W/amplify:aws-datastore: Reading subscriptions buffer has failed.
    io.reactivex.exceptions.CompositeException: 1 exceptions occurred. 
        at io.reactivex.internal.util.ExceptionHelper.addThrowable(ExceptionHelper.java:67)
        at io.reactivex.internal.util.AtomicThrowable.addThrowable(AtomicThrowable.java:34)
        at io.reactivex.internal.operators.observable.ObservableFlatMap$InnerObserver.onError(ObservableFlatMap.java:570)
        at io.reactivex.internal.observers.BasicFuseableObserver.onError(BasicFuseableObserver.java:100)
        at io.reactivex.internal.observers.BasicFuseableObserver.onError(BasicFuseableObserver.java:100)
        at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:281)
        at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
        at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
        at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
        at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
      ComposedException 1 :
        AmplifyException {message=Error during subscription., cause=AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}, recoverySuggestion=Evaluate details.}
        at com.amplifyframework.datastore.appsync.AppSyncClient.lambda$subscription$3(AppSyncClient.java:292)
        at com.amplifyframework.datastore.appsync.-$$Lambda$AppSyncClient$8gXTT9bgLZGP51blif6hkh7EwIc.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionOperation.lambda$null$1$SubscriptionOperation(SubscriptionOperation.java:94)
        at com.amplifyframework.api.aws.-$$Lambda$SubscriptionOperation$EfR-sAOj2xzA_-vAoxWBdb2iFk8.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$Subscription.dispatchError(SubscriptionEndpoint.java:377)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)
        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:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)
        at okhttp3.internal.ws.RealWebSocket.failWebSocket(RealWebSocket.kt:592)
        at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:197)
2020-08-17 17:41:10.278 21649-21689/org.ankur.amplifydemo W/amplify:aws-datastore:     at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: 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.SslWrapper.read(SslWrapper.java:384)
        at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:541)
        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:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
Bug DataStore

Most helpful comment

I found this issue in Samsung Galaxy A8, Samsung Galaxy A30, and Samsung Galaxy S20

I am using the latest version of Amplify Datastore 1.4.2

It happens just after turning the WiFi off and it is causing the app to crash.

Error:

E/AndroidRuntime: FATAL EXCEPTION: RxCachedThreadScheduler-24
    Process: com.invernaderolabs.checkin, PID: 29898
    io.reactivex.rxjava3.exceptions.UndeliverableException: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | AmplifyException {message=Error during subscription., cause=AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x739f9d2e08: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}, recoverySuggestion=Evaluate details.}
        at io.reactivex.rxjava3.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367)
        at io.reactivex.rxjava3.internal.util.AtomicThrowable.tryAddThrowableOrReport(AtomicThrowable.java:52)
        at io.reactivex.rxjava3.internal.operators.observable.ObservableFlatMap$InnerObserver.onError(ObservableFlatMap.java:531)
        at io.reactivex.rxjava3.internal.observers.BasicFuseableObserver.onError(BasicFuseableObserver.java:100)
        at io.reactivex.rxjava3.internal.observers.BasicFuseableObserver.onError(BasicFuseableObserver.java:100)
        at io.reactivex.rxjava3.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:281)
        at io.reactivex.rxjava3.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
        at io.reactivex.rxjava3.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
        at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
        at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        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: AmplifyException {message=Error during subscription., cause=AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x739f9d2e08: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}, recoverySuggestion=Evaluate details.}
        at com.amplifyframework.datastore.appsync.AppSyncClient.lambda$subscription$3(AppSyncClient.java:293)
        at com.amplifyframework.datastore.appsync.-$$Lambda$AppSyncClient$797ziDK0io-qXODzROLOA77stS8.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionOperation.lambda$null$1$SubscriptionOperation(SubscriptionOperation.java:94)
        at com.amplifyframework.api.aws.-$$Lambda$SubscriptionOperation$l9lC7Ew6niNmyszMXQSUKS6YhwE.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$Subscription.dispatchError(SubscriptionEndpoint.java:377)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)
        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: AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x739f9d2e08: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)聽
        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)聽
E/AndroidRuntime: Caused by: javax.net.ssl.SSLException: Read error: ssl=0x739f9d2e08: 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:407)
        at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:579)
        at okio.InputStreamSource.read(JvmOkio.kt:90)
        at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:129)
        at okio.RealBufferedSource.request(RealBufferedSource.kt:206)
        at okio.RealBufferedSource.require(RealBufferedSource.kt:199)
        at okio.RealBufferedSource.readByte(RealBufferedSource.kt:209)
        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)
            ... 4 more

Please let me know if you need more information.

All 26 comments

That kind of error typically indicates a network connection failure on the device or emulator. First thing to verify is whether the device or emulator is able to successfully connect to the internet.

I expected that Amplifiy DataStore and API plugins help for the offline-online synchronization better than any other platforms. What I am doing on my demo protocol is just adding some todo data in offline mode and start my internet back to check if synching working or not.

Sometimes it syncs the data and some time it doesn't. It throws the error which I have sent you in the first comment. Please note that my internet is working very fine when I start the app to check if syncing is working or not. below is my basic setup that could help you to check on the issue.

build.gradle (app):

android {
    compileSdkVersion 29
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
...
dependencies {
    implementation 'com.amplifyframework:core:1.1.2'                        // Core Amplify
    implementation 'com.amplifyframework:aws-datastore:1.1.2'               // Data Store Amplify
    implementation 'com.amplifyframework:aws-api:1.1.2'                     // API Amplify
}

build.gradle (project)

dependencies {
    classpath "com.android.tools.build:gradle:4.0.1"
    classpath 'com.amplifyframework:amplify-tools-gradle-plugin:1.0.1'
}
apply plugin: 'com.amplifyframework.amplifytools'

Feel free to ask me if you needed any further details needed to resolve this bug.

I hope Amplify is the best for my online-offline use-case.

@AnkurJagani What kind of device did this occur on? What version of Android?

Caused by: javax.net.ssl.SSLException: Read error: ssl=0x7a68842900: I/O error during system call, Software caused connection abort

Are you able to reproduce this on the Android emulator?

@jamesonwilliams I am accessing this on device MI-A1 With Android SDK level 28 (Android O). I haven't checked on emulator. It's reproducing issue on my said device. for emulator, I will do test.

Is this causing the app to crash?

Based on the stack trace, this is happening when there's a websocket connection error. Currently, the sync process will retry to establish those connections upon the next interaction with the local datastore (any query or save operation). You should see evidence of that in the log by looking for a message containing

DataStore orchestrator transitioning states

it's not crashing the app.

but data persisted on local repo doesn't synchs to the aws dynamo db. Whenever I do interaction for saving new entry, It just skips the entries that are resulted with the error said above and the entry that I am trying to save goes successful. atleast, it should work when user do some interaction like you have mentioned already.

You can close this issue because I don't know AWS team cares to resolve it or not. This is reproducing issue and if needed more clarification then we can go on live demonstration if you are there for 5 minutes at-least. or else, i can share my protocol repo to you (so that you guys can check your self). It's really unexpected for the production application we are planing.

@AnkurJagani Thanks for the offer! Can you shoot me an email? I'd like to get on a call and do a run through so we can figure out the right work to get on our backlog.

@jpignata I can demonstrate a similar case where I save an item in the datastore while offline (websocket connection errors occur) and it refuses to sync back to the backend even after connectivity is re-established. I would love to walk through it with you if it could be helpful for getting a fix out.

@msiewert I have some discussion to contribute to that! Please, though, let's create a new issue for it, since it is not related to #731. I'll chime in on the new one.

@msiewert I have some discussion to contribute to that! Please, though, let's create a new issue for it, since it is not related to #731. I'll chime in on the new one.

https://github.com/aws-amplify/amplify-android/issues/823

We believe this issue is unique to the specific device being used. If you encounter this exception signature, please 馃憤 the original post, and we will re-open.

I found this issue in Samsung Galaxy A8, Samsung Galaxy A30, and Samsung Galaxy S20

I am using the latest version of Amplify Datastore 1.4.2

It happens just after turning the WiFi off and it is causing the app to crash.

Error:

E/AndroidRuntime: FATAL EXCEPTION: RxCachedThreadScheduler-24
    Process: com.invernaderolabs.checkin, PID: 29898
    io.reactivex.rxjava3.exceptions.UndeliverableException: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | AmplifyException {message=Error during subscription., cause=AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x739f9d2e08: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}, recoverySuggestion=Evaluate details.}
        at io.reactivex.rxjava3.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367)
        at io.reactivex.rxjava3.internal.util.AtomicThrowable.tryAddThrowableOrReport(AtomicThrowable.java:52)
        at io.reactivex.rxjava3.internal.operators.observable.ObservableFlatMap$InnerObserver.onError(ObservableFlatMap.java:531)
        at io.reactivex.rxjava3.internal.observers.BasicFuseableObserver.onError(BasicFuseableObserver.java:100)
        at io.reactivex.rxjava3.internal.observers.BasicFuseableObserver.onError(BasicFuseableObserver.java:100)
        at io.reactivex.rxjava3.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:281)
        at io.reactivex.rxjava3.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
        at io.reactivex.rxjava3.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
        at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
        at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        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: AmplifyException {message=Error during subscription., cause=AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x739f9d2e08: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}, recoverySuggestion=Evaluate details.}
        at com.amplifyframework.datastore.appsync.AppSyncClient.lambda$subscription$3(AppSyncClient.java:293)
        at com.amplifyframework.datastore.appsync.-$$Lambda$AppSyncClient$797ziDK0io-qXODzROLOA77stS8.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionOperation.lambda$null$1$SubscriptionOperation(SubscriptionOperation.java:94)
        at com.amplifyframework.api.aws.-$$Lambda$SubscriptionOperation$l9lC7Ew6niNmyszMXQSUKS6YhwE.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$Subscription.dispatchError(SubscriptionEndpoint.java:377)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)
        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: AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x739f9d2e08: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:204)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$000(SubscriptionEndpoint.java:60)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:473)聽
        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)聽
E/AndroidRuntime: Caused by: javax.net.ssl.SSLException: Read error: ssl=0x739f9d2e08: 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:407)
        at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:579)
        at okio.InputStreamSource.read(JvmOkio.kt:90)
        at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:129)
        at okio.RealBufferedSource.request(RealBufferedSource.kt:206)
        at okio.RealBufferedSource.require(RealBufferedSource.kt:199)
        at okio.RealBufferedSource.readByte(RealBufferedSource.kt:209)
        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)
            ... 4 more

Please let me know if you need more information.

I'm also having the same issue while testing offline mode.
I've tested in versions 1.4.2 and 1.5.0 in Lenovo Tab P10 (Android 9) and the error occurs.

I am encountering the same issue. Exactly the same scenario. Creating data while disconnected from internet, after connecting to WIFI, the data will sometimes be synced to AWS, but most of the times, the data is just lost.

W/amplify:aws-datastore: An error occurred on the remote Scanned subscription for model ON_CREATE.
    AmplifyException {message=Error during subscription., cause=AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x7f8ab73d00: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}, recoverySuggestion=Evaluate details.}
        at com.amplifyframework.datastore.appsync.AppSyncClient.lambda$subscription$3(AppSyncClient.java:1)
        at com.amplifyframework.datastore.appsync.-$$Lambda$AppSyncClient$8gXTT9bgLZGP51blif6hkh7EwIc.accept(lambda)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$Subscription.dispatchError(SubscriptionEndpoint.java:1)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:2)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$200(SubscriptionEndpoint.java:1)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$1.onFailure(SubscriptionEndpoint.java:1)
        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:504)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:761)
     Caused by: AmplifyException {message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x7f8ab73d00: I/O error during system call, Software caused connection abort, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:2)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$200(SubscriptionEndpoint.java:1)聽
        at com.amplifyframework.api.aws.SubscriptionEndpoint$1.onFailure(SubscriptionEndpoint.java:1)聽
        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:504)聽
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)聽
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)聽
        at java.lang.Thread.run(Thread.java:761)聽
     Caused by: javax.net.ssl.SSLException: Read error: ssl=0x7f8ab73d00: 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.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:758)
        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:504)聽
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)聽
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)聽
        at java.lang.Thread.run(Thread.java:761)聽
2020-11-04 18:38:32.432 3148-3212/be.milants.loonskleinfruit W/amplify:aws-datastore: Reading from subscriptions buffer is completed.

Thanks, @woutermilants. Reopening this so we can tackle. How often do you see this occur, roughly?

Roughly 7 out of 10 times I try it. I'm currently testing this part of my app. I can give you some better numbers in a few moments

Thanks. Please do! That鈥檇 be very helpful. We鈥檙e going to jump on this immediately.

We're discussing this now. I'm concerned about "the data is just lost" piece of your report. The data should be enqueued in SQLIte and should flush out when you reconnect to the internet. Can you try to force close and restart the app and see if it gets synchronized?

Thanks again for your help here. Could you possibly do the following:

  • Ensure logging is set to the most verbose level via: Amplify.addPlugin(AndroidLoggingPlugin(LogLevel.VERBOSE))
  • Perhaps send us the entire logcat so we can analyze what's going on (but don't post it here in the event there's any sensitive data)
  • If you're free, we're also on Discord and can chat about this. (https://discord.gg/amplify) -- my handle is populuxe.

Thanks!

I did a couple of tests, all of them are synced to AWS AFTER restarting the application.
It's not super urgent for me, but will keep an eye on this thread.

Thanks so far !

Hello @jpignata Facing same issue, App gets crashed when we lost the connectivity. And data not getting uploaded to cloud which was added offline. Tried in Samsung M40 - Android 10 and Motorola G5 S Plus - Android 8.1.0

We believe this issue can be resolved by adding retries to the DataStore.

Back in May, I had done some work to automatically reconnect the DataStore, after a network loss. That work can be seen here.

We believe this issue can be resolved by adding retries to the DataStore.

Back in May, I had done some work to automatically reconnect the DataStore, after a network loss. That work can be seen here.

Can you possibly elaborate on this ? I don't really see any retry logic in those changes.

@woutermilants it isn't a typical exponential back-off with jitter retry strategy. So that may be why you don't recognize it. Look for onlineState.startDetecting(). The online state is observed. When it changes, the sync process is restarted. In other words, the retry happens at the application level, not on individual network calls.

Hello guys, I'm still facing this issue in the latest version 1.6.7, when I turn the WiFi off, is there any update?

Is not urgent for me, but is causing my app to crash.

Caused by: DataStoreException{message=Error during subscription., cause=ApiException{message=Subscription failed., cause=javax.net.ssl.SSLException: Read error: ssl=0x73a95b5588: I/O error during system call, Software caused connection abort, recoverySuggestion=Check your Internet connection. Is your device online?}, recoverySuggestion=Evaluate details.}
        at com.amplifyframework.datastore.appsync.AppSyncClient.lambda$subscription$3(AppSyncClient.java:298)
        at com.amplifyframework.datastore.appsync.-$$Lambda$AppSyncClient$797ziDK0io-qXODzROLOA77stS8.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionOperation.lambda$null$1$SubscriptionOperation(SubscriptionOperation.java:94)
        at com.amplifyframework.api.aws.-$$Lambda$SubscriptionOperation$l9lC7Ew6niNmyszMXQSUKS6YhwE.accept(Unknown Source:4)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$Subscription.dispatchError(SubscriptionEndpoint.java:395)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.notifyError(SubscriptionEndpoint.java:211)
        at com.amplifyframework.api.aws.SubscriptionEndpoint.access$100(SubscriptionEndpoint.java:60)
        at com.amplifyframework.api.aws.SubscriptionEndpoint$AmplifyWebSocketListener.onFailure(SubscriptionEndpoint.java:491)
        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)聽
Was this page helpful?
0 / 5 - 0 ratings