I have this super strange behaviour on this process :
On app load, the user subscribes to a table changes
On changes on this channel, the user might be redirected to another page (depending on the change) (made a workflow at top level “app workflows“ in the “more section“ where you can make “on app load“ workflows) using “on realtime database change“
This works flawlessly in editor mode but not in live version
RLS are fine (select for everyone, even not loggedin users)
Nothing happends : the workflow does not fire. I do not know if the socket is not opened or … => the weirdest is that it works in the weweb editor but not in the live version
(Both on the main/live branch of supabase)
My guess : comes from realtime : if i display a change on the page, it does display untill i fetch the collection again …
A limitation of real-time setups is that the socket may be closed when the browser tab changes or the application becomes inactive. To mitigate this, I run a small script every 30 seconds (a heartbeat) to check whether the socket connection to the server is still alive, and reconnect if needed.
Problem here : even on first load like 1 sec after loading the app it does not work anymore … (not closing the app or changing tab) - Works in the editor, not in the live version (I tried different browsers)
PS : I’ve had the issue on realtime not always live refreshed but here the bug occurs directly … I don’t even know how to debug / what to look at …
=> any clues why it works live and not in editor ?
(workflow) :
On app load, the user subscribes to a table change
On changes on this channel, the user might be redirected to another page (depending on the change) (made a workflow at top level “app workflows“ in the “more section“ where you can make “on app load“ workflows) using “on realtime database change“
=> This works flawlessly in editor mode but not in live version