Skip to content

When logged in state, supabase client not working after switching to another browser tab and returning. #557

@nice89

Description

@nice89

Version

OS: window 11
nodejs: 22.14
"vue": "^3.5.21"
"nuxt": "^4.1.2"
"@nuxt/ui": "^4.0.0"
"@nuxtjs/supabase": "^2.0.1"

Reproduction Link

Here is repository link https://github.com/nice89/nuxt-supabase-bug

  1. Download the Git repository.
  2. Rename the .env.example file to .env and update the environment variables.
  3. Run the project.
  4. Try out the operation cases described in the comments within the TestBtn component source.

Steps to reproduce

Click the displayed TestBtn component for each of the four cases listed below.

  1. Works when the user is not logged in.
  2. Works after switching to another browser tab and returning.
  3. Works when the user is logged in.
  4. Does NOT work after switching to another browser tab and returning.

What is Expected?

supabaseClient object worked.

What is actually happening?

In the browser developer console:

  • The expected output does not appear in the console tab.
  • No requests are shown in the network tab.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions