realtime empty payload.new - error 401: Unauthorized
I have supabase "realtime" setup for one of my tables "ReportIdeally" and I am receiving a payload when a change happens but payload.new (and payload.old) is always empty. See below example
I am listening to Realtime via the following:
And of course I have the relevant table enabled. I don't have RLS enabled yet so I am stumped to why this still doesn't return a payload with the updated item?
Is it to do with an authentication issue? Do I need to add an Auth bearer in the header even though I have no authentication setup yet?
My Supabase init is as follows:
The resulting payload object is as follows:
9 Replies
You have to meet select RLS for the table if RLS is enabled.
No as I said I have RLS disabled in the attempt to just get it to work before applying any filtering / securing of rows. I tried it out on the RealTime Inspector on the SupaBase website with system_role with admin privilege's and it still responds the same
Do you use Prisma?
UhOh Yes?
It likely wiped out your grants. Hang on.
Thanks a lot for the quick reply
Can you go to that tab and scroll down to Prisma and click it. I'm getting 404 right now on the Prisma page. Which shows how to fix the grants on the schema when Prisma resets them.

ok awesome I will take a look
If the page is not working for you this shows the SQL to run on the schema and tables to restore them. It does not have the surrounding info, but should get you going.
https://github.com/supabase/supabase/issues/13579
GitHub
Missing default grants defined in your database after running Prism...
Describe the bug If you run prisma migrate dev and it detects schema drift, it asks you if you want to reset the database. If you choose yes, it will reset the database and from there, it is no lon...