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
(Migrating this issue from the AWS Forums on behalf of forums user ep-mt)
Describe the bug
I'm developing a chat screen with AWS Appsync and I found an error or probably a bug when the AppsyncMutationCall fails.
I'm trying to send 4 messages (4 mutations) with my Android phone with none internet connection signal. Then AppsyncMutationCall fails throwing the following exception:
E/ChatManager$$Lambda: com.apollographql.apollo.exception.ApolloNetworkException: Failed to execute http call
at com.apollographql.apollo.internal.interceptor.ApolloServerInterceptor$1$1.onFailure(ApolloServerInterceptor.java:105)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:161)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
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: java.net.SocketTimeoutException: failed to connect to jpdpd773vrhnjnzojnxddagfli.appsync-api.us-east-1.amazonaws.com/13.33.131.80 (port 443) from /10.210.90.89 (port 47932) after 10000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:185)
at libcore.io.IoBridge.connect(IoBridge.java:130)
at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:129)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:365)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:209)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:191)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:356)
at java.net.Socket.connect(Socket.java:616)
at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.java:71)
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:240)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:160)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.amazonaws.mobileconnectors.appsync.sigv4.AppSyncSigV4SignerInterceptor.intercept(AppSyncSigV4SignerInterceptor.java:165)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.amazonaws.mobileconnectors.appsync.retry.RetryInterceptor.intercept(RetryInterceptor.java:43)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:147)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
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)
The problem is that when I turn on the WiFi and network connection is on again, my mutations are written in a wrong order. I think my app is trying to mutate every message at the same time instead of mutate the first and if success try the second, and the third in chain.Is there any way to chain mutations and maintain the order of my retries with the Appsync SDK?
To Reproduce
See above
Expected behavior
See above
Screenshots
N/A
The text was updated successfully, but these errors were encountered:
Can you provide logs and a code snippet to help debug this further. The way the code works is that all mutations are added to a queue (regardless of whether the device is online or offline). The mutations are executed sequentially from the queue, in the order they were added.
I have added an integration test to the code base that creates 10 mutations when the device is offline, turns the device back online and then validates that the sequence was maintained.
Version 2.7.1 of the SDK contains fixes for the queuing logic to address the issue that you reported. I will go ahead and close out this out as I haven't heard back - please feel free to reopen if you run into further issues.
(Migrating this issue from the AWS Forums on behalf of forums user ep-mt)
Describe the bug
I'm developing a chat screen with AWS Appsync and I found an error or probably a bug when the AppsyncMutationCall fails.
I'm trying to send 4 messages (4 mutations) with my Android phone with none internet connection signal. Then AppsyncMutationCall fails throwing the following exception:
The problem is that when I turn on the WiFi and network connection is on again, my mutations are written in a wrong order. I think my app is trying to mutate every message at the same time instead of mutate the first and if success try the second, and the third in chain.Is there any way to chain mutations and maintain the order of my retries with the Appsync SDK?
To Reproduce
See above
Expected behavior
See above
Screenshots
N/A
The text was updated successfully, but these errors were encountered: