Login does not work on Android 9 (SSLHandshake)
Expected Behavior
What you expect to happen when you do some action / are in a certain state.
Login with correct credentials works.
Actual Behavior
What you observe when doing that action / being in that state.
Login fails. Logcat shows SSLHandshake warning
17:14:44.154 System.err W javax.net.ssl.SSLHandshakeException: Handshake failed
17:14:44.154 W at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:302)
17:14:44.154 W at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379)
17:14:44.154 W at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337)
17:14:44.154 W at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:209)
17:14:44.154 W at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
17:14:44.155 W at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
17:14:44.155 W at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
17:14:44.155 W at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
17:14:44.155 W at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
17:14:44.155 W at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
17:14:44.155 W at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
17:14:44.155 W at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
17:14:44.155 W at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
17:14:44.155 W at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
17:14:44.155 W at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
17:14:44.156 W at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
17:14:44.156 W at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
17:14:44.156 W at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
17:14:44.156 W at de.hs_worms.it.cpt.core.util.ok_http.RequestKt$postRequest$2.invoke(Request.kt:87)
17:14:44.156 W at de.hs_worms.it.cpt.core.util.ok_http.RequestKt$postRequest$2.invoke(Request.kt:69)
17:14:44.156 W at kotlinx.coroutines.InterruptibleKt.runInterruptibleInExpectedContext(Interruptible.kt:51)
17:14:44.156 W at kotlinx.coroutines.InterruptibleKt.access$runInterruptibleInExpectedContext(Interruptible.kt:1)
17:14:44.156 W at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:43)
17:14:44.156 W at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invoke(Unknown Source:8)
17:14:44.156 W at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invoke(Unknown Source:4)
17:14:44.157 W at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
17:14:44.157 W at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:161)
17:14:44.157 W at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
17:14:44.157 W at kotlinx.coroutines.InterruptibleKt.runInterruptible(Interruptible.kt:42)
17:14:44.157 W at kotlinx.coroutines.InterruptibleKt.runInterruptible$default(Interruptible.kt:39)
17:14:44.157 W at de.hs_worms.it.cpt.core.util.ok_http.RequestKt.postRequest(Request.kt:69)
17:14:44.157 W at de.hs_worms.it.cpt.core.backend.users_rights.data.LoginNetworkDataSource$login$2$response$1.invokeSuspend(LoginNetworkDataSource.kt:73)
17:14:44.157 W at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
17:14:44.157 W at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
17:14:44.158 W at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
17:14:44.158 W at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
17:14:44.158 W at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
17:14:44.158 W at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
17:14:44.158 W at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
17:14:44.158 W at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
17:14:44.159 W Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x7bac54b688: Failure in SSL library, usually a protocol error
17:14:44.159 W error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION (external/boringssl/src/ssl/tls_record.cc:592 0x7bac43e088:0x00000001)
17:14:44.159 W at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
17:14:44.159 W at com.android.org.conscrypt.NativeSsl.doHandshake(NativeSsl.java:383)
17:14:44.159 W at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:231)
17:14:44.159 W ... 39 more
17:14:44.160 LoginViewModel E result failed: Failure(javax.net.ssl.SSLHandshakeException: Handshake failed)
Steps to reproduce
- Get an Android 9 or lower device
- Install release/debug with version v0.10.0
- Try to login (credentials don't need to be vaild)
Used Hardware
Smartphone: Samsung