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

App stuck in "Syncing" state after scanning QR mobile-mobile #17458

Closed
VolodLytvynenko opened this issue Sep 29, 2023 · 15 comments · Fixed by #17619 or #17771
Closed

App stuck in "Syncing" state after scanning QR mobile-mobile #17458

VolodLytvynenko opened this issue Sep 29, 2023 · 15 comments · Fixed by #17619 or #17771
Assignees

Comments

@VolodLytvynenko
Copy link
Contributor

VolodLytvynenko commented Sep 29, 2023

Steps:

  1. mobile device 1 generates the sync QR
  2. mobile device 2 scans the QR (now the "oops something went wrong" page is shown)
  3. mobile device 2 tap 'try again' button

Actual behavior

App Stuck in "syncing" state

Expected behavior

User is redirected to "syncing" screen

Additional info:

Private wi-fi network is used with good signal

Logs:

android_logcat4 (2).txt

ENV:

Nightly [29 Sep 2023]

@cammellos
Copy link
Contributor

14:28:56.566  I  INFO [status-im2.contexts.syncing.events:72] - Initiated local pairing {:response "{\"error\":\"failed to connect to any of given addresses. failed to connect to any of given addresses. connecting to 'https://192.168.0.103:52480' failed: dial tcp 192.168.0.103:52480: connect: no route to host; \"}", :event :syncing/input-connection-string-for-bootstrapping}

@cammellos
Copy link
Contributor

cc @Samyoul @qfrank

@VolodLytvynenko
Copy link
Contributor Author

VolodLytvynenko commented Sep 29, 2023

I can't reproduce it anymore. It's a strange issue. I tried it at least three times, and I couldn't sync successfully. But now, it syncs successfully every time :)
cc: @Samyoul @qfrank @cammellos

@churik
Copy link
Member

churik commented Sep 29, 2023

I can reproduce it now. But even if it is floating, we need to give a feedback and ask user to try later

@Samyoul
Copy link
Member

Samyoul commented Sep 29, 2023

Additional info:
Private wi-fi network is used with good signal

@VolodLytvynenko Thank you and I'm sorry. Can I confirm that the wifi network is what you use at home or in an office?

@Samyoul
Copy link
Member

Samyoul commented Sep 29, 2023

@churik You can reproduce this with a home wifi?

@churik
Copy link
Member

churik commented Sep 29, 2023

Yes, it is my home wi-fi
may be not this one - take a look.
Status-debug-logs.zip

@Samyoul
Copy link
Member

Samyoul commented Sep 29, 2023

I can reproduce it now. But even if it is floating, we need to give a feedback and ask user to try later

Yes we 100% need to fix this issue, simply hanging prevents manual retries and is terrible UX

@churik
Copy link
Member

churik commented Sep 29, 2023

Update: just synced - it looks like it is hanging, and once it was synced successfully after 10 minutes without giving any feedback

Btw with desktop I can't reproduce it, only with Android scanning IOS

@VolodLytvynenko
Copy link
Contributor Author

Additional info:
Private wi-fi network is used with good signal

@VolodLytvynenko Thank you and I'm sorry. Can I confirm that the wifi network is what you use at home or in an office?

My howe network

@igor-sirotin
Copy link
Contributor

igor-sirotin commented Sep 29, 2023

From the error we can see the server IP address: 192.168.0.103.
Which seems to be quite a home network ip. So I don't think it's a networking issue.


Yes, it is my home wi-fi
may be not this one - take a look.
Status-debug-logs.zip

Indeed, I can't see any errors in the log.

Just in case, here's the connection string I found inside:

cs3:2yecKxcJLmvJek2ZabTfN9QJzTxjgPjirV7JfbTYuriP5NBTp1ZPfjAh4:Jw6:2AgeCRihMrjxGBGitKaVhjMqABCVw7LYJLuyiphPXhWZg:AWT9gJdBksdLEb6tRYZvj8QenZwJ7S9WrT2xDYe6q8k2

and it's parsed version:

{
  version:2,
  netIPs:[
    [10 196 168 55],
    [192 168 1 188],
    [253 116 101 114 109 110 117 115 0 13 221 215 250 210 1 7],
    [253 116 101 114 109 110 117 115 0 12 221 215 250 210 1 7]
  ],
  port:60325,
  publicKey:0x140000afa00,
  aesKey:[141 68 151 224 37 130 244 26 118 38 166 104 193 136 134 68 253 74 119 119 82 4 131 0 30 219 189 75 60 92 127 107]
}

We can see that there're multiple IP addresses here shared by the server in this case.
It might be that the devices have 2 shared networks, and we first attempt to pair over the first one (4 times, we added a retry there) and if it failed we go to the second one and there we get a success. And this would explain a long delay. I'm not sure which timeout is set for this.

Also, I think that we could improve the "retries" mechanism to loop over all network instead over single one. I mean:

  1. try network 1
  2. if failed, try network 2
  3. if failed, try network 3
  4. if failed and it's the last network, go to (1)

cc @Samyoul @qfrank

@qfrank qfrank self-assigned this Oct 10, 2023
@VolodLytvynenko VolodLytvynenko changed the title App stuck on QR scanning with if during mobile-mobile App stuck in "Syncing" state after scanning QR mobile-mobile Oct 13, 2023
@VolodLytvynenko
Copy link
Contributor Author

VolodLytvynenko commented Oct 26, 2023

hi @qfrank @Samyoul Reopening this issue. It's reproducible for me again. I was using a private Wi-Fi network. Tried to reproduce it on both iOS and Android devices and attempted this at least 5-6 times without success. Probably again related to network issues, because it is not reproducible for everyone.

The app consistently gets stuck on the sync process page.

IOS logs:

ioslogs.zip

Android logs:

Status-debug-logs.zip

@qfrank
Copy link
Contributor

qfrank commented Oct 26, 2023

Thank you for your feedback! I can see that it's because the time between devices has big difference from the log:

2023-10-26T13:30:56.084Z INFO [status-im2.contexts.syncing.events:73] - Initiated local pairing {:response "{\"error\":\"Get \\\"https://192.168.35.202:63025/pairing/challenge\\\": x509: certificate has expired or is not yet valid: current time 2023-10-26T13:30:56Z is after 2023-10-26T12:29:49Z\"}", :event :syncing/input-connection-string-for-bootstrapping}

can you check the difference of the time between sender device and receiver device? it's not relate to network issue. @VolodLytvynenko

@qfrank
Copy link
Contributor

qfrank commented Oct 26, 2023

but we need figure out a better way to resolve the difference of the time on different devices. maybe we should use timesource in package timesource rather than just get time by time.Now() , i can do this if you agree. cc @cammellos @Samyoul

@VolodLytvynenko
Copy link
Contributor Author

VolodLytvynenko commented Oct 26, 2023

I can see that it's because the time between devices has big difference from the log:

2023-10-26T13:30:56.084Z INFO [status-im2.contexts.syncing.events:73] - Initiated local pairing {:response "{\"error\":\"Get \\\"https://192.168.35.202:63025/pairing/challenge\\\": x509: certificate has expired or is not yet valid: current time 2023-10-26T13:30:56Z is after 2023-10-26T12:29:49Z\"}", :event :syncing/input-connection-string-for-bootstrapping}

can you check the difference of the time between sender device and receiver device? it's not relate to network issue. @VolodLytvynenko

@qfrank Apologies. Today, I intentionally set different times between the devices to test another task and forgot to set them back to automatic settings. I believe this issue is not a high priority, as it's a rare scenario when users intentionally set different times between their devices (usually the automatic timezone is used). Therefore, I suggest closing the current issue and opening a new one specifically for this case where devices have different times. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants