Slow networks break invite codes #202
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If you throttle your connection, the create invite link times out without getting a code back.
Please assign this
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.
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