← All errors · SupabaseSupabase database & RLS errors

Supabase select returns an empty array (no error)

Exact error

{ data: [], error: null }

What it means

This is a common surprise in Lovable, Bolt, Cursor, and v0 apps: the query looks successful, but Row Level Security hid every row. With RLS enabled and no SELECT policy matching the user, Postgres silently filters out all rows. No error is raised.

See also: official Supabase guide: Why is my select returning an empty data array and I have data in the table?.

Likely causes

How to fix it

  1. Add a select policy:

    create policy "Users can read their own todos"
    on public.todos for select
    to authenticated
    using ( (select auth.uid()) = user_id );
  2. For public data, allow anon reads explicitly:

    create policy "Public read"
    on public.posts for select
    to anon, authenticated
    using ( true );
  3. Test in the SQL editor's role switcher, or check the user session in the client.

  4. If Lovable, Bolt, or Cursor built the query, paste this so it adds a real SELECT policy instead of turning RLS off:

    supabase.from(...).select() returns { data: [], error: null } even though the table has rows. Check Row Level Security: add a SELECT policy for the role the app uses (authenticated or anon), and confirm the client has a session if the policy uses auth.uid(). Do not disable RLS to fix this.

Still stuck after trying this? Get it fixed for $49, or you don't pay.

Prevent this next time

FAQ

What does "Supabase select returns an empty array (no error)" mean?

This is a common surprise in Lovable, Bolt, Cursor, and v0 apps: the query looks successful, but Row Level Security hid every row. With RLS enabled and no SELECT policy matching the user, Postgres silently filters out all rows. No error is raised.

What usually causes it?

RLS enabled with no SELECT policy. Policy restricts to authenticated but the request is anonymous. Querying the wrong schema or table name.

How do I fix it?

1. Add a select policy: 2. For public data, allow anon reads explicitly: 3. Test in the SQL editor's role switcher, or check the user session in the client. 4. If Lovable, Bolt, or Cursor built the query, paste this so it adds a real SELECT policy instead of turning RLS off:

Last checked against official docs on . Sources: Official Supabase Knowledge Base: Why is my select returning an empty data array and I have data in the table?.

Related errors

More Supabase errors and fixes →

Tools that help

  • Railway: Deploy backends and databases; new users get $20 credit.

Some links on this page are affiliate links: if you sign up or buy through them, FixStack may earn a commission at no extra cost to you. Learn more.

Get new fixes weekly

No spam. Unsubscribe anytime. Privacy