Skip to content
Discussion options

You must be logged in to vote

Since Realtime enforces RLS on postgres_changes, the usual cause of "SUBSCRIBED + heartbeats fine but zero change events" is that the socket is connected anonymously — with @supabase/ssr the browser client often doesn't have the user's access token attached, so RLS silently drops every event.

Things to check, in order:

  1. Set the auth token on the realtime client after sign-in (and again on token refresh):
    supabase.realtime.setAuth(session.access_token)
    And make sure you subscribe from the browser client that holds the session — not a server component.
  2. REPLICA IDENTITY FULL on the table (needed for UPDATE/DELETE payloads and for RLS to evaluate the row):
    alter table public.projects replica …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lucianovieir
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants