Slow networks break invite codes #202

Closed
opened 2026-04-14 23:29:34 +00:00 by hodlbod · 3 comments
Owner

If you throttle your connection, the create invite link times out without getting a code back.

If you throttle your connection, the create invite link times out without getting a code back.
hodlbod added this to the Current milestone 2026-04-14 23:29:34 +00:00
hodlbod added the dev label 2026-04-14 23:29:34 +00:00
Contributor

Please assign this

Please assign this
priyanshu_bharti was assigned by hodlbod 2026-04-14 23:58:22 +00:00
Contributor

Hi @hodlbod , I looked into the issue and found that the issue stems from an unhandled timeout error stopping the execution.

In SpaceInvite.svelte, the 3-second network request for the invite claim times out on slow networks. Because the Promise. All calls aren't wrapped in a try/catch block; the exception skips the loading = false step entirely, which traps the user in an infinite loading spinner.

To fix this, we can :
-Wrap the request in a try/catch block to handle the timeout gracefully.
-Slightly increase the timeout limit (e.g., to 7 or 10 seconds) to be kinder to slow connections.
-Ensure loading = false executes regardless of success or failure (e.g., using a finally block). This allows the UI to correctly fall back to providing a claimless invite link instead of entirely freezing.

Is this approach looking good to you? If yes, then I can move forward.

Hi @hodlbod , I looked into the issue and found that the issue stems from an unhandled timeout error stopping the execution. In SpaceInvite.svelte, the 3-second network request for the invite claim times out on slow networks. Because the Promise. All calls aren't wrapped in a try/catch block; the exception skips the loading = false step entirely, which traps the user in an infinite loading spinner. To fix this, we can : -Wrap the request in a try/catch block to handle the timeout gracefully. -Slightly increase the timeout limit (e.g., to 7 or 10 seconds) to be kinder to slow connections. -Ensure loading = false executes regardless of success or failure (e.g., using a finally block). This allows the UI to correctly fall back to providing a claimless invite link instead of entirely freezing. Is this approach looking good to you? If yes, then I can move forward.
Contributor

hii @DeveshSingh
I’ve already tested this issue (and a few other similar slow network / timeout related bugs). Everything matches what you described.
I’ll raise a PR for this very soon

hii @DeveshSingh I’ve already tested this issue (and a few other similar slow network / timeout related bugs). Everything matches what you described. I’ll raise a PR for this very soon
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coracle/flotilla#202