cd /news/developer-tools/supabase-form-says-saved-but-nothing… · home › topics › developer-tools › article
[ARTICLE · art-175832] src=getpublishub.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Supabase form says "Saved " but nothing is saved: how to fix it

A Supabase form that displays "Saved!" without persisting data is most often caused by row-level security (RLS) rejecting the insert while the code ignores the error object returned by supabase-js, according to a Publishub troubleshooting guide by founder Valmir. The guide instructs developers to check the { data, error } result of every insert, add an insert policy such as "Users can insert their own notes" with check (auth.uid() = user_id), and read the row back after saving to confirm it persisted. It also flags related causes including a missing select policy when .insert(...).select() returns empty data, a "Could not find the column" mismatch often introduced when AI-generated code renames a field on one side only, and requests running as the anon role when no session exists.

recommendation

Check the { data, error } result of every Supabase insert and add a matching RLS insert policy with check (auth.uid() = user_id), then read the row back to confirm it persisted.

more in playbook: Running AI in production
by read3 min views1 publishedNov 25, 2026

Updated November 25, 2026 · by Valmir, founder of Publishub

Short answer

supabase-js doesn't throw when an insert fails: it returns an error object, and if the code ignores it, the app shows "Saved!" anyway. The most common cause is row-level security (RLS): the table has RLS enabled but no policy that allows this user to insert, so Postgres rejects the row with "new row violates row-level security policy". Check the error, add an insert policy, and read the data back to confirm.

Step 1: stop ignoring the error #

  1. 01Look at what the insert returns Every Supabase call returns { data, error }. Show the error instead of the success message when it's set. AI-generated code often skips this check.
const { error } = await supabase.from("notes").insert({ title, user_id: user.id });
if (error) {
  console.error(error);
  showError("Couldn't save. Please try again.");
  return;
}
showSuccess("Saved!");
  1. 02Read the message Open the browser console and the Network tab, save again and look at the failed request. The error message tells you which of the causes below you have.

Step 2: fix the cause #

  1. 01"new row violates row-level security policy" (RLS) RLS is on and no policy allows the insert. Add one that lets logged-in users insert rows they own, in the Supabase SQL editor:
create policy "Users can insert their own notes"
on public.notes for insert
to authenticated
with check (auth.uid() = user_id);
  1. 02The insert works but data comes back empty If the code calls .insert(...).select() and there's no select policy, the row is saved but can't be read back. Add a matching policy for select (using (auth.uid() = user_id)).
  2. 03"Could not find the column" The code sends a field name the table doesn't have, often after the AI renamed something on one side only. Make the names match the table in Supabase's Table Editor.
  3. 04The user isn't logged in With RLS, a request without a session runs as the anon role and fails policies meant for authenticated users. Check that the session exists before saving.

Step 3: prove it saved #

After the fix, save something, reload the page and confirm it's still there, or check the table in Supabase. Then test with a second account: it should not see the first account's rows. That last check catches the opposite mistake, a policy so open that everyone can read everything.

To catch this automatically after every change, run a journey that saves something and reads it back. stillworks, a free open-source tool, has a ready-made "read the data back" recipe for exactly this case.

Free tool · No signup

Check your app now, in about a minute #

Paste your app's URL. We open it in a real browser and show JavaScript crashes, failed requests and broken pages. Read-only: we never log in or submit forms.

Questions #

Should I just disable RLS to make it work? #

Why does it work in the Supabase dashboard but not in my app? #

Stop checking by hand after every AI change #

Publishub is building the full version: your sign-up, login and checkout journeys, run in a real browser after every deploy and compared with the last version that worked. It's in development; the waitlist is open.

── more in #developer-tools 4 stories · sorted by recency
── more on @supabase 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/supabase-form-says-s…] indexed:0 read:3min 2026-11-25 · —