-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http fails to execute after offline mutation #33
Comments
running the sample (no edits. just follow the instruction) produces the same error. steps: |
Does this only happen on first offline mutation or all offline mutations? Do the normal mutations go through fine? |
This happens to all of the offline mutation. Sometimes the first offline mutation go in. Take note. the aws appsync android sample also does not work. Same error. I have a solution that is currently working but after about a hundred of call it fails.
|
I tested a bit more. I think that is also the reason why my temp solution works because it forces appsync to store the mutation in the persistent cache. |
Thanks for the details @danielvtan I will investigate the issue. |
I got a temporary fix working. I edited the appsync sdk a bit. Here is what i did. I removed the in memory mutation by removing this line
to replace the in memory mutation i always call this after a mutation.
the purpose of the code above is to ditch the in memory mutation entirely
after doing this, offline and online mutation are finally working. Please make an actual fix for this. thank you! |
I see the same exception... The mutation is longer available and our client and backend are out of sync. D/AppSync: onFailure()Failed to execute http call
|
I am investigating this issue currently. My working theory at this point is that the mutation is being removed from the queue before it is successfully processed as reported in #40 and is lost if the operation fails due to a network error. I am testing a couple of fixes locally that I hope to include in an upcoming release of the SDK. I will post back on this thread once I have more updates. |
Version 2.7.1 of the SDK contains the queuing fixes logic to address the issue that you reported. Please upgrade to this version and let us know how you fare. |
@danielvtan @donaldarmstrong |
@cbommas thanks for the fixes. Currently i can not test this as we are using a modified version of the sdk. We will test this for our next project. |
steps:
offline mutation
turn internet on
mutation fails
sdk version: 2.6.25 (latest)
device type: emulator
Please include a stacktrace if applicable.
The text was updated successfully, but these errors were encountered: