Skip to content

fix(auth): handle uncaught promise rejections during initialization#2032

Merged
mandarini merged 1 commit into
supabase:masterfrom
7ttp:fix/uncaught1
Jan 22, 2026
Merged

fix(auth): handle uncaught promise rejections during initialization#2032
mandarini merged 1 commit into
supabase:masterfrom
7ttp:fix/uncaught1

Conversation

@7ttp

@7ttp 7ttp commented Jan 18, 2026

Copy link
Copy Markdown
Contributor

Problem

initialize() is called in the constructor without a .catch() handler.
When using async storage adapters (e.g., Chrome extensions), lock acquisition timeouts or storage errors cause unhandled promise rejections that crash the application.

Solution

Add .catch() handlers to initialize(), broadcast channel message handler, and visibility change callback.
Errors are logged via _debug() and remain retrievable via await client.initialize().

Related

@7ttp 7ttp requested review from a team as code owners January 18, 2026 08:51
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 80.955% (-0.04%) from 80.997%
when pulling 60edfa5 on 7ttp:fix/uncaught1
into 09aa106 on supabase:master.

@mandarini mandarini merged commit 0a421a9 into supabase:master Jan 22, 2026
24 of 25 checks passed
@7ttp 7ttp deleted the fix/uncaught1 branch January 22, 2026 09:54
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.

createClient throws during _initSupabaseAuthClient when storage is empty/freshly cleared

3 participants