supabase: Unable to create RLS from dashboard in local environment -> `Please provide a SQL expression for the WITH CHECK statement`

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

RLS creation fails from local dashboard in clean state.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. bunx supabase init
  2. bunx supabase start
  3. create posts table on local supabase dashboard
  4. try create RLS uses Enable insert for authenticated users only template -> error

error -> Please provide a SQL expression for the WITH CHECK statement

The template for Enable read access for all users is working

Screenshots

Export-1712628586563

I just set up the environment and created a simple posts table. I haven’t done anything else. (I haven’t changed the environment file either)

image

System information

  • OS: macOS
  • Browser Safari

About this issue

  • Original URL
  • State: closed
  • Created 3 months ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

Can confirm it’s fixed for me too. Thank you!

Perhaps because of yesterday’s update, I tried it now and it worked properly! thank you. I will close this issue if others have solved it as well.

I’m also encountering the same issue. I started using the local development setup for the very first time two days ago so everything was freshly installed after the mentioned fix.

I’m having the same problem using the latest version.

However, I can create the policy through the SQL Editor. The error Failed to generate title: No OPENAI_KEY set... appears but when you press f5 on the policies page it will be created. image

Policy appearing created in the panel (despite the SELECT visualization bug on line 7): image

I started with a clean install of Docker on another Mac and run bunx supabase init & bunx supabase start but got the same error.

I didn’t do anything particularly tricky, I just tried initializing it, creating a table with default settings, and adding an insert policy using a template.

That error is because the policy does not exist, it should be a create statement and not alter.