Short answer
Supabase lists three common causes: a trigger or trigger function on auth.users that has an error, a constraint on auth.users that isn’t met, or Prisma breaking the permissions on that table. Open the Auth logs first, then the Postgres logs, for the exact error. A frequent one is a handle_new_user trigger inserting into a profiles table that doesn’t exist.
What to check, in order
01
Read the exact error in the logs
“The logs surface the specific error message and give you the most direct signal about what went wrong.” Supabase, Database error saving new user
Start in the Auth logs explorer in your project dashboard. If they point at the database, open the Postgres logs: Supabase’s example there names the function and the line that failed.
02
A trigger on auth.users fails
“A trigger on auth.users is calling a function (in this case handle_new_user) that tries to insert into a table that does not exist.” Supabase, Database error saving new user
Many apps copy a profile row into public.profiles when someone signs up. If that table is missing, renamed or doesn’t match what the function inserts, every sign-up fails. Create the table if it should exist, or update or remove the reference in the function on the Database Functions page.
03
Users were added with SQL, not the Auth API
“A direct insert can leave required columns as NULL when the Auth service expects an empty string.” Supabase, Database error saving new user
If users were inserted straight into auth.users, by hand or by an AI tool running a SQL INSERT, the logs show Database error querying schema with an error like converting NULL to string is unsupported on confirmation_token, usually when those users sign in. Supabase’s fix sets that column, or whichever one the error names, to an empty string where it is NULL.
update auth.users set confirmation_token = '' where confirmation_token is null;04
Duplicate key on profiles at sign-up
“If the trigger fails, it could block signups, so test your code thoroughly.” Supabase, Managing user data
We also see duplicate key value violates unique constraint on the profiles table when two things insert the same profile, such as the trigger and the app’s own code after signUp(). We keep one of them, or make the trigger’s insert skip an existing row with on conflict do nothing, then test a fresh sign-up.
05
A constraint on auth.users, or Prisma
“You are using Prisma and it has broken all the permissions on the auth.users table” Supabase, Database error saving new user
Supabase also lists a constraint added to auth.users that isn’t being met. Check for constraints on that table, and if the project uses Prisma, check the table’s permissions.
Checked against the vendor’s docs on : Supabase troubleshooting: Database error saving new user; Supabase docs: Managing user data.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way.See scope and start
Related: Supabase new row violates row-level security · Supabase Email not confirmed · Supabase migration failed on db push · Supabase public storage bucket