aws-amplify / aws-amplify/amplify-android

io.reactivex.rxjava3.exceptions.UndeliverableException in DataStore

Open
#2,898 6 comments 0 reactions 0 assignees View on GitHub
bug datastore
Dominant language
Java
Stars
287
Forks
132
Avg merge
2d 2h
Merged PRs (30d)
45

Description

### Before opening, please confirm:

- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-android/issues?q=is%3Aissue+) and [discussions](https://github.com/aws-amplify/amplify-android/discussions).

### Language and Async Model

Java

### Amplify Categories

DataStore

### Gradle script dependencies

```groovy
//Amplify
implementation("com.amplifyframework:core:2.21.0")
implementation("com.amplifyframework:aws-api:2.21.0")
implementation("com.amplifyframework:aws-auth-cognito:2.21.0")
implementation("com.amplifyframework:aws-datastore:2.21.0")
implementation("com.amplifyframework:aws-storage-s3:2.21.0")
```

### Environment information

```
------------------------------------------------------------
Gradle 8.2
------------------------------------------------------------

Build time: 2023-06-30 18:02:30 UTC
Revision: 5f4a070a62a31a17438ac998c2b849f4f6892877

Kotlin: 1.8.20
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 17.0.1 (Oracle Corporation 17.0.1+12-LTS-39)
OS: Mac OS X 14.4 aarch64

```

### 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

> com.amplifyframework.datastore.storage.sqlite.PersistentModelVersion$$ExternalSyntheticLambda2.accept
Exception io.reactivex.rxjava3.exceptions.UndeliverableException:
at io.reactivex.rxjava3.plugins.RxJavaPlugins.onError (RxJavaPlugins.java:367)
at io.reactivex.rxjava3.internal.operators.single.SingleCreate$Emitter.onError (SingleCreate.java:82)
at com.amplifyframework.datastore.storage.sqlite.PersistentModelVersion$$ExternalSyntheticLambda2.accept
at com.amplifyframework.datastore.appsync.AppSyncClient.lambda$sync$0 (AppSyncClient.java:115)
at com.amplifyframework.datastore.appsync.AppSyncClient$$ExternalSyntheticLambda0.accept
at com.amplifyframework.api.aws.MultiAuthAppSyncGraphQLOperation$OkHttpCallback.onFailure (MultiAuthAppSyncGraphQLOperation.java:199)
at okhttp3.internal.connection.RealCall$AsyncCall.run (RealCall.kt:535)
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)

### Reproduction steps (if applicable)

_No response_

### Code Snippet

```java
// Put your code below this line.

```

### Log output

```
// Put your logs below this line

```

### amplifyconfiguration.json

_No response_

### GraphQL Schema

```graphql
// Put your schema below this line

```

### Additional information and screenshots

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the stack trace locations in PersistentModelVersion, AppSyncClient.java, and MultiAuthAppSyncGraphQLOperation.java, then compare the behavior with issue #2654. Trace how the DataStore sync failure is delivered and identify why it becomes undeliverable. Done means the reported Play-log failure is addressed and the affected path has verification for this error case.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
databases, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.