Open JornR94 opened 5 months ago
Update: similar to this issue and @mattcreaser proposed a solution to prevent this exception from happening, explanation here
We will look to see if this can be caught internally but the supplied workaround is also recommended.
Before opening, please confirm:
Language and Async Model
Java
Amplify Categories
GraphQL API, DataStore
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
No response
Describe the bug
In our production app, I'm seeing a crash happen occasionally with the Amplify AWS SDK for Android. The crash is a Fatal Exception from
io.reactivex.rxjava3.plugins.RxJavaPlugins.onError
. Full stack trace of the exception:Caused by com.amplifyframework.datastore.DataStoreException Failure performing sync query to AppSync.
Caused by com.amplifyframework.api.ApiException Could not retrieve the response body from the returned JSON
Caused by mi.f0 stream was reset: CANCEL
It looks to me like there might be a try/catch block missing somewhere in the flow of this error (in the DataStore
com.amplifyframework.datastore
or the GraphQL API incom.amplifyframework.api
).This exception occurred for about 3% of users of our app, which is having a significant impact on the crash rate of our app. I would love your help -- please let me know if I can provide further details to help with solving this.
Not sure it's helpful but interestingly, 83% of the exceptions happen on Samsung phones, which is far from the distribution of device-type for our userbase. So there seems to be some relation between the crashes occurring more often on Samsung OS (although it does also happen on other not-customized OEMs like Google Pixels, but only about 1% of the crashes).
Reproduction steps (if applicable)
No response
Code Snippet
Log output
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response