-
Notifications
You must be signed in to change notification settings - Fork 875
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
[Error] InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing. #2710
Comments
@AugustinGrigorov Sorry to hear about your troubles! It looks like you are experiencing something akin to #1533. The good news is that you are not on your own, the bad news is that this seems to be a longstanding issue that is caused by unexpected behavior in Mobile Safari that we haven't been able to completely work around. We are currently discussing how to make our SDK more tolerant to IndexedDb failures, which would address this issue, as well as #1533 and #2581. We already retry IndexedDb writes up to five times, but this doesn't seem to help in some scenarios (e.g. when the app is not in the foreground). |
Thanks! That makes sense. Cross-browser issues can be annoying. |
We are also experiencing similar issue. On lates version - 7.17.1
|
+1 -- seems to be happening most on Mobile Safari |
this is affecting all of our users for the registering process. any update? |
same here 🤕 |
Same here :( |
Can one of you provide the logs that immediately proceed these failures? This will help me narrow down what transaction is failing. Furthermore, do you see more or fewer of these errors since 7.18? 7.18 is the first version that is meant to address these issues. FYI Iam on vacation next week but will pick up this work once I get back. |
Is anyone aware of a workaround for users? |
Yep still having this problem as well :( really effecting user growth for a project im currently launching |
Unfortunately, I have no logs to share, but we have a stocktaking app in which you count items in stock by adding them to the current count. This means that during a single inventory count user repeatedly adds items to count. There's a user that's on iOS 13.16.1 (Firebase version 7.19 currently) and she usually has to reload the app after adding 10 or 20 items (that's 10 or 20 writes) because she experiences true data loss. We've set a .catch((e)=>{...}) that disables the button in question if something goes wrong, but in this case nothing happens - she probably gets an error in the console, but that is currently beyond our powers :) I've tested the "catch" by |
@IvanDeluxe For operations that are initiated by the user, we reject the operation itself if there is in IndexedDB error. This means that any operations that returns a Promise or a We have decided to only automatically retry operations in the SDK if they are not driven by user interactions (e.g. network calls), as we provide certain ordering guarantees for user-driven operations that would essentially mean that our SDK would need to stall as we poll for IndexedDB access. |
Same issue using Google Chrome on iphone |
I am having the same issue using PouchDB on iOS safari webkit. |
Same issue (Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36). |
Experiencing this with my app launching with a small percentage of users register for an email account. Users reporting seems to be coming from iPhone Safari. Not able to reproduce on my end. Their account details are not being pushed to the Firestore users collection so a fix, for now, seems to be just deleting their Firebase Auth user data, and telling them to try to create an account again. Any idea for a fix on this? |
Exactly what is happening to me. |
I just applied a hotfix for my app by updating firebase to v8.1.2 based on this thread: #1926 , hopefully the error what happen anymore! |
Ok, so I did just find a very interesting thing which might explain what is going on: I had a friendly who ran into this issue. I asked him to send me his IP via whatsmyip.net and he sent me back a screen shot that only had an IP v6 in it. Asked him to switch to wireless which had both IP v4 and IP v6 and it worked. I am getting the suspicion that - if the client doesn't have an IP v4, Firebase and iOS don't play well. Any thoughts on that? |
Also happening to me :/ |
1 similar comment
Also happening to me :/ |
Ok, so we got this from about 5-10% of our users experiencing this in some way or another to zero. The fix that worked for us is to update the libraries to an 8.x release (see release notes). Apparently quite a bit of work has been put into resolving this issue and it has been successful. |
Noice! Thanks so much for the confirmation @rupert-huelsey-tally. |
We are still facing the issue. I have included the sentry link for reference This issue particularly happens in Iphone. |
hello! did u fix this issue? |
browser: Error: FirebaseError Got this error on windows in chrome.. not really sure how to reproduce or it fix ? Does anyone know the cause and solution ? Here is the details of the above error: https://sentry.io/share/issue/a3d62523030a4b459b3e74e70336e5ea/ |
@cyanerd and @m-nathani - what is the version of the firebase libraries you are using? |
Current Firebase version we using:
|
The problem still presist with [email protected] |
Unfortunately, the Firestore team still does not have a fix for this issue. We are also heads down in other work that prevents us from investigating in a fix. This issue is, however, being tracked on our backlog. Someone from the Firestore team will update this issue if/when we have anything to update. I realize this problem is really causing frustration and I'm sorry that we don't have any better news at this point. |
Hi @dconeybe is there an update? It's been 2 months, and this crash is happening to our users every hour of every day.
|
@xaphod Sadly, no updates. I realize that this issue is frustrating and I wish I had a better response for you. Something that would be incredibly helpful would be a reproducible scenario, especially with a minimal app that we could clone and reproduce for ourselves. If you have the ability to reproduce this crash then please share those details. Even if you are unable to share your code, if you can reproduce the crash then we could ask you to try some different things and/or capture more detailed information. It appears that the crash is related to Safari going into the background, which may cause Firestore to lose its disk access. |
You can reproduce this bug in IOS by removing your cookies. As little as I can understand, the cause for this bug is when the user/os blocks the site permission to disk. For example by removing the cookie that is responsible for storage. I can suggest storing the response in memory and asking again for permission. |
Also hitting this bug on
|
for me it is not "firebase related" |
Also seeing this error in our error reporting - it seems to mostly (but not exclusively) affect our users who are not based in North America (Middle East, APAC, etc.). Browser is WebKit 605.1.15 (mobile Safari) |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Steps to reproduce:
I can't reliably reproduce it so not entirely sure what specifically causes it but here is the Sentry error:
https://sentry.io/share/issue/03f7cacb9f394cdd9867f13ad40345d8/
Once this errors subsequent requests start failing like this:
https://sentry.io/share/issue/aab1ab9ce88e4d50a3e40edbc27c0700/
Relevant Code:
This is my firebase setup:
https://github.com/AugustinGrigorov/vocabulary-builder/blob/master/src/utils/firebase.js
The text was updated successfully, but these errors were encountered: