Paul Milliken

Error guide

Row-level security is on and the query returns an empty array

What it means

The database answered, but none of the rows matched a rule that lets this request read them, so it returned none. With row-level security on and no matching read rule, you get an empty list rather than an error.

Check these, in order

  1. Is there a rule for reading? On Lovable Cloud: More → Database, click the table, then RLS policies. On your own Supabase project: Database → Policies. Look for a SELECT policy on that table.
  2. Is the request signed in? A rule for signed-in users (authenticated) doesn't cover a request sent before the session is ready, which runs as anon. Check whether the query runs before sign-in finishes, for example on page load.
  3. Does the rule match these rows? If the rule says user_id must equal the signed-in user, rows saved without a user_id, or under another user, stay hidden from everyone.

Still stuck? Send me the app

I'll show you what's wrong, on video, within 24 hours. Free.

Free. No call. If I can't find the cause, I'll tell you so.

Please don't put passwords or keys in the form.