Handling Transactions Offline
Any transactions that are performed while our app is offline, will be queued. Once the app regains network connectivity, the transactions will be sent to the server.
But, when I perform any transaction while offline, it gives me an error like this, and falls back to the original values:
W/RepoOperation: Transaction at /-KPXECP6a1pXaM4gEYe0 failed: DatabaseError: The operation had to be aborted due to a network disconnect
I lost the data there. What's going on?
Thanks,
Kirtan
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/cc468345-3fb2-49e4-8898-13543e3fef41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You are likely running into an unfortunate bug in the current Android SDK. Namely, if you queue a transaction before your client connects to Firebase, it will fail with that error. This will be fixed in an upcoming release.In the meantime you may be able to work around this by watching the ".info/connected" location and not doing your transaction until after it becomes true. Else, you could handle this error and just re-do the transaction.Sorry for the inconvenience! Hope this helps,-Michael
On Mon, Aug 22, 2016 at 6:59 AM, Kirtan Thakkar <kirtant...@gmail.com> wrote:
When I read your docs for transaction it says something like this:
Handling Transactions Offline
Any transactions that are performed while our app is offline, will be queued. Once the app regains network connectivity, the transactions will be sent to the server.
But, when I perform any transaction while offline, it gives me an error like this, and falls back to the original values:
W/RepoOperation: Transaction at /-KPXECP6a1pXaM4gEYe0 failed: DatabaseError: The operation had to be aborted due to a network disconnect
I lost the data there. What's going on?
Thanks,
Kirtan
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/fca54911-06b0-46f2-b15b-7fd25de602c1%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/c5b9f484-2a91-40c2-9e90-382426c03e52%40googlegroups.com.