element-hq / element-hq/element-android

the login page is downloading for at least 5 mins because matrix-client.matrix.org is unavailable in my country

Open
#8,975 2 comments 1 reaction 0 assignees View on GitHub
T-Defect
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

### Steps to reproduce

1. downloaded the app
2. press "sign in"
3. I have to wait for the spinner >5 mins

### Outcome

#### What did you expect?
I expect the spinner not to be so long, a lot of my server users think my server is down

#### What happened instead?
I looked the logs, logged the full exception and the problem is happening when the app tries to fetch the versions from https://matrix-client.matrix.org/_matrix/client/versions
It happens [here](https://github.com/element-hq/element-android/blob/037958faa751a01ef93677155220cb4fa7c8feb3/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/wellknown/GetWellknownTask.kt#L137)
For some reason the url is not available from my country

```
2025-01-07 00:01:22.253 29783-29903 FormattedJsonHttpLogger im.vector.app.debug V --> GET https://matrix.org/.well-known/matrix/client
2025-01-07 00:01:22.576 29783-29903 FormattedJsonHttpLogger im.vector.app.debug V <-- 200 OK https://matrix.org/.well-known/matrix/client (321ms, 420-byte body)
2025-01-07 00:01:22.597 29783-29903 FormattedJsonHttpLogger im.vector.app.debug V --> GET https://matrix-client.matrix.org/_matrix/client/versions
2025-01-07 00:04:22.896 29783-29903 System.out im.vector.app.debug I [java.net.SocketTimeoutException: Read timed out, java.net.SocketTimeoutException: Read timed out]
2025-01-07 00:04:22.902 29783-29903 FormattedJsonHttpLogger im.vector.app.debug V <-- HTTP FAILED: java.net.SocketTimeoutException: Read timed out
2025-01-07 00:04:22.920 29783-29783 DefaultGetWellknownTask im.vector.app.debug E Exception when executing request
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:118)
at java.net.SocketInputStream.read(SocketInputStream.java:173)
at java.net.SocketInputStream.read(SocketInputStream.java:143)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:985)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:949)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.-$$Nest$mprocessDataFromSocket(Unknown Source:0)
at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:238)
at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:220)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:209)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor.intercept(FlipperOkhttpInterceptor.java:102)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at org.matrix.android.sdk.internal.network.ApiInterceptor.intercept(ApiInterceptor.kt:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:221)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at org.matrix.android.sdk.internal.network.UserAgentInterceptor.intercept(UserAgentInterceptor.kt:35)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at org.matrix.android.sdk.internal.network.TimeOutInterceptor.intercept(TimeOutInterceptor.kt:47)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Suppressed: java.net.SocketTimeoutException: Read timed out
... 39 more
Suppressed: java.net.SocketTimeoutException: Read timed out
... 39 more
```

### Your phone model

Sony Xperia 10 iv, oneplus cph2415

### Operating system version

Android 12, Android 14

### Application version and app store

1.6.24, Play Store

### Homeserver

a local Synapse server

### Will you send logs?

Yes

### Are you willing to provide a PR?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.