Hey, how is it going? Quick question: I just tried...
# javascript
m
Hey, how is it going? Quick question: I just tried to update my table to use realtime and rls but my client doesn't receive events despite the "everyone can read" policy. Is there anything I am missing?
g
Did you turn on replication for the various events and add the table under the database tab?
Also you need to fully upgrade supabase.js
m
Hey, thanks for getting back to me. I'll just send a couple images to make it easier.
Replication for the UPDATE operation is enabled
I did add the respective table
I used this template for the table policy
And i subscribe like this on the client
Anything jump out to you?
g
add .subscribe((status,e)=>{console.log(status,e)}) to see if connection made and any errors. Look in websocket on net and see if there is any traffic. Are you on supabase.js 1.28.5?
m
Ok, i tried that. status="SUBSCRIBED" and e=undefined. Netinspector seems to show single digits kb of data coming through. I am using 1.28.5
g
Well... if your update really worked on the table... I'd pull out all your .on code and just do .on("UPDATE", payload => {console.log(payload)}) and see if you are getting data and just not handling it (I really don't understand where you get value from). You can also look at the actual websocket data and see if it makes sense. After that email support as people are having issues with the new realtime code, but not sure what you have would be involved with that...
m
I'm somewhat at a loss
Ah sorry, didn't see your last message before. I should have left out "value" from the screenshot. Thats just farther up in my code. I did check if it is being triggered but unfortunately it really isn't. I emailed support and I'll report back if I hear anything that solves this. Thanks a bunch for your help so far!