-
Notifications
You must be signed in to change notification settings - Fork 927
Failed to execute 'abort' on 'IDBTransaction': The transaction has finished. #1520
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
Comments
Offhand I'm not sure what would cause this. Any chance these users are low on disk space? We've had some issues in the past with that. |
One bit of info (thank you crashlytics). Things seemed fine in 5.7.0 until I upgraded to 5.8.0. Could this fix in 5.8.0 have introduced the issue: Fixed a crash that could happen when the app is shut down after a write has been sent to the server but before it has been received on a listener. |
I rolled back to 5.5.4 and I'm still seeing this issue where I'm seeing Failed to execute 'abort' on 'IDBTransaction' on app resume and everything goes down after that. |
Another thing I noticed: it seems to happen as follows:
Help anyone? |
Are you able to reproduce this yourself? Any chance you could enable logging ( If you can get a callstack for the "Failed to execute 'abort' on 'IDBTransaction'" error, that might also help. I'm trying to figure out what might be going on, but the more data we have the better. |
@mikelehen I've managed to capture a stack: Error: Failed to execute 'abort' on 'IDBTransaction': The transaction has finished. And here's the stack for the subsequent AsynQueue errors Error: FIRESTORE (5.8.1) INTERNAL ASSERTION FAILED: AsyncQueue is already failed: The transaction was aborted, so the request cannot be fulfilled. |
@sengoontoh Thanks. I'm afraid that isn't shedding any light on the matter for me. I think a log might help though. The only place we call abort() is here and as you can see we log a message immediately beforehand. So if we can get that log message it might tell us something useful. |
@mikelehen it's slightly difficult for me to run the debug log as I have not been able to reproduce it on my side. I'm only observing it in the field and also unfortunately (or fortunately?) not on all devices. It also happens after a user has the app running for a few hours and resumes the app. My gut feeling on what's happening is the FS JS SDK is in the process of doing a .set() before the app is closed, IDDB successfully does the write transaction but the process ends up getting backgrounded by the OS before being acknowledged by the FS driver layer so when it wakes up, it starts executing the "catch" handler of the .set operation. Hence the wrapUserFunction in the stack. Note that my catch code does not do an abort so it must be part of the wrapper of the user function. Any thoughts? |
@sengoontoh I'm not very familiar with ionic. Do you know more specifically what is happening when the app is "backgrounded" and when it "wakes up"? On wake up, does the app reload from scratch (i.e. like a page refresh in a browser)? Or is it just resuming execution without starting over? If the latter, then I fear this may be an ionic-specific issue of some kind... where it's closing our IndexedDb transaction in the middle of our processing or something. We have a slightly similar report on Chrome in #939 but the symptoms aren't the same. |
@mikelehen |
Would it be possible for the catch fail code to ignore this "Error: Failed to execute 'abort' on 'IDBTransaction': The transaction has finished." error and not mess up the AsynQueue so as to recover gracefully? |
@sengoontoh Unfortunately not. If one of our transactions fails, that leaves the SDK in an unknown state and continuing to let the SDK run could lead to corruption of the offline cache (since something we think we wrote was not actually written). Ideally we would figure out what is causing the failure and avoid it. Failing that, we could take a look at hardening all of our transactions to be resilient to failures (retry or otherwise fail gracefully), but this is a large undertaking and is inherently risky since we wouldn't be able to test these codepaths without knowing how they're being triggered. So we really need a way to reproduce this or more details on how the error is coming about. Sorry. 😦 |
Hey @sengoontoh. We need more information to resolve this issue but there hasn't been an update in 7 days. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @sengoontoh if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
I am getting these errors out in the field on Android devices running the JS SDK in an Ionic environment. Looks like it happens as soon as the app is resumed (hot start).
The first error I see is:
Failed to execute 'abort' on 'IDBTransaction': The transaction has finished.
Then I see successive:
FIRESTORE (5.8.0) INTERNAL ASSERTION FAILED: AsyncQueue is already failed: The transaction was ..
and every single data operation is not working. It happens both with multi-tab and without multi-tab synchro turned on.
It's quite frustrating to our users as the app is basically non-operational at that point.
The text was updated successfully, but these errors were encountered: