Add a supabase collection

Hi everyone,

Maybe it is a very dumb question, but I’ve struggled all morning to connect a simple Supabase table to WeWeb.

I have a table “leads” in Supabase with the default RLS policy “Enable read access for all users”.

Then in WeWeb I can successfully enable the Supabase plugin with my Supabase API key, but when I try to add a collection for my “leads” table it always shows this error :

Am I doing something wrong ?
Thanks in advance. :slight_smile:

and in the Chrome console I get:

is the RLS policy actually ‘Enable Read access for all authenticated users’?

If you’re using the anon key from supabase, then you’re not authenticated, and you don’t even have access to check if the table exists, let alone read its records.

post the RLS policy from supabase here and I’ll try to help:

  • Open the table in supabase
  • in the top right corner, click ‘1 Active RLS Policy’
  • On the page that opens, click the kebab (vertical ellipsis …), click edit, and then screenshot your policy.

it will look like this

also, copy-and-paste the text in that error message from the weweb collection page. both stack and message

Here is a screenshot of my RLS policy.
I don’t want to restrict the table to authenticated users because this table will be used on my landing page for people to subscribe to my newsletter. They will type their email address, click “OK” and then I will add their address to the table.

Alright, it is now working.
But it is very strange because I didn’t change anything since yesterday.

It was probably a sync issue or a cache issue between WeWeb and Supabase.
Problem solved :slight_smile:

1 Like