Supabase Problem

It actually wasn’t exposed so thank you so much for mentioning that. But the issue still persists, even though i exposed the table and disabled RLS.

Can you show me the blocks you used to insert data?

I really appreciate your help, thank you so much.

1 Like

Hi dear,

This is my setup.


And I think I’ve figured out the issue,

The table needs to be set on every call

In fact, if I make two calls while setting the table only once, the first works correctly, but the second gives the exact same error as yours.



The documentation had actually tried to tell us :grin:

1 Like


Thank you so much for your effort Rayz. But i tried it and it didn’t work. And even if it worked, inserting data on sign in is not useful.
But since it worked for you anyway in a specific scenario then i think the problem might be from my side.

I don’t know man.

Ray face it too :smiley:

1 Like

Yes, there might be something wrong with the built-in extension too. Because it shouldn’t give that error when inserting data with a button. I mean, is it even useful at all if we use it in the sign in event?

Somehow, yes.

1 Like

I would really appreciate it If you provide any guides on setting up Supabase on Web Components. Because the last one i tried had a lot of errors and needs an update.

Which was this one:

Its covers many thing, but ask what you really need

I just want to insert data into the Supabase DB. That’s it. Everything else is working, fetching, login, viewing, etc. I want users to be able to insert data into the database.

1 Like

Wait a moment, mine was just a quick example, but the insertion in signInComplete has nothing to do with it.
So the bug is definitely on your side, I meant that the table must be set before every operation (as “stated” in the documentation).

If you’re not in production, first try setting permissive public rules and test again.

1 Like

@RaYzZz Thank you so much for your efforts man. But I think the problem is in the component. Because I already tried the permissive public rules.

I am in production mode. I don’t think the problem is on my side.
I have tried @Ibrahim_Jamar blocks to insert data in the same table and it worked.
It worked when RLS is disabled but it gives me the same error when it’s enabled.
But with the built-in component it gives errors either way, whether RLS is enabled or not.
So, there must be something wrong with the built-in component.

@Ibrahim_Jamar Thank you so much for your efforts! It worked. I think the issue might be in the built-in component though. I’m still testing them.

But at the top, for it to work properly, you just need to add another key/value, which is the “apiKey” and the value “ACTUAL KEY”.

No it doesn’t, this might happen on how the RLS are created, because the authorization header with the user access token satisfies supabase RLS’s. An using it in one of my project and I don’t pass or hardcode the key, or you can use the Edge functions to hide the key but it’s unnecessary to do it because of this.

How are the RLS designed?

I tried it on my database with RLS disabled without the apiKey it asked me for it. I don’t know if it could’ve worked some other way.

RLS policies are okay. I enabled insert for authenticated users.

The issue with those blocks and RLS policies was a missing space after the “Bearer” key and it has been fixed lol…

But now I’ve tested both, the built-in Supabase component and the Web Component, and the built-in component still asks for the secret key. So I think that’s a bug for sure.

1 Like

I think it’s just an error-handling issue

However, I wouldn’t call it a bug since it only happens to you.
If it were reproducible, I’d add it to the Bugs Tracker.

Huh? Now you’re able to send data without that issue?:wink::wink:

For me, the “issue” was already resolved here :grin:

1 Like

It is a bug. It doesn’t work.
If it’s not a bug, can you send the AIA in which you made it work?

I’m going to provide my blocks and tell me if I did anything wrong. But I’m sure it’s a bug.

There you go:

  1. That’s using the built-in insert block. It doesn’t work, and gives the “Secret API” issue:
  2. That’s where it works. Same RLS policies, same table, same settings same everything. Just different blocks:

Keep in mind that the component is not completely dead. It does retrieve data and it connects to the database, it authenticates my account, and it works just fine. The whole issue is in the insert block. Not sure if there are any other blocks that has the same or a similar issue, but the insert is what I’ve tested and is what doesn’t work for me.

And if you saw the second picture, I actually used the Access token from the authentication component just to insert data. I use the database component also to retrieve data.

As in here:

This works fine. I don’t know where is the issue but these are my blocks.

Hi,

After .SignInComplete, you execute RetrieveRows procedure, which sets the table (the .Select consumes the .SetTable), and then in Save.Click you call .Insert without setting the table again.