next.jssupabasesupabase-js

Local supabase-nextjs-user-management with Supabase CLI returns 406 Errors


I'm using Supabase CLI and nextjs-user-management sample.

After creating a user using the Next.js auth flow, I see 406 responses after loading the account screen, as well as with any attempts to update the user's data. I have not made any changes to the codebase. Anything I can look into here? (I'm new to Supabase)

If I change my .env.local NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY values to point to values on supabase.com (rather than local values), things work, so it seems related to a local configuration?

the response looks like:

{
    "code": "PGRST106",
    "details": null,
    "hint": null,
    "message": "The schema must be one of the following: "
}

enter image description here


Solution

  • It turned out the sample I was using did not have the correct values for schemas and extra_search_path inside config.toml. They should look like:

    schemas = ["public", "graphql_public"]
    extra_search_path = ["public", "extensions"]