© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
32 replies
Tribe

New Row Violates security policy - with policies allowing all operations

I have a public bucket with RLS policies on
storage.objects
storage.objects
set for all operations and all users to be just
true
true
. But even just a simple attempt to list the buckets results in a Security Policy Error

const listBuckets = async () => {
   const client = createClientComponentClient({
      supabaseUrl: env.NEXT_PUBLIC_SUPABASE_URL,
      supabaseKey: env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
    });

   const buckets = await client.storage.listBuckets()
}
const listBuckets = async () => {
   const client = createClientComponentClient({
      supabaseUrl: env.NEXT_PUBLIC_SUPABASE_URL,
      supabaseKey: env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
    });

   const buckets = await client.storage.listBuckets()
}


Policies

create policy "allow_select"
ON storage.objects
for select using (
  true
);

create policy "allow_insert"
ON storage.objects
for insert with check (
  true
);


create policy "allow_update"
ON storage.objects
for update using (
  true
);

create policy "allow_delete"
ON storage.objects
for delete using (
  true
);
create policy "allow_select"
ON storage.objects
for select using (
  true
);

create policy "allow_insert"
ON storage.objects
for insert with check (
  true
);


create policy "allow_update"
ON storage.objects
for update using (
  true
);

create policy "allow_delete"
ON storage.objects
for delete using (
  true
);


Any help would be greatly appreciated... I've already gone through all the related content posted by Supabase to make sure my policies match, but no such luck yet.

Thanks
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

StorageApiError: new row violates row-level security policy
SupabaseSSupabase / help-and-questions
4mo ago
upsert() new row violates row-level security policy
SupabaseSSupabase / help-and-questions
4y ago
New row violates row-level security policy for table
SupabaseSSupabase / help-and-questions
4y ago
New row violates row-level security policy for table objects
SupabaseSSupabase / help-and-questions
4y ago