Open tobias-feldmann opened 3 months ago
Hi @tobias-feldmann, thanks for opening this issue. The error logs indicate thie code being executed.
public void onFailure(@NonNull Call call, @NonNull IOException exception) {
onFailure.accept(new ApiException(
"OkHttp client request failed.", exception, "See attached exception for more details."
));
}
Is this issue causing a crash in your application? That will indicate that DataStore which uses the MultiAuthAppSyncGraphQLOperation may not be handling failures correctly and re-throwing. Network failures are expected to happen and the app should not crash while providing eventual consistency.
Hi @lawmicha I can't say for sure whether the app crashes because we don't have this problem on our test devices. However, we regularly have support cases where a user cannot log in and gets stuck in the loading screen. The DataStore sync is started when logging in and the user only gets into the app when this is completed. I think this behavior could have something to do with the error. The user always gets the error. Reinstalling the app etc. does not help.
@tobias-feldmann, can you provide more of the stacktrace in the exception? Based on some research on the top-level UndeliverableException
, the issue is that an exception was trying to be delivered to a consumer but it was canceled/disposed of before the exception was sent. As in the issue you linked, there should be a link to the RxJava documentation regarding that and I also read up on this article that summarizes it.
In the issue that you linked, a couple people posted similar exceptions that also showed the underlying exception being something different (e.g. this cause was due to the device not having internet connectivity). Do you have any logs that provide a little more detail regarding what the underlying issue may be for your log in scenario? It may very well be what @lawmicha linked to above but wanted to confirm.
Sorry @vincetran, Unfortunately I don't have a more detailed stacktrace via Google Play. I could provide you the different devices on which the problem occurred.
But I don't think it's a connection problem here. Because we reinstalled the app together with the users and it still didn't work.
Today we also had the following error in the Google Play Console. But I'm not sure if it has anything to do with the other one.
Exception io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException: at io.reactivex.rxjava3.internal.observers.EmptyCompletableObserver.onError (EmptyCompletableObserver.java:50) at io.reactivex.rxjava3.internal.operators.completable.CompletablePeek$CompletableObserverImplementation.onError (CompletablePeek.java:95) at io.reactivex.rxjava3.internal.operators.completable.CompletableFromAction.subscribeActual (CompletableFromAction.java:40) at io.reactivex.rxjava3.core.Completable.subscribe (Completable.java:2850) at io.reactivex.rxjava3.internal.operators.completable.CompletablePeek.subscribeActual (CompletablePeek.java:51) at io.reactivex.rxjava3.core.Completable.subscribe (Completable.java:2850) at io.reactivex.rxjava3.core.Completable.subscribe (Completable.java:2836) at com.amplifyframework.datastore.syncengine.Orchestrator.onApiSyncFailure (Orchestrator.java:409) at com.amplifyframework.datastore.syncengine.Orchestrator.$r8$lambda$ZuF_qcrER9a6iXcDjWdbix62tCI at com.amplifyframework.datastore.syncengine.Orchestrator$$ExternalSyntheticLambda1.accept at com.amplifyframework.datastore.syncengine.SubscriptionProcessor.lambda$subscriptionObservable$4$com-amplifyframework-datastore-syncengine-SubscriptionProcessor (SubscriptionProcessor.java:220) at com.amplifyframework.datastore.syncengine.SubscriptionProcessor$$ExternalSyntheticLambda1.accept at com.amplifyframework.datastore.appsync.AppSyncClient.lambda$subscription$2 (AppSyncClient.java:322) at com.amplifyframework.datastore.appsync.AppSyncClient$$ExternalSyntheticLambda5.accept at com.amplifyframework.api.aws.MultiAuthSubscriptionOperation.emitErrorAndCancelSubscription (MultiAuthSubscriptionOperation.java:182) at com.amplifyframework.api.aws.MultiAuthSubscriptionOperation.dispatchRequest (MultiAuthSubscriptionOperation.java:108) at com.amplifyframework.api.aws.MultiAuthSubscriptionOperation.$r8$lambda$JtcabZnNSNwb3eJHAsHinrqaFTo at com.amplifyframework.api.aws.MultiAuthSubscriptionOperation$$ExternalSyntheticLambda4.run at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:487) at java.util.concurrent.FutureTask.run (FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:644) at java.lang.Thread.run (Thread.java:1012) Caused by : DataStoreException{message=Timed out while starting to observe storage changes., cause=java.util.concurrent.RejectedExecutionException at com.amplifyframework.datastore.syncengine.Orchestrator.startObservingStorageChanges (Orchestrator.java:312) at com.amplifyframework.datastore.syncengine.Orchestrator.transitionToLocalOnly (Orchestrator.java:252) at com.amplifyframework.datastore.syncengine.Orchestrator.$r8$lambda$mOnL_20CKOMo4oOZZmx8JpE-7k0 at com.amplifyframework.datastore.syncengine.Orchestrator$$ExternalSyntheticLambda0.run at io.reactivex.rxjava3.internal.operators.completable.CompletableFromAction.subscribeActual (CompletableFromAction.java:36) Caused by java.util.concurrent.RejectedExecutionException: at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution (ThreadPoolExecutor.java:2082) at java.util.concurrent.ThreadPoolExecutor.reject (ThreadPoolExecutor.java:842) at java.util.concurrent.ThreadPoolExecutor.execute (ThreadPoolExecutor.java:1374) at java.util.concurrent.AbstractExecutorService.submit (AbstractExecutorService.java:123) at com.amplifyframework.datastore.storage.sqlite.SQLiteStorageAdapter.query (SQLiteStorageAdapter.java:514) at com.amplifyframework.datastore.syncengine.PersistentMutationOutbox.load$lambda$23 (PersistentMutationOutbox.kt:289) at com.amplifyframework.datastore.syncengine.PersistentMutationOutbox.$r8$lambda$rdajT2lfxZn874JF_D-K5WXxa3Q at com.amplifyframework.datastore.syncengine.PersistentMutationOutbox$$ExternalSyntheticLambda21.subscribe at io.reactivex.rxjava3.internal.operators.completable.CompletableCreate.subscribeActual (CompletableCreate.java:40) at io.reactivex.rxjava3.core.Completable.subscribe (Completable.java:2850) at io.reactivex.rxjava3.internal.operators.completable.CompletablePeek.subscribeActual (CompletablePeek.java:51) at io.reactivex.rxjava3.core.Completable.subscribe (Completable.java:2850) at io.reactivex.rxjava3.internal.operators.completable.CompletablePeek.subscribeActual (CompletablePeek.java:51) at io.reactivex.rxjava3.core.Completable.subscribe (Completable.java:2850) at io.reactivex.rxjava3.internal.operators.completable.CompletableAndThenCompletable.subscribeActual (CompletableAndThenCompletable.java:35) at io.reactivex.rxjava3.core.Completable.subscribe (Completable.java:2850) at io.reactivex.rxjava3.core.Completable.blockingAwait (Completable.java:1460) at com.amplifyframework.datastore.syncengine.Orchestrator.startObservingStorageChanges (Orchestrator.java:310)
Thanks for providing more details. Our team will try to reproduce the issue in a local environment and get back to you.
Before opening, please confirm:
Language and Async Model
Java
Amplify Categories
DataStore
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
No response
Describe the bug
We see this error on many devices via the Google Play logs. But I can't reproduce it on our test devices.
Occurs with various Android SDKs and devices: Android 9 (SDK 28) Android 10 (SDK 29) Android 11 (SDK 30) Android 12 (SDK 31) Android 13 (SDK 33) Android 14 (SDK 34) Android 15 Beta (SDK 35)
Same issue as in the ticket: #2654
Reproduction steps (if applicable)
No response
Code Snippet
Log output
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response