Supabase errors and fixes
Supabase auth, row-level security (RLS), schema and Edge Function errors that show up in AI-built apps.
21 Supabase errors below. Each page shows the exact error text, what it means, likely causes and a step-by-step fix.
Updated .
Supabase errors at a glance
| Error | Most common cause | First thing to try |
|---|---|---|
| new row violates row-level security policy for table | RLS enabled with no INSERT policy. | Add an insert policy for authenticated users that own the row. |
| Supabase select returns an empty array (no error) | RLS enabled with no SELECT policy. | Add a select policy. |
| Invalid JWT / JWT expired | Session not refreshed (e.g. | Verify NEXT_PUBLIC_SUPABASE_URL and the anon key come from the same project (Dashboard → Project Settings → API). |
| supabaseUrl is required | Env var not set, misspelled, or not prefixed NEXT_PUBLIC_ / VITE_ for browser code. | Set the variables (Next.js). |
| relation "public.x" does not exist | The migration that creates the table was never run on this project. | Check Table Editor or run. |
| Could not find the column in the schema cache | Column name typo in your insert/update. | Confirm the column exists in Table Editor with exactly that name. |
| Email rate limit exceeded | Testing signups, magic links or password resets repeatedly with the default email provider. | Set up a custom SMTP provider (for example Resend, Postmark, AWS SES or Brevo) in the Dashboard's Authentication settings (SMTP Settings). |
| TypeError: Failed to fetch (Supabase Edge Function / CORS) | Edge Function doesn't handle the OPTIONS method. | If the project uses @supabase/supabase-js v2.95.0 or later, import the official CORS headers so they stay in sync with the client, and handle OPTIONS on every response (this is the approach in the official Supabase guide). |
| AuthApiError: Invalid login credentials | Wrong email or password. | Check the user exists in Dashboard → Authentication → Users for this project. |
| AuthApiError: Email not confirmed | Confirmation email not received (rate limits, spam, default SMTP). | Resend the confirmation. |
| RLS Disabled in Public: Table is public, but RLS has not been enabled | The table was created in the SQL Editor, a migration, or by an AI tool (Lovable, Bolt, Cursor) instead of the Table Editor. | Open Advisors → Security Advisor in the Supabase Dashboard to see every flagged table. |
| permission denied for table (Data API 42501) | New table created in public after the project opted into (or was rolled onto) "tables not auto-exposed to Data API" — no GRANT yet. | Check which roles already have grants on the table. |
| Supabase "Legacy API keys are disabled": migrate anon and service_role keys to publishable and secret keys | The legacy anon or service_role key (an eyJ... | Find every legacy key. |
| Supabase CLI v3: [inbucket] in supabase/config.toml is no longer supported | supabase/config.toml still has an [inbucket] section from an older supabase init (before v2.108.0). | Confirm the old key is still there. |
| HostedMutationConsentRequiredError on Supabase CLI v3 (functions deploy / secrets / config push / db push in CI) | The CLI was upgraded to v3 and the command was not given --yes. | Add --yes to every hosted change that runs unattended. |
| Supabase CLI v3: db push did nothing after upgrade (no --remote hits local stack) | The CLI was upgraded to v3, and a bare supabase db push that used to hit the linked hosted project now hits the local stack. | Add --remote so the command reaches the hosted project, and --yes when it runs unattended. |
| @supabase/server adapters removed Dec 1 (Hono, H3, Elysia, NestJS): migrate without turning 401 into 200 | You still import from @supabase/server/adapters/hono, h3, elysia or nestjs, and the package will stop shipping them on Dec 1, 2026. | Check versions. |
| Supabase branch merge permission error: token needs Production Branches read-write | You merge branches with a scoped personal access token that has Development Branches. | Confirm you are actually affected. |
| Supabase UPDATE succeeds with 0 rows and no error (RLS) | An UPDATE policy USING clause filters the row out for the current user, so the statement matches zero rows and raises nothing. | Make the 0-row case visible before you change policies. |
| Supabase select returns only 1,000 rows (no error) | The project uses the default maximum of 1,000 rows, so a select() without paging returns at most that many. | Page through results with .range(from, to). |
| Error 400: redirect_uri_mismatch (Google sign-in in a Supabase app) | Authorized redirect URIs in the Google client is missing the Supabase callback, or has a typo, a trailing slash, http versus https, or the app URL instead of the callback. | In the Google Auth Platform, open the Web application OAuth client. |
All Supabase fixes
- new row violates row-level security policy for table
Row Level Security is enabled on the table and no policy allows the current user to insert (or update) this row. - Supabase select returns an empty array (no error)
This is a common surprise in Lovable, Bolt, Cursor, and v0 apps: the query looks successful, but Row Level Security hid every row. - Invalid JWT / JWT expired
The access token sent to Supabase is expired or was signed with a different project's secret.. - supabaseUrl is required
createClient() was called with an undefined URL, usually because an environment variable is missing.. - relation "public.x" does not exist
This often shows up in Lovable, Bolt, Cursor, and v0 apps when the generated client queries a table that was never created on this Supabase project, or was only created in local SQL and never applied. - Could not find the column in the schema cache
This often happens right after a migration or an AI tool (Lovable, Bolt, Cursor, v0) adds a column and the app queries it before PostgREST reloads its schema cache. - Email rate limit exceeded
Supabase Auth refused to send another email (signup confirmation, magic link, password reset or invite) because a sending limit was hit. - TypeError: Failed to fetch (Supabase Edge Function / CORS)
AI tools such as Lovable, Bolt, Cursor, and v0 often scaffold a Supabase Edge Function without CORS handling, so the browser blocks the call. - AuthApiError: Invalid login credentials
signInWithPassword was rejected: no user with that email/password combination could be authenticated.. - AuthApiError: Email not confirmed
Email confirmation is enabled and this user hasn't clicked the confirmation link yet.. - RLS Disabled in Public: Table is public, but RLS has not been enabled
This is a Supabase Security Advisor warning, not a crash. - permission denied for table (Data API 42501)
This often hits Lovable, Bolt, and Cursor apps after they create a new public table and query it immediately. - Supabase "Legacy API keys are disabled": migrate anon and service_role keys to publishable and secret keys
Supabase is deprecating the legacy anon and service_role keys by the end of 2026. - Supabase CLI v3: [inbucket] in supabase/config.toml is no longer supported
Projects created with supabase init before v2.108.0 still have an [inbucket] section in supabase/config.toml. - HostedMutationConsentRequiredError on Supabase CLI v3 (functions deploy / secrets / config push / db push in CI)
Every command that changes a hosted project now asks for confirmation first, and the default answer is No. - Supabase CLI v3: db push did nothing after upgrade (no --remote hits local stack)
In v3, database commands target your local stack by default. - @supabase/server adapters removed Dec 1 (Hono, H3, Elysia, NestJS): migrate without turning 401 into 200
Supabase deprecated the Hono, H3, Elysia and NestJS adapters in @supabase/server (change type Deprecation, sunset date 2026-12-01, self-hosted not affected). - Supabase branch merge permission error: token needs Production Branches read-write
A merge applies a branch's changes to your production project. - Supabase UPDATE succeeds with 0 rows and no error (RLS)
Postgres does not treat an UPDATE that matches zero rows as an error. - Supabase select returns only 1,000 rows (no error)
This often shows up in Lovable, Bolt, and Cursor apps when a generated list, table, or export calls select() once and assumes every matching row came back. - Error 400: redirect_uri_mismatch (Google sign-in in a Supabase app)
This often shows up in Lovable, Bolt, Cursor, or v0 apps that add Sign in with Google through Supabase.
Related error categories
- Serverless & Edge Function errors: 5 pages
- Supabase auth errors: 8 pages
- Supabase database & RLS errors: 9 pages
Not sure which one you have? Take the quiz →
Other platforms
Next.js · Vercel · Stripe · Cursor · Lovable · Bolt · Rocket.new · Replit
Get new fixes weekly
No spam. Unsubscribe anytime. Privacy