-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems joining group over slow mobile connection #2368
Comments
This is issue is real, but I wonder if it could be related to the service. For example, it could randomly drop connections or terminate responses early. I'd test this using a proper rate-limited connection (e.g., using the web browser tools or a virtual NIC with a slow network) |
Adding to this issue:
|
@corrideat yeah, it might be something the tunnel is doing, but ultimately nothing that the tunnel does should result in a permanently broken state in the app. The app should be able to recover upon page refresh, but it doesn't. While testing this myself I was eventually able to join the group after trying enough times in a fresh context (i.e. a fresh random URL -> fresh context). But the broken ones never recovered. |
I think we've discussed this in another similar issue (see #2183). While there may be issues to fix here (unsure, unable to know exactly without reproducing) some issues we can't recover from without re-syncing contracts. Now, in this case, what appears to have happened is that some call or calls to When it comes to joining a group, it's a fairly complex process with many actions. I've already tried to reduce the number of outgoing messages, but I maybe more can be done. However, the issue is that fixing errors sending these would require either storing actions and re-trying later (a significant refactor) or maybe discarding the group if the process fails. TL;DR: We need to fix this, but it's several things to fix, and some of them don't have an obvious solution.
Not sure if it applies to this situation, but I disagree. The tunnel is essentially a MITM that can send invalid responses (or say, as may be the case here, truncate responses). As we rely on a server, not sure we can do much about this, other than failing more gracefully or getting rid of the server. |
The app must be coded in a way that handles connection drops. It's a bug otherwise.
For the case of errors in sideEffects, #2110 is a solution. |
Again, difficult to know without reproducing, but this doesn't look like a connection drop, rather like an invalid response. E.g., you fetch https://example.com/test.json and the response is `` (empty). If that's what's happening, the app is correctly handling it by saying it got an invalid response (it's a bug but on the server). Now, if there was a connection drop and the app interpreted that as an empty response, then that's a bug in the app. (However, as you say, even if the server gives an invalid response, we should avoid the app being in a limbo state if we can help it.) |
While retrying on PR #2365, after signing up u1 I got stuck on the Pending joining group screen. EDIT: note, this is on desktop connected to localhost, not mobile via tunnel In the console there was an error message about failing to setup the service worker, some issue with Then I refreshed the page and saw these errors: |
Problem
While trying to test PR #2367 using the
ssh -R 80:localhost:8000 [email protected]
command (plusgrunt dev
), I wasn't able to join a group on my phone.I encountered two different errors each time I tried joining. The first time I encountered an error similar to the screenshot below, but it said something about there being an error trying to get the server time. The second time it said this:
After this error, I was stuck on the Pending Joining group page.
Attempting to re-join using the link didn't fix anything. In fact it told me I was already part of the group:
I didn't get the logs for the first servertime error, but think I managed to get them for the second (JSON related) error:
📎 gi_logs.json.txt
Solution
Investigate what the bug is, and try to make sure that the joining process is robust to error.
I'm guessing that the problem is related to the much slower connection.
It should be robust to both these errors:
BTW, to test this you will need to use that localhost.run service. Just run that command and then follow the instructions to sign up for an account. You just need either an an SSH key and maybe an email (it's free). Then re-run the command, I think.
Note that this could be an issue also with the connection dropping sometimes in the middle of the join, as sometimes I experienced the tunnel re-creating a new random endpoint.
The text was updated successfully, but these errors were encountered: