How can I make Supabase Realtime works?

Hi, I’m not sure how to make Supabase realtime works on Bubble. I tried triggering the js code when the page loads:

const tasks = supabase.channel('custom-all-channel')
.on(
'postgres_changes',
{ event: '*', schema: 'public', table: 'tasks' },
(payload) => {
console.log('Change received!', payload)
}
)
.subscribe()

But nothing happens, realtime still not work.

Note: All the API endpoints are working fine.

Thank you in advance

1 Like

have you found a solution?