© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•8mo ago•
1 reply
WOOSEONG

Supabase client stops working after switching browser tabs (works only after refresh)

Hi Supabase team,

I'm running into an issue with
@supabase/supabase-js
@supabase/supabase-js
in a Vite + Svelte app.

The client works fine at first, but when I switch to another browser tab and then return, Supabase methods stop working — for example,
supabase.auth.getSession()
supabase.auth.getSession()
or any
supabase.from(...).select()
supabase.from(...).select()
calls do nothing. It's like the client is no longer active. However, if I reload the page, everything works again.

I want the Supabase client to keep working without a full reload when the user returns to the tab. I've tried manually reinitializing the client on
window.focus
window.focus
, but that didn't help.

What could be causing this? Is this a known issue with how Supabase handles tab visibility or backgrounded tabs?

Thanks in advance!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Supabase Variables Not Loading After Switching Tabs
SupabaseSSupabase / help-and-questions
4w ago
Supabase Multiple Browser Tabs Issue
SupabaseSSupabase / help-and-questions
13mo ago
user being fetched only after browser tabs changed.
SupabaseSSupabase / help-and-questions
4y ago
For some reason, switching browser tabs makes Supabase requests start failing.
SupabaseSSupabase / help-and-questions
2w ago