-
Notifications
You must be signed in to change notification settings - Fork 928
Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing. #1533
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
Hi @sengoontoh! Sorry to hear about your issue. Can you confirm that this is not happening if you do not have |
@sengoontoh I'm going to close this issue for lack of activity. We are still interested in this issue, but need logs to be able to diagnose what's going on. We'll reopen if you can supply them. |
I just wanted to chime in and say "me too!", although not in any way that I'm able to reproduce. I'm currently logging errors through Sentry and unfortunately all I'm able to get from it is the error message - no stack trace. I can confirm that I do not have You can see the error report here: https://sentry.io/share/issue/63f683911d7b4b428d164a7deee62d52/ User agent that this happened to: I wish I could provide more information, but I hope this helps! |
Same error message using |
I'm having the same issue on attempted login, but only when Google is the OAuth provider. Regular email login works fine. We use cordova-ios 4.5.5 on iOS 12.2. Tested consistently on iPhone 7 so far. Whether I use Firebase's pre-built login UI or roll our own, we get an error (code 11) "Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing." When I run from Xcode, we get several console errors:
... and the like. |
@vaporizationator @SparrowBlaze Could you please enable logging and provide the logs? Please be sure to remove any sensitive information. |
@var-const I'm having trouble with the link you sent. Is there a method or function to set firebase auth's log level? |
@SparrowBlaze Fixed the link in the comment, sorry about that! The call looks like firebase.firestore.setLogLevel('debug'); |
@var-const Thanks! Running it now. |
Here's all I got. The error happened on the first login attempt.
|
I should mention that this behavior varies from run to run for me. Sometimes, the login works at the first attempt. Usually, this error comes up, and any login is prevented until the app is restarted. Sometimes it requires eight reloads in a row before login works. It's inconsistent. |
Here's the log from Safari's inspector:
|
it happens with firestore when you use enablePersistence, even when using experimentalTabSynchronization: true |
iOS 12.2 and "an internal error was encountered in the indexed database server"? So, I don't think this is related to the original issue. But it does look an awful lot like this one: #1670. If that's the case, then the cause is possibly a safari bug. We reported it to Apple here: https://bugs.webkit.org/show_bug.cgi?id=197050. Although it seems likely that this is a duplicate of: https://bugs.webkit.org/show_bug.cgi?id=196372. If this seems to be the likely culprit, follow along on #1670. If this doesn't seem like a reasonable explanation (i.e. these errors are showing up for android users, or non iOS 12.2 users) feel free to re-open. |
@rsgowman I'm looking at my error reports and this is happening to people in Chrome on Android and Windows as well. |
Hey @alexplumb, Are you able to provide logs? (You'll have to enable logging; see above.) Though this will be difficult if you can't reproduce the issue yourself. Looking at your above message, it sounds like you're not even enabling persistence? Is that still the case? I'll verify with the rest of the team, but I don't think we even attempt to do anything with the local indexdb in this case, so this would be really surprising. Are you certain the error is coming from Firestore? Looking over this issue's history, there seems to be a bunch of different problems jumbled together. If you're able to provide more details, it might be helpful to do so in a new issue rather than continuing here. |
I'm not enabling offline persistence, no. I'm also not able to reproduce, as this issue isn't happening to me - I'm simply seeing these messages popping up in my Sentry log. I have no way of knowing that this is something that Firestore specifically is doing, but I'm pretty sure something about the Firebase platform is creating a local indexdb. I use Firebase hosting and I'm using Auth, Storage, and Firestore. If I clear my cookies and delete my local + database storage, when I refresh the page I still see a local database. Looking through my logs in Sentry, I see the following two messages always appearing one after the other: You can find the Firestore log below - I removed all of the lines that showed the data it was fetching.
|
Is the name of the indexdb "firebaseLocalStorageDb"? (If you're running chrome, you can check that by opening developer tools -> 'application' tab, storage (on the left), indexdb). If so, that's likely the auth database and a separate issue from anything else in this ticket. |
Yup, that's the name of the one in my Application tab. |
@alexplumb; Since this seems to be a separate (albeit related) issue, I've migrated your issue to #1926 and tagged it with auth. Lets continue over there. |
I've just seen this issue reported through Sentry too, on Mac, Chrome v76: Crumbs:
Anything I can do to help debug it? |
@alexlouden If this is the same auth issue that was discussed above, that's being tracked by #1926 so that would be the place to look. Thanks. |
Sorry, will do! |
I'm getting the following errors on a subset of clients as soon as the app starts.
Error: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
at Function.t.open (file:///android_asset/www/build/vendor.js:1:1435639)\n at e.runTransaction (file:///android_asset/www/build/vendor.js:1:1434439)
at t.updateClientMetadataAndTryBecomePrimary (file:///android_asset/www/build/vendor.js:1:1470615)
at file:///android_asset/www/build/vendor.js:1:1477331
at file:///android_asset/www/build/vendor.js:1:1427105
at t.invoke (file:///android_asset/www/build/polyfills.js:3:14976)
at r.run (file:///android_asset/www/build/polyfills.js:3:10143)
at file:///android_asset/www/build/polyfills.js:3:20242
at t.invokeTask (file:///android_asset/www/build/polyfills.js:3:15660)
at r.runTask (file:///android_asset/www/build/polyfills.js:3:10834)
I have multi-tab persistence enabled. The error keeps on happening in the session. Any ideas what might be happening and how to mitigate?
The text was updated successfully, but these errors were encountered: