quiet icon indicating copy to clipboard operation
quiet copied to clipboard

Duplicated usernames can't register and can't be changed

Open kingalg opened this issue 1 year ago • 5 comments

Version: [email protected] | iOS 370

System: android and ios

This issue looks different on iOS and Android, but the common problem occurs when the user tries to register a username that has already been taken.

Android:

  1. When the user that tries to register a username chooses a username that is already taken, they are stuck on the "Joining now" screen (that is also incorrect - look at the loading bar) Screenshot 2024-04-15 at 15 53 35

  2. Those are the logs that we have from the situation from point 1:

rumblefish@rumblefish-Lenovo-IdeaPad-Z510:~$ adb logcat --pid=$(adb shell pidof -s com.quiet mobile)

  • daemon not running; starting now at tcp:5037
  • daemon started successfully --------- beginning of main 04-15 15:07:37.794 12325 12394 E NODEJS-MOBILE: 2024-04-15T13:07:37.793Z backend:libp2p:websockets:err connection error: Unexpected server response: 404 04-15 15:07:37.794 12325 12394 E NODEJS-MOBILE: 2024-04-15T13:07:37.794Z backend:libp2p:websockets:err error connecting to /dns4/s2hglgyphjedshths4teqxsthk57wqoavj3yg2u7usxdxefb3h77uvid.onion/tcp/80/ws/p2p/Qma9M8EDRzy9HAM6Sf3Sx4xS27JxYvd9suD8k3aU8kZdX2. Details: Unexpected server response: 404 04-15 15:07:37.798 12325 12394 E NODEJS-MOBILE: 2024-04-15T13:07:37.798Z backend:libp2p:websockets connect rboh3i5j5ktcodxkxetllarcxqrexjlfbcobpcnzv7b25rljw45nb4ad.onion:80 04-15 15:08:03.885 12325 12394 E NODEJS-MOBILE: 2024-04-15T13:08:03.885Z backend:Tor Apr 15 15:08:03.000 [notice] Closed 1 streams for service [scrubbed].onion for reason resolve failed. Fetch status: No more HSDir available to query. 04-15 15:08:03.888 12325 12394 E NODEJS-MOBILE: 2024-04-15T13:08:03.888Z backend:libp2p:websockets:err connection error: Unexpected server response: 404 04-15 15:08:03.888 12325 12394 E NODEJS-MOBILE: 2024-04-15T13:08:03.888Z backend:libp2p:websockets:err error connecting to /dns4/rboh3i5j5ktcodxkxetllarcxqrexjlfbcobpcnzv7b25rljw45nb4ad.onion/tcp/80/ws/p2p/QmVGH8Bu3Nni5f5zF5PW5WzDH4RHMCsBj7gKcoFQpBcbpE. Details: Unexpected server response: 404
  1. If the app is restarted, all channels appear, but the user can't open any. For each one, there is a "Loading messages" screen that doesn't disappear even after an hour.

iOS:

  1. Initially, registering a duplicate username looks as expected, but the correct popup appears.
  2. If the user ignores a popup and tries to use the app with a duplicated username, they would be able to sync messages but not type any. All messages will show up as grayed out and then disappear.
  3. If the user restarts the app, a popup will reappear, allowing them to change their username. If the user changes their username, they will be able to use the app; however, their username will not be changed. It will register as a duplicate, and the user with the duplicated username will not see the popup allowing them to change their username ever again.

kingalg avatar Apr 15 '24 13:04 kingalg

It seems like these cases are likely to give us trouble in the future, so we should write tests for them.

@kingalg are these problems happening on desktop too or just mobile?

holmesworcester avatar Apr 15 '24 14:04 holmesworcester

@holmesworcester just mobile.

kingalg avatar Apr 15 '24 14:04 kingalg

[email protected] @leblowl, those are logs from Android (newer version).

  1. I joined the community trying to use a duplicated username.
  2. Popup allowing to change username appeared as it should - I ignored it.
  3. The whole community loaded and all channels were visible.
  4. When I tried to type a message, it disappeared immediately after pushing a button to send it.

logs160424.txt

I'm still checking other versions and systems and I;ll probably provide you more information later.

kingalg avatar Apr 16 '24 12:04 kingalg

[email protected] I'm adding one more situation and logs I sent Lucas yesterday.

  1. From Android, I joined the "Win1604" community with a unique username.
  2. I left the community.
  3. I joined the same community with a duplicate username.
  4. A popup informing about a duplicated username appeared - I closed the popup, and after that, the app was stuck on "Joining now" (screenshot below)
  5. I restarted the app and was able to sync the channel list and all messages.
  6. Messages that I sent were gray out, and other users never received them, however, messages send by other users were correctly synced on my app (screenshot below)
Screenshot 2024-04-17 at 15 17 48 Screenshot 2024-04-17 at 15 20 23

Logs: logs.and.16.04.24.txt

kingalg avatar Apr 17 '24 13:04 kingalg

About the last case:

04-16 16:51:24.793 27888 27969 E NODEJS-MOBILE: 2024-04-16T14:51:24.793Z backend:TorControl Tor connected
04-16 16:51:24.802 27888 27969 E NODEJS-MOBILE: 2024-04-16T14:51:24.802Z backend:StorageService Subscribed to channel general_a8922f4d5e26c2e78ab08eaad1414fd8
04-16 16:51:25.352 27888 27945 D WEBSOCKET CONNECTION: Starting on 11000
04-16 16:51:25.400 27888 27927 I ReactNativeJS: 'WEBSOCKET', 'Entered start connection saga', 11000

Imo backend sent SocketActionTypes.CHANNEL_SUBSCRIBED event before frontend and backend established websocket connection therefore 'general' was not marked as subscribed in redux:

04-16 16:51:41.562 27888 27927 E ReactNativeJS: Failed to send message, channel not subscribed. Retrying...

EmiM avatar Apr 17 '24 13:04 EmiM

[email protected] | iOS 375

Fixed.

kingalg avatar May 20 '24 14:05 kingalg