Why does my RPC function keep breaking?

I know the code works correctly. It works fine right after I push a new build, but over time, for some reason the RPC function just returns an empty dataset. Is there some kind of caching thing going on with supabase or something with these RPC functions?
10 Replies
garyaustin
garyaustin2mo ago
Not enough info. There is no caching in Supabase. Next.js does do caching. Could it be RLS?
I;m thinking about thos Beans
no because it worked fine and works fine right after a rebuild
garyaustin
garyaustin2mo ago
What does rebuild mean?
I;m thinking about thos Beans
ive tried re-adding the function as well and still same issue sorry - re-deploying my app
garyaustin
garyaustin2mo ago
Try calling it from the SQL editor and use impersonation. Maybe you are losing your user session at some point?
Without code and knowing if RLS would impact hard to know. You don't say you are getting an error, so that would be RLS or logic error in your function.
I;m thinking about thos Beans
tysm will try that rn
I;m thinking about thos Beans
@garyaustin is there a way to do this without the RPC function? https://supabase.com/docs/guides/functions/examples/semantic-search
Semantic Search | Supabase Docs
Semantic Search with pgvector and Supabase Edge Functions
I;m thinking about thos Beans
i cant figure out what it is. it works and then it doesnt work. it makes no sense wasnt like this before. only started doing this like a month or so ago
garyaustin
garyaustin2mo ago
You did not say you were getting an error just empty dataset.

Did you find this page helpful?