Earde

Client enters a reconnect loop after a suspended tab resumes

by u/tolwiz[MOD][ADMIN]6 hr ago3 comments⇄ Shared from Northstar
After a project tab remains suspended for several minutes, resuming it causes the client to reconnect every few seconds. The UI state is restored correctly, but the realtime subscription appears to consume the same resume token twice. I’m reporting this in Northstar first because it presents as an application bug. We still need to determine whether the cause is in Northstar or Rivet.
// 3 comments
Log in to join the discussion.
u/ansuzgardraiwo 6 hr ago
I can reproduce this after leaving a tab suspended for about ten minutes. The reconnect loop starts immediately after subscriptions are restored. Disabling session restoration prevents it.
u/tolwiz[MOD][ADMIN] OP 6 hr ago
I traced this further. Northstar sends a single resume request, but Rivet appears to restore the subscription twice using the same token. I’m routing this to the Rivet community so we can verify where the duplicate restoration occurs.
u/NightOwlDev 6 hr ago
Confirmed in Rivet: subscription restoration can consume the same resume token twice when the transport reconnects before the previous restoration completes. I’ll add a guard to make token consumption idempotent.