oxen-io / session-android

A private messenger for Android.
https://getsession.org
GNU General Public License v3.0
1.9k stars 173 forks source link

[BUG] can't connect to server #1673

Closed sakurayz closed 1 month ago

sakurayz commented 1 month ago

Code of conduct

Self-training on how to write a bug report

Is there an existing issue for this?

Current Behavior

[BUG] can't connect to server. Issues that occurred at the same time as Desktop 12.5 have been fixed in the Desktop version.

Expected Behavior

No response

Steps To Reproduce

No response

Android Version

Android 13

Session Version

1.19.2

Anything else?

2024-02-21 12:25:11.188 GMT+08:00 D Loki: Building onion request paths. 2024-02-21 12:25:11.192 GMT+08:00 D Loki: Populating guard snode cache. 2024-02-21 12:25:11.201 GMT+08:00 D Loki: Testing guard snode: https://38.242.144.254:22021. 2024-02-21 12:25:11.201 GMT+08:00 D Loki: Testing guard snode: https://65.108.99.226:22121. 2024-02-21 12:25:11.614 GMT+08:00 I MediaUtil: Checking: content://network.loki.provider.securesms/part/1707908345205/34 2024-02-21 12:25:11.685 GMT+08:00 D Loki: GET request to https://38.242.144.254:22021/get_stats/v1 failed due to error: Failed to connect to /38.242.144.254:22021. 2024-02-21 12:25:11.686 GMT+08:00 D Loki: Couldn't reach snode at https://192.99.34.110:20603; setting failure count to 3. 2024-02-21 12:25:11.687 GMT+08:00 D Loki: Failure threshold reached for: https://192.99.34.110:20603; dropping it. 2024-02-21 12:25:11.709 GMT+08:00 D Loki: Snode pool count: 253. 2024-02-21 12:25:11.710 GMT+08:00 D Loki: Unhandled response code: 0. 2024-02-21 12:25:11.711 GMT+08:00 E Loki: Failed to get raw batch response 2024-02-21 12:25:11.711 GMT+08:00 E Loki: org.session.libsignal.utilities.HTTP$HTTPRequestFailedException: HTTP request failed due to: Failed to connect to /38.242.144.254:22021 2024-02-21 12:25:11.711 GMT+08:00 E Loki: at org.session.libsignal.utilities.HTTP.execute(HTTP.kt:132) 2024-02-21 12:25:11.711 GMT+08:00 E Loki: at org.session.libsignal.utilities.HTTP.execute(HTTP.kt:83) 2024-02-21 12:25:11.711 GMT+08:00 E Loki: at org.session.libsignal.utilities.HTTP.execute$default(HTTP.kt:82) 2024-02-21 12:25:11.711 GMT+08:00 E Loki: at org.session.libsession.snode.OnionRequestAPI$testSnode$1.invoke(OnionRequestAPI.kt:120) 2024-02-21 12:25:11.711 GMT+08:00 E Loki: at org.session.libsession.snode.OnionRequestAPI$testSnode$1.invoke(OnionRequestAPI.kt:117) 2024-02-21 12:25:11.711 GMT+08:00 E Loki: at org.session.libsignal.utilities.ThreadUtils.queue$lambda$0(ThreadUtils.kt:18) 2024-02-21 12:25:11.711 GMT+08:00 E Loki: at org.session.libsignal.utilities.ThreadUtils.$r8$lambda$fBVaDXxK1lXFamZwYyxWNzVYu18(Unknown Source:0) 2024-02-21 12:25:11.711 GMT+08:00 E Loki: at org.session.libsignal.utilities.ThreadUtils$$ExternalSyntheticLambda0.run(Unknown Source:2) 2024-02-21 12:25:11.711 GMT+08:00 E Loki: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 2024-02-21 12:25:11.711 GMT+08:00 E Loki: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 2024-02-21 12:25:11.711 GMT+08:00 E Loki: at java.lang.Thread.run(Thread.java:1012) 2024-02-21 12:25:11.857 GMT+08:00 D Loki: Building onion request paths. 2024-02-21 12:25:11.864 GMT+08:00 D Loki: Populating guard snode cache. 2024-02-21 12:25:11.873 GMT+08:00 D Loki: Testing guard snode: https://172.93.101.16:22124. 2024-02-21 12:25:11.874 GMT+08:00 D Loki: Testing guard snode: https://54.39.161.177:22021. 2024-02-21 12:25:12.062 GMT+08:00 D org.session.libsession.messaging.sending_receiving.notifications.PushRegistryV1: register() called 2024-02-21 12:25:12.063 GMT+08:00 D org.session.libsession.messaging.sending_receiving.notifications.PushRegistryV1: doRegister() called 2024-02-21 12:25:14.879 GMT+08:00 D Loki: GET request to https://172.93.101.16:22124/get_stats/v1 failed due to error: timeout. 2024-02-21 12:25:14.881 GMT+08:00 D Loki: Couldn't reach snode at https://192.99.34.110:20603; setting failure count to 1. 2024-02-21 12:25:14.882 GMT+08:00 D Loki: Unhandled response code: 0. 2024-02-21 12:25:14.882 GMT+08:00 D Loki: Couldn't reach server: https://live.apns.getsession.org/register_legacy_groups_only due to error: org.session.libsignal.utilities.HTTP$HTTPRequestFailedException: HTTP request failed due to: timeout. 2024-02-21 12:25:14.883 GMT+08:00 D Loki: Couldn't reach server: https://push.getsession.org/subscribe due to error: org.session.libsignal.utilities.HTTP$HTTPRequestFailedException: HTTP request failed due to: timeout. 2024-02-21 12:25:14.884 GMT+08:00 D Loki: Couldn't reach snode at https://135.181.138.190:22126; setting failure count to 1. 2024-02-21 12:25:14.884 GMT+08:00 D Loki: Unhandled response code: 0. 2024-02-21 12:25:14.885 GMT+08:00 E Loki: Failed to get raw batch response 2024-02-21 12:25:14.885 GMT+08:00 E Loki: org.session.libsignal.utilities.HTTP$HTTPRequestFailedException: HTTP request failed due to: timeout 2024-02-21 12:25:14.885 GMT+08:00 E Loki: at org.session.libsignal.utilities.HTTP.execute(HTTP.kt:132) 2024-02-21 12:25:14.885 GMT+08:00 E Loki: at org.session.libsignal.utilities.HTTP.execute(HTTP.kt:83) 2024-02-21 12:25:14.885 GMT+08:00 E Loki: at org.session.libsignal.utilities.HTTP.execute$default(HTTP.kt:82) 2024-02-21 12:25:14.885 GMT+08:00 E Loki: at org.session.libsession.snode.OnionRequestAPI$testSnode$1.invoke(OnionRequestAPI.kt:120) 2024-02-21 12:25:14.885 GMT+08:00 E Loki: at org.session.libsession.snode.OnionRequestAPI$testSnode$1.invoke(OnionRequestAPI.kt:117) 2024-02-21 12:25:14.885 GMT+08:00 E Loki: at org.session.libsignal.utilities.ThreadUtils.queue$lambda$0(ThreadUtils.kt:18) 2024-02-21 12:25:14.885 GMT+08:00 E Loki: at org.session.libsignal.utilities.ThreadUtils.$r8$lambda$fBVaDXxK1lXFamZwYyxWNzVYu18(Unknown Source:0) 2024-02-21 12:25:14.885 GMT+08:00 E Loki: at org.session.libsignal.utilities.ThreadUtils$$ExternalSyntheticLambda0.run(Unknown Source:2) 2024-02-21 12:25:14.885 GMT+08:00 E Loki: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 2024-02-21 12:25:14.885 GMT+08:00 E Loki: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 2024-02-21 12:25:14.885 GMT+08:00 E Loki: at java.lang.Thread.run(Thread.java:1012) 2024-02-21 12:25:15.048 GMT+08:00 D Loki: Building onion request paths. 2024-02-21 12:25:15.053 GMT+08:00 D Loki: Populating guard snode cache. 2024-02-21 12:25:15.062 GMT+08:00 D Loki: Testing guard snode: https://79.143.190.38:22021. 2024-02-21 12:25:15.062 GMT+08:00 D Loki: Testing guard snode: https://192.99.34.110:20611. 2024-02-21 12:25:15.883 GMT+08:00 D org.session.libsession.messaging.sending_receiving.notifications.PushRegistryV1: register() called 2024-02-21 12:25:15.885 GMT+08:00 D org.session.libsession.messaging.sending_receiving.notifications.PushRegistryV1: doRegister() called 2024-02-21 12:25:16.539 GMT+08:00 D Loki: Built new onion request path: [https://79.143.190.38:22021, https://88.99.15.47:22021, https://51.222.42.216:22114]. 2024-02-21 12:25:16.540 GMT+08:00 D Loki: Built new onion request path: [https://192.99.34.110:20611, https://161.35.228.73:22021, https://104.238.205.128:22103]. 2024-02-21 12:25:16.541 GMT+08:00 D Loki: Persisting onion request paths to database. 2024-02-21 12:25:18.018 GMT+08:00 D Loki: POST request to https://79.143.190.38:22021/onion_req/v2 failed with status code: 502. 2024-02-21 12:25:18.021 GMT+08:00 D Loki: Couldn't reach snode at https://192.99.34.110:20603; setting failure count to 2. 2024-02-21 12:25:18.030 GMT+08:00 E Loki: Failed to get raw batch response 2024-02-21 12:25:18.030 GMT+08:00 E Loki: org.session.libsignal.utilities.HTTP$HTTPRequestFailedException: HTTP request failed with status code 502 2024-02-21 12:25:18.030 GMT+08:00 E Loki: at org.session.libsignal.utilities.HTTP.execute(HTTP.kt:140) 2024-02-21 12:25:18.030 GMT+08:00 E Loki: at org.session.libsignal.utilities.HTTP.execute$default(HTTP.kt:101) 2024-02-21 12:25:18.030 GMT+08:00 E Loki: at org.session.libsession.snode.OnionRequestAPI$sendOnionRequest$1$1.invoke(OnionRequestAPI.kt:363) 2024-02-21 12:25:18.030 GMT+08:00 E Loki: at org.session.libsession.snode.OnionRequestAPI$sendOnionRequest$1$1.invoke(OnionRequestAPI.kt:361) 2024-02-21 12:25:18.030 GMT+08:00 E Loki: at org.session.libsignal.utilities.ThreadUtils.queue$lambda$0(ThreadUtils.kt:18) 2024-02-21 12:25:18.030 GMT+08:00 E Loki: at org.session.libsignal.utilities.ThreadUtils.$r8$lambda$fBVaDXxK1lXFamZwYyxWNzVYu18(Unknown Source:0) 2024-02-21 12:25:18.030 GMT+08:00 E Loki: at org.session.libsignal.utilities.ThreadUtils$$ExternalSyntheticLambda0.run(Unknown Source:2) 2024-02-21 12:25:18.030 GMT+08:00 E Loki: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 2024-02-21 12:25:18.030 GMT+08:00 E Loki: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 2024-02-21 12:25:18.030 GMT+08:00 E Loki: at java.lang.Thread.run(Thread.java:1012) 2024-02-21 12:25:18.083 GMT+08:00 I PassphraseRequiredActionBarActivity: onPause() 2024-02-21 12:25:18.187 GMT+08:00 D Loki: POST request to https://192.99.34.110:20611/onion_req/v2 failed with status code: 502. 2024-02-21 12:25:18.202 GMT+08:00 D Loki: Couldn't reach snode at https://38.54.116.244:22021; setting failure count to 1. 2024-02-21 12:25:18.212 GMT+08:00 D Loki: POST request to https://192.99.34.110:20611/onion_req/v2 failed with status code: 502. 2024-02-21 12:25:18.213 GMT+08:00 D Loki: Couldn't reach server: https://live.apns.getsession.org/register_legacy_groups_only due to error: org.session.libsignal.utilities.HTTP$HTTPRequestFailedException: HTTP request failed with status code 502. 2024-02-21 12:25:18.231 GMT+08:00 D Loki: POST request to https://192.99.34.110:20611/onion_req/v2 failed with status code: 502. 2024-02-21 12:25:18.232 GMT+08:00 D Loki: Couldn't reach snode at https://192.99.34.110:20611; setting failure count to 1. 2024-02-21 12:25:18.233 GMT+08:00 D Loki: Couldn't reach snode at https://161.35.228.73:22021; setting failure count to 1. 2024-02-21 12:25:18.235 GMT+08:00 D Loki: Couldn't reach snode at https://104.238.205.128:22103; setting failure count to 1. 2024-02-21 12:25:18.235 GMT+08:00 D Loki: Persisting onion request paths to database. 2024-02-21 12:25:18.236 GMT+08:00 D Loki: Couldn't reach server: https://push.getsession.org/subscribe due to error: org.session.libsignal.utilities.HTTP$HTTPRequestFailedException: HTTP request failed with status code 502.

