© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
43 replies
bzbz

Inconsistent issues with realtime table

I have two tables in my database that have realtime enabled - a chats table and a notifications table. The chats table seems to work 100% of the time, while the notifications table works maybe 25% of the time. My implementation is very simple:

supabase
.channel('schema-db-changes')
.on(
'postgres_changes',
{
schema: 'public', // Subscribes to the "public" schema in Postgres
event: 'INSERT', // Listen to all changes
table: 'Notifications'
},
(payload) => {
console.log(payload)
const n = [...notifications]
n.push(payload.new as Notifications)
setNotifications(n)
console.log(n)


}
)
.subscribe()

When a new record is inserted, the payload is never being called. I never see the console.log(payload), and in the chrome websocket network debugger, I don't see the event with the row payload (I do see other data, however). When I debug with the realtime listener in the Supabase dashboard, I can see all of the events as they should be with all of the data. Impersonating the account I'm logged into allows me to still see these events, so I know it's not an RLS related issue.

I'm testing this by pulling up two chrome windows, and performing a function in my app on one window that should create a notification in the other. The notification (most of the time) never hits the other window.

The real confusing thing to me is why it sometimes works. The connection never dies according to Chrome. Sometimes I can get it to work by restarting the next.js dev server, but that's hit or miss too lol.

Has anyone else had an issue like this? Is there something I'm overlooking?

Thank you!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Realtime issues
SupabaseSSupabase / help-and-questions
4y ago
Realtime issues
SupabaseSSupabase / help-and-questions
4y ago
Realtime Tenant Issues
SupabaseSSupabase / help-and-questions
4mo ago
Realtime Issues Today?
SupabaseSSupabase / help-and-questions
10mo ago