```javascript const mySubscription = supabase .f...
# help
c
Copy code
javascript
const mySubscription = supabase
  .from('*')
  .on('*', payload => {
    console.log('Change received!', payload)
  })
  .subscribe()
im using this push notification code from the documentation, and i set the trigger and the function in the supabase interface but im still not getting the console.log('change received'....
n
Hello @CipherCode! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
s
What do you mean by 'set the trigger and function in the supabase interface'?
n
CipherCode (2022-03-22)
c
thanks for helping
s
In database > replication, did you enable replication for any tables?
c
says All tables
i appreciate your helping me debugging
debug*, i dont know how to say what i want to say.you know what i mean. lol
g
Jumping in, Make sure you are running current supabase.js or appropriate code. RLS must be met if on for the table you are testing. This is the usual issue after replication which you have right. Not having a logged in user is next, if RLS is on. You can add .subscribe((status)=>{console.log(status)}) to get a bit more info.
c
okay cool
says SUBSCRIBED lol
g
That is good, but does not address RLS or latest supabase.js (like within 2 months), Subscribed means you have a connection to the server.
c
hmm, i just installed using npm supabase.js
g
Should be good then, unless you specified a release... You also might want to change a table in the table editor, if you are relying on triggers to do something (not clear what triggers have to do with this)
c
sudo npm install @supabase/supabase-js
g
Do you have RLS on?
c
i believe so, let me double check
where would i check?
i remember checking that
g
auth, policies
yeah your dead... need policies or turn it off to see if things work.
c
i need rls off?
😮
g
You want RLS normally, but you have to set policies for selects, inserts, deletes, updates
c
HAHAHAHHA IT WORKED
BYE I HAVE WHAT I WANT I NEED NOTHING FROM YOU NOW!!!! just kidding i appreciate this greatly
is supabase free?
g
So your issue is not realtime, at the moment it is getting policies set to protect the data as you need
c
i like the coding style and interface
g
There is a free plan I assume you are using.
c
yeah, this is cool, thank you so much @User
you can close this thread
g
LOL only you have the power to close (archive) it (or maybe a mod)