Skip to content

Conversation

@7ttp
Copy link
Contributor

@7ttp 7ttp commented Dec 6, 2025

what

when persistSession: false is set, the auth client was still using navigator locks for cross-tab coordination. this caused NavigatorLockAcquireTimeoutError to appear in the console even though there's no shared state between tabs when sessions are stored in memory only.

why

navigator locks are used for cross-tab session coordination. when persistSession: false:

  • sessions are stored in memory only (not localStorage)
  • each tab has its own isolated session
  • no cross-tab coordination is needed
  • the lock acquisition can fail and throw errors unnecessarily

this is consistent with how BroadcastChannel is already handled in the same file, which also checks persistSession before enabling cross-tab communication.

how

added his.persistSession check to the condition for using avigatorLock. when persistSession: false the client now uses lockNoOp instead.

closes #1517

@7ttp 7ttp requested review from a team as code owners December 6, 2025 14:07
@coveralls
Copy link

coveralls commented Dec 6, 2025

Coverage Status

coverage: 95.367% (+14.2%) from 81.176%
when pulling 65946b9 on 7ttp:bug2
into 0baaf06 on supabase:master.

@mandarini mandarini self-assigned this Dec 8, 2025
@mandarini mandarini merged commit eae712d into supabase:master Dec 8, 2025
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NavigatorLockAcquireTimeoutError on client init — no way to silence lock acquisition

3 participants