Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

onIdTokenChanged / onAuthStateChanged never fire setPersistence(LOCAL) Promise hangs (Firebase JS 8.10.1)#9127

Unanswered
bhavesh-songara asked this question inQ&A
Discussion options

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 wrappedsetPersistence(Auth.Persistence.LOCAL) with.then/.catch logs—neither handler ever runs, indicating the Promise stays “pending”.
firebase.auth().currentUseris logged right before the listener is attached, so the code path is reached.

this.firebaseAuth.setPersistence(Auth.Persistence.LOCAL).then(()=>console.log('[Auth] persistence set'))// never prints.catch(err=>console.error('[Auth] persistence error',err));// never prints

Why we suspect IndexedDB

setPersistence(LOCAL) relies on IndexedDB. If the database open hangs, the Promise never settles and no auth events fire.

Environment

ItemValue
Firebase JS SDK8.10.1
FrameworkIonic 5 + Capacitor 6 (React 17)
Persistence requestedAuth.Persistence.LOCAL
ReproducibilitySporadic in production; not yet reproduced internally

Questions

  1. Is a never-resolvingsetPersistence() Promise a known issue?
  2. Recommended ways to detect or recover from this state?
  3. Would upgrading to Firebase v9+ likely help?

Any insights or similar experiences would be greatly appreciated. Thank you!

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@bhavesh-songara

[8]ページ先頭

©2009-2025 Movatter.jp