onIdTokenChanged / onAuthStateChanged never fire setPersistence(LOCAL) Promise hangs (Firebase JS 8.10.1) #9127
Unanswered
bhavesh-songara
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all looking for guidance on an intermittent Firebase Auth issue.
What’s happening
• Some users open the app and remain stuck on the loading screen.
•
onIdTokenChanged
andonAuthStateChanged
never fire (no logs).• We wrapped
setPersistence(Auth.Persistence.LOCAL)
with.then
/.catch
logs—neither handler ever runs, indicating the Promise stays “pending”.•
firebase.auth().currentUser
is logged right before the listener is attached, so the code path is reached.Why we suspect IndexedDB
setPersistence(LOCAL)
relies on IndexedDB. If the database open hangs, the Promise never settles and no auth events fire.Environment
Auth.Persistence.LOCAL
Questions
setPersistence()
Promise a known issue?Any insights or similar experiences would be greatly appreciated. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions