Skip to content
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

User can't leave the community #2452

Closed
kingalg opened this issue Apr 17, 2024 · 6 comments
Closed

User can't leave the community #2452

kingalg opened this issue Apr 17, 2024 · 6 comments
Labels
android bug Something isn't working iOS mobile

Comments

@kingalg
Copy link
Collaborator

kingalg commented Apr 17, 2024

Version: [email protected]
System: spotted on Android but not necessary system-specific

Issue: The user can't leave the community and is stuck on a screen that you can see below. Restarting the app doesn't help - user is still unable to leave the community.

Is it easy to reproduce: no, it happened to me twice, but I don't have a reliable way to reproduce it (possibly a timing issue?)

Screenshot 2024-04-17 at 13 43 08

Logs (part of logs that Emi decided that are important):
04-17 12:56:55.744 9255 9255 D InsetsSourceConsumer: applyRequestedVisibilityToControl: visible=false, type=8
04-17 12:56:59.951 9255 9255 I ViewRootImpl@f263eee[MainActivity]: ViewPostIme pointer 0
04-17 12:57:00.090 9255 9255 I ViewRootImpl@f263eee[MainActivity]: ViewPostIme pointer 1
04-17 12:57:00.175 9255 11359 D TrafficStats: tagSocket(6) with statsTag=0xffffffff, statsUid=-1
04-17 12:57:00.179 9255 9663 E NODEJS-MOBILE: Backend server: Unauthorized
04-17 12:57:03.304 9255 9255 I ViewRootImpl@f263eee[MainActivity]: ViewPostIme pointer 0
04-17 12:57:03.364 9255 9255 I ViewRootImpl@f263eee[MainActivity]: ViewPostIme pointer 1
04-17 12:57:04.563 9255 9255 I ViewRootImpl@f263eee[MainActivity]: ViewPostIme pointer 0
04-17 12:57:04.643 9255 9255 I ViewRootImpl@f263eee[MainActivity]: ViewPostIme pointer 1
04-17 12:57:04.651 9255 9464 I ReactNativeJS: Leaving community
04-17 12:57:05.201 9255 11359 D TrafficStats: tagSocket(6) with statsTag=0xffffffff, statsUid=-1
04-17 12:57:05.208 9255 9663 E NODEJS-MOBILE: Backend server: Unauthorized
04-17 12:57:10.236 9255 11359 D TrafficStats: tagSocket(6) with statsTag=0xffffffff, statsUid=-1
04-17 12:57:10.246 9255 9663 E NODEJS-MOBILE: Backend server: Unauthorized
04-17 12:57:10.512 9255 9663 E NODEJS-MOBILE: 2024-04-17T10:57:10.512Z backend:Tor Apr 17 12:57:10.000 [notice] Closed 1 streams for service [scrubbed].onion for reason resolve failed. Fetch status: No more HSDir available to query.
04-17 12:57:10.515 9255 9663 E NODEJS-MOBILE: 2024-04-17T10:57:10.515Z backend:libp2p:websockets:err connection error: Unexpected server response: 404
04-17 12:57:10.516 9255 9663 E NODEJS-MOBILE: 2024-04-17T10:57:10.516Z backend:libp2p:websockets:err error connecting to /dns4/ogfd7acrjsvmbjntuyxczd6s3od2sxgdicjgpz3vlouinct45l4at6qd.onion/tcp/80/ws/p2p/QmQh9zMVzsmPQAKFcNr55BrMMiiq6vvwhVH1n5KjTqJwCN. Details: Unexpected server response: 404
04-17 12:57:10.522 9255 9663 E NODEJS-MOBILE: 2024-04-17T10:57:10.521Z backend:libp2p:websockets connect 5v4dndtnvqbu7kmfxlhyrq3hmfhwocsaf7e4tcri77qdm6u3prlcp4ad.onion:80

@kingalg kingalg added bug Something isn't working android mobile labels Apr 17, 2024
@EmiM
Copy link
Contributor

EmiM commented Apr 17, 2024

It looks like frontend can't connect to backend (Backend server: Unauthorized) so backend did not receive signal about leaving community. Application stays in this state and websocket can't connect again.

@holmesworcester
Copy link
Contributor

Should we have a quick look for everywhere in the code where the frontend sends something to the backend, and make sure that the frontend handles errors in a useful way? (e.g., gives the user a useful error message, lets them retry, and does not break app state.)

@EmiM
Copy link
Contributor

EmiM commented Apr 18, 2024

Answering your question: generally yes, we should handle general errors better.
However i'm not sure how it's related to what I wrote above. In this particular case there is no communication between frontend and backend because websocket disconnected and can't connect again. Why? I don't know yet.

Explaining this issue in other words: user is stuck on leaving community screen because frontend's event informing about leaving community never reached backend and this caused frontend waiting indefinitely for backend's ack.

@holmesworcester
Copy link
Contributor

Perhaps we should also look for everywhere in the code we send a request to the backend without a timeout.

@kingalg
Copy link
Collaborator Author

kingalg commented Apr 22, 2024

Today the same happened to me on iOS, so I'm adding a tag.

@kingalg
Copy link
Collaborator Author

kingalg commented May 27, 2024

2.2.0 - prod
376

This is fixed with resolution of #2512. I confirm that it no longer happens.

@kingalg kingalg closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android bug Something isn't working iOS mobile
Projects
Status: Done
Development

No branches or pull requests

3 participants