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

1 Like

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

Hey, I’m experiencing the same thing. I just created my Supabase account using my client credential, I have added a Project, and a Table. Added Read for Public policy as well.
But when adding collection in Weweb, it shows the same message.
I hope I only have to wait for a day if it’s a sync issue… but this is quite daunting.

Hello @jprove! I think this might be a setup issue, as Supabase usually works flawlessly. Could you send the details about your entire setup, and your collection’s setup?

Hey, very appreciate your response. Glad to share that it works now! Looks like it’s sync or integrate issue between Weweb ↔ Supabase.

For anyone encountering this in the future, just wait, it may not be detectable right away

Again, thanks @Broberto for responding! glad we have this community.

1 Like

I’ve also had this two days ago. when I removed RLS completely it worked.