I'm having difficulties getting the Realtime Subsc...
# javascript
o
I'm having difficulties getting the Realtime Subscription feature working in my project. Can anyone help me take a look?
g
I'm having difficulties getting the Realtime Subscription feature working in my project. Can anyone help me take a look?
You are going to need to provide more info on environment, if you have set up RLS, what errors you might be seeing.
First thing is to make sure you are upgraded to latest software as lots of changes the past few weeks.
o
I haven't setup RLS.
g
Is RLS off?
o
Yes, for every table.
g
Is replication on for events you want and tables selected?
o
I'm not sure what
replication
means in this scenario.
But i came across that in the dashboard.
I just updated to the latest version of supabase.
Yeah, they are all On.
g
No.... 0 tables
o
πŸ€¦β€β™‚οΈ
Please how to i enable them?
g
click on the tables word
o
Thanks, found it.
g
Just remember RLS select is what will be used when you turn on RLS for a table and your user needs to meet that. Not issue if RLS is off on table.
I also highly recommend you do this in your .subscribe() for debugging: .subscribe((status)=>{console.log('subscribe status = ',status);}) And you should see a websocket in the network tab you can look at messages for.
o
Works like a charm.
Thanks very much @User
g
πŸ‘
o
Can i make a suggestion?
g
To me?
o
Not you. I thought you're a member of the Supabase development team.
g
No one here is for the most part, just users except for occasional drop in by them.
o
Oh!
Thanks again Gary.
I was thinking of updating the documentation on Realtime subscriptions. The step of enabling "Replication" was missed, and it's a Caveat.
g
It is the first thing I mention every time someone has an issue and there is an open issue on github for them to error if not enabled...
h
Can anyone help me please , as I also want to use this subscription feature
I want to use subscription for mailing list
g
h
Yeah but how to enable it and link it from database
g
That was to owonwo...
What are you trying to do?
h
So , whenever a user clicks on subscribe button it’s email should be saved and next time when I send any newsletter it should be sent to all subscribers
o
@User πŸ‘€ i kinda scanned through it.
My bad.
g
@User this is a totally different topic... realtime. Probably should start another thread.
h
Oh sorry , I thought it’s somehow related to subscription 😐
g
@User No it is happening many times a week. So the first question several of us ask.
h
Ah πŸ˜…
o
I think the one reason i scanned through it was because it wasn't indicated as a Caveat (Red/Yellow borders are usually around Caveats)
g
@User hopefully they add error, cause even when you know it, you forget to go set that when you are adding new tables and such....
o
Yeah, that's true.
h
Umm what to do next , can anyone of you help me solve
g
I'm checking out, glancing at your question though is unclear to me what you are asking... Sorry
h
umm so in my website I have a subscribe button option, now when its clicked I just simply want to enable subscribe option
so that means user email id will be saved in database and next time when a newsletter is sent
all the users who are in subscribe one database emails should be sent to them
Now I don't know how to do this
Is it clear now?
o
Where do you create your Newsletter? @User