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
Description
It turns out that AppSync on Android "looses" the mutations after the network exception.
To Reproduce
A couple of mutations were successfully queued while device had no connection to any network
Device was connected to the wifi network with no internet connection
AppSync SDK detected the connection and tried to synchronize the mutations and that expectedly failed
Wifi was turned off and mobile internet (cellular connection) was turned on
Result: none of the queued (and failed on step 3) mutations were executed after that, the data was lost.
Expected behavior
Events are stored in the way they are queued. If mutations A, B and C are queued and mutation A fails to be synced, mutation B synchronization should not even start (but it did actually)
Failed mutations should not be lost (they have to be retried)
Logs
Mutation failure (step 3)
2018-12-14 15:05:16.939 5692-18037/com.ehawk.ehawktracker E/SaveEventOperations_AS: Mutation CreateEvent failed, op id: 49d603320ce837d012619193ffb100e60bb4a6fd0e66345e8cd2341ac729b185, input: {id=afe67eb2-e0ed-4064-bfdd-afd3b09a852b, caseId=5678-chorniy-11635e63-5674-4018-a08d-aad42fd9f02e, offenderId=5678-chorniy-b49b6766-9da0-4d03-bea5-72e9188a8e3d, time=1.544792706797E9, type=ServiceStateChange, agencyId=agency, serviceName=LocationService, enabledProviders=["GPS","NETWORK"]}
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:148)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
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:760)
Caused by: java.net.SocketTimeoutException: timeout
at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.java:593)
at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.java:601)
at okhttp3.internal.http2.Http2Stream.takeResponseHeaders(Http2Stream.java:146)
at okhttp3.internal.http2.Http2Codec.readResponseHeaders(Http2Codec.java:120)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:75)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at com.amazonaws.mobileconnectors.appsync.sigv4.AppSyncSigV4SignerInterceptor.intercept(AppSyncSigV4SignerInterceptor.java:181)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at com.amazonaws.mobileconnectors.appsync.retry.RetryInterceptor.intercept(RetryInterceptor.java:50)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
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:760)
Version 2.7.1 of the SDK contains network error handling and queuing logic to address the issue that you reported. Please upgrade to this version and let us know how you fare.
that's great news! Thank you for testing and providing a detailed update. I am going ahead and closing this issue. If you encounter any other problems, please open a new issue.
Description
It turns out that AppSync on Android "looses" the mutations after the network exception.
To Reproduce
Result: none of the queued (and failed on step 3) mutations were executed after that, the data was lost.
Expected behavior
Logs
Mutation failure (step 3)
Environment:
Device Information:
The text was updated successfully, but these errors were encountered: