-
Notifications
You must be signed in to change notification settings - Fork 894
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
auth: Failed to execute 'transaction' on 'IDBDatabase' #1926
Comments
Any one else seeing this issue? I'm seeing this out in the field as well. Is it possible to go back to the good old days of local storage for auth? IndexedDB seems extremely buggy. |
I have not been able to replicate it on a test device (test app using auth only) but according to the other bug, this seems to be a bug in indexedDB in iOS. Note that for our future modularization efforts, we will provide more granular control over how persistence is implemented. You will be able to use |
There's definitely a known bug in indexdb in Safari on 12.2 (and I think 12.3 too), but at least @alexplumb has apparently observed this on non-iOS devices. Unfortunately, I'm not aware of anyone who's been able to reproduce this (on non-iOS devices) so this may not be actionable until someone's able to provide more details. :( |
Operating System version: Mac Hey, I'm also getting this error every time I try to createUserWithEmailAndPassword, but it always saves fine to Firebase. I came from the other thread, so I set the log level to true. I currently haven't set up any databases and am just working with auth right now. |
Hi @bojeil-google when will we be able to get a non-indexedDb version of auth? |
I've just seen this issue reported through Sentry too, on Mac, Chrome v76:
Is there anything I can do to help debug this? |
We are also getting lots of this kind of events in multiple versions of Chrome (from 67 to 76) both on MacOS and Windows. This does not seem specific to Safari or to iOS devices. As others have said, there is XHR POST to POST https://securetoken.googleapis.com/v1/token?key= followed by an exception:
|
We are tracking issues via Sentry and I can see increase in number of events from past couple of days.
I haven't been unable to reproduce this issue.
|
I confirm this bug since today.
(It is a rollup-ed import of firebase auth as module) In DevTools the errored source underlined is :
and triggers error on the word "transaction" It happens after I Google One Tap (Smartlock) auto-sign-in, then make a... await self.firebase.auth().signInWithCredential(credentials) ...to login to Firebase, in order to be able to get user-related stuff. Weird because it was working 2-3 days ago, the last time I checked code, and I didn't make something special to trigger this error. I deactivated all my Chrome extensions and I still get the error. Maybe related to some hidden race condition in Firebase Auth code, but now no longer valid because reasons ? |
Disappeared today. Weird. |
Just got a report of this on a Samsung s8 (will find out browser and os version). |
We are also seeing this issue some times. Reported in Rollbar 3 times over the last month. Safari and Chrome, both on mobile. |
Got this error today on OS X within angular fire on chrome. |
We just got a report from one of our users getting this issue when trying to login as well. App is using firebase 6.0.4 User info (Desktop): He also says he's behind a company firewall, not sure if that has anything to do with this... |
Was a fix found for this issue? I'm seeing this for some users when they try and create an account across all of our sites. |
App is using 7.2.2, still seeing this issue with some users. Please suggest workaround |
Same issue randomly. Got it on web in Chrome latest |
I can reproduce this error, whether this is the failure mode seen be users is an open question. |
We also see a number of these errors in our Sentry logs. We do not use Firestore persistence, but we are using session persistence for Firebase auth. Our errors are also not limited to iOS devices and seem to affect a number of different browsers and versions (mostly Chrome, Chrome Mobile + Safari). The errors do not occur only during the auth process. Is it possible that having persistence enabled for the Auth service is affecting Firestore's persistence? |
I have also seen this bug on Safari 13.0.1 OSX 10.14.6 It happens when I clear my browsing history without restarting the browser. It can keep generating the error until the browser is completely closed and restarted. |
error started popping up out of nowhere |
Chrome I'm having this same error as well. |
I'm use firebase v7.7.0 I'm follow @sorinpav 's step in android chrome and show this same error. |
the error happens if you do Clear Data and Do not reload the page |
@BorisDaich I think that by now everyone is aware of that. The actual question here is: |
Guys are you using |
@HonzaTuron no just the standard Firebase JS library. The issue is in webkit rather than the library I believe. |
@avolkovi My app is quite similar than @danbaechtold, the user scan a QR code in a Restaurant to see the menu, but only social and anonymous authentication are used. The tab can go to the backgroud by signInWithPopup |
When you say app are you wrapping it in Cordova or Capacitor? |
No, it's WEB |
Then the only solution is to catch those errors and restart the app. I tried pretty much everything and could find nothing else which worked. These are the errors that I found Firebase / this bug generated. What I did was to detect the error, throw up a loading screen over the app and then reboot the app. To do a loading screen, especially outside a JS framework, just add a class html with a loading screen :after body, and when the app boots detect if that class exists to restore the app and remove the loading screen.
|
If someone encountered such an error in their project and got into this topic, check if you are trying to save in idb an object of one of the properties of which the function |
One of my users just encountered this issue as well. On Safari. |
In case it helps: I got a solid 100% repro of this by having the following situation (I am not claiming this situation is valid, I did it by accident), on iPadOS 14.0.1:
Workaround for me: open Safari (the app itself), navigate to my web app, sign out. Then native app stops seeing this error in its WKWebView javascript. I'm mentioning this because I think that if people are using FirebaseUI they might be hitting this issue, where there is actually someone already signed in (in some context) that is conflicting somehow. |
I have experienced this since we have users complaining they are not able to create their account. Our application is running on web only. I understand that this is intermittent because this is happening on around 1-2% of the sign ups we have. Our flow is simple:
Observations:
Manual solution:So our support has to manually delete the email Auth entry, ask the user to clear the cache and try again. I added more logs since Oct 29, and found 27 errors. Error code: 11 Suggestion to Firebase Team:Would it be possible that when IDBDatabase error happens, the user MUST not be created in Auth? Planned Workaround:What I am thinking is when this happened:
Any comments would be very useful. |
This feels like its being swept under the rug by the Firebase Team, can we get some assurance you guys are treating this as a serious issue? |
@xaphod Thanks for the steps, it doesn't look like anyone else is experiencing this in WebView, are you able to reproduce this in Safari or just WebView? @jeynergil as mentioned in #1926 (comment) it's impossible for the user to not be created since this error occurs after the API call. @elucidsoft As mentioned before, we are unable to reproduce this error in a meaningful way (short of manually deleting the database while the app is running). We have tried reproducing on devices using our test apps, and on the iOS simulator to no avail. We are looking into it, but without a way to reproduce there is no way for us to provide a fix that we can guarantee will work. We have had an open bug with Webkit (https://bugs.webkit.org/show_bug.cgi?id=197050) and they have not been able to reproduce either. Any help you can provide on reproducing this issue would be appreciated. |
@avolkovi I've only experienced it in WKWebView. You mentioned that you have not been able to reproduce it. Did you try the repro steps I outlined above? I was able to get a 100% repro, ie. every time the javascript loaded & executed, this error always occurred. |
@xaphod we're trying to reproduce the error as seen by customers without being too contrived. For instance, we know the issue happens if someone clears their cookies or deletes their IndexedDB while the app is running, but that's not a supported flow and does not line up with the reports on this thread around the issue happening during signup. Your steps involve multiple apps and multiple users, which is not consistent with the error reports from end users. So while it may trigger a similar error, it brings us to no closer to understanding why it's happening or how to prevent it from happening in the first place. |
I having been having the same issue: I can reproduce it. It happens 100% for me |
I appreciate if anyone can help. Let me know if needed for me to reproduce the error |
If firebase agrees to pay outsiders to fix this, I am sure lots of people will try |
Here is the stacktrace: |
I am only in the testing stages but this also seems to happen to my users nearly 100% of the time when they try to I will deploy to a new channel I send the link via gmail to a friend to test (all testers thus far have had iPhone) After a reload they are sometimes able to login. |
Out of 25 testers this has happened to 4 people. Not good numbers. |
This seems a very critical problem. I am surprised it lasts so long. What are the other alternatives? |
I was able to reproduce this locally following the instructions posted above (delete firestore indexdbs and try to sign in or create account). Using that knowledge, I split my sign-up into two steps, the first being email/password and the second all the other info. On signup I catch the IDB error and redirect the user to a sign-in screen (their auth account is created despite the error), do a hard refresh of the page, prefill their email and ask them to sign in. The sign-in screen also catches the IDB error and will display a message asking them to try another browser or device, which would be the second time that error was experienced in this flow and a hard refresh did not regenerate the IDBs. Originally I created a callable function that would be triggered on that error and would delete the auth account via adminsdk but it never got called, likely due to the disconnect. |
Folks- the next release will retry these errors like Firestore does, please reopen if you're still experiencing issues on the new version. |
I thought I was able to reproduce this as I got it to happen about 4 times in a row. Then all a sudden I could never get it to happen again, no matter what I tried. Freaking bizarre... |
Out of interest what is the new version that will fix this problem? I just updated to the latest firebase 7.24.0 and I can reproduce this error locally consistently every-time by deleting my browser cookies. We also get this on our live and beta sites whenever we do a new deployment and its showing up in our rollbar errors. |
The most recent version is 8.1.2: https://firebase.google.com/support/release-notes/js#8.1.2 |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Migrating this issue on behalf of @alexplumb from #1533. We've seen this indexdb issue in Firestore on Safari 12.2 (both in #1533 and the canonical one for that issue, #1670).
However, Alex doesn't seem to have persistence enabled, so firestore shouldn't even be looking at indexdb. The name of the indexdb in question is "firebaseLocalStorageDb" which looks like it's the auth db (https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/src/storage/indexeddb.js#L191)
Steps to reproduce:
Happens inconsistently; unable to reproduce. :(
The text was updated successfully, but these errors were encountered: