You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering a very strange issue with Realtime channels. A new subscription doesn't seem to work correctly until I explicitly unsubscribe and then immediately resubscribe to the same channel.
Current Code (Does Not Work)
Here is the initial code. The subscription is established, but no events are received.
As demonstrated, the subscription only becomes active after this unsubscribe/resubscribe cycle. This behavior is unexpected and seems like a potential bug. I can't figure out why the initial subscription fails to receive events on its own.
I'm encountering a very strange issue with Realtime channels. A new subscription doesn't seem to work correctly until I explicitly unsubscribe and then immediately resubscribe to the same channel.
Current Code (Does Not Work)
Here is the initial code. The subscription is established, but no events are received.
Result:
As you can see in the video, no realtime events are being captured.
2025-08-30.13-15-02.webm
Working Code (Workaround)
However, if I introduce an removeChannel() call before the final subscribe(), it starts working as expected.
Result:
Now, the realtime events are received correctly.
2025-08-30.13-15-37.webm
As demonstrated, the subscription only becomes active after this unsubscribe/resubscribe cycle. This behavior is unexpected and seems like a potential bug. I can't figure out why the initial subscription fails to receive events on its own.
ubuntu 24.04 / 22.04
'@supabase/ssr':
specifier: ^0.6.1
version: 0.6.1(@supabase/supabase-js@2.54.0)
'@supabase/supabase-js':
specifier: ^2.49.4
version: 2.54.0
node: v24.1.0