ThomasSession commented 1 month ago

Thanks for adding the logs. We'll have a look and see if we see something unusal.

ThomasSession commented 1 month ago

You were getting 502 responses. It looks like some servers were down, but it should be fine now. Is the issue persisting?

sakurayz commented 1 month ago

You were getting 502 responses. It looks like some servers were down, but it should be fine now. Is the issue persisting?

I have tested that the IP and the port are connected, and I don't know if the connection is blocked by the firewall. The same issue occurred with upgrading to desktop version 12.5 and has been fixed. Please refer to the question for the desktop version.

TCP connect statistics for 192.99.34.110:20611: Sent = 4, Received = 4, Lost = 0 (0% loss), Minimum = 288.24ms, Maximum = 317.87ms, Average = 301.44ms

sakurayz commented 1 month ago

It seems to be a problem caused by upgrading the Session Network and migrating to Session Token. When desktop version 12.5 couldn't connect to the server, I saw the blog about the network upgrade migration.

ThomasSession commented 1 month ago

Yes we had issues while upgrading but it should be all good now. The PN server was down when you first posted this message but it should be working fine now. Are you still getting an issue?

sakurayz commented 1 month ago

Yes we had issues while upgrading but it should be all good now. The PN server was down when you first posted this message but it should be working fine now. Are you still getting an issue?

It's back to normal now, thank you.