Since 30 October 2026, new Supabase tables aren't granted to the Data API automatically. So the first time your app touches a new table, supabase-js returns:
code: "42501" message: "permission denied for table notes"
Enter fullscreen mode
Exit fullscreen mode
It's not a bug. Your app talks to Supabase as anon (logged out) or authenticated (signed in), and a role needs a Postgres GRANT before it can touch a table at all. Older tables got those grants for free. New ones don't.
The fix is one line. The problem is which line your AI tool picks.
Two errors, same code
Both of these come back as 42501 , but they mean different things:
Message What's wrong Fix
permission denied for table … No grant for that role Add a narrow GRANT
new row violates row-level security policy … RLS blocked this row Add the missing policy
If you paste either one into Lovable, Bolt or Cursor, check which one it is first.…