AnchorFreePartner / hydrasdk-demo-android

Hydra VPN SDK demo app for Android
https://developer.anchorfree.com/
60 stars 31 forks source link

SSL handshake aborted: ssl=0xb8c086b0: Failure in SSL library, usually a protocol errorerro #122

Closed Nevaehy closed 3 years ago

Nevaehy commented 3 years ago

Application crashes in API 16-19.

Error stack trace:

E/USDK-DefaultTrackerTra: --------------------------------------------------------- | javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb8c086b0: Failure in SSL library, usually a protocol errorerro | | r:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version (external/openssl/ssl/s23_clnt.c:741 0xa9083925:0x00 | | 000000) | E/USDK-DefaultTrackerTra: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb8c086b0: Failure in SSL library, usually a protocol error error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version (external/openssl/ssl/s23_clnt.c:741 0xa9083925:0x00000000) at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:412) at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:320) at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:284) at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:169) at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:258) at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135) at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:127) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:257) at okhttp3.RealCall.execute(RealCall.java:93) at com.anchorfree.ucr.transport.DefaultTrackerTransport.upload(DefaultTrackerTransport.java:145) at com.anchorfree.ucr.EventsTracker.uploadForTracker(EventsTracker.java:243) at com.anchorfree.ucr.EventsTracker.lambda$performUpload$2$EventsTracker(EventsTracker.java:208) at com.anchorfree.ucr.-$$Lambda$EventsTracker$n5yv4ZUOVo1Sykw_Ghihebt2qJw.run(lambda) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) at java.lang.Thread.run(Thread.java:856) Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb8c086b0: Failure in SSL library, usually a protocol error error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version (external/openssl/ssl/s23_clnt.c:741 0xa9083925:0x00000000) at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method) at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:371)

What I've tried: • All possible methods of ProviderInstaller • All possible methods and callbacks from GoogleApiAvailability • Implementation of 'com.google.android.gms:play-services-safetynet:+' and 'com.google.android.gms:play-services-auth:19.0.0' • Custom SSLSocketFactory implementation, but I couldn't find a way to set this SSL Factory to the UnifedSDK.

timoshenkoav commented 3 years ago

Please update to latest version. 3.4.9 - it has integrated urls for <5.0 support. Application is not crashing - its just a log

Nevaehy commented 3 years ago

Update to version 3.4.9 didn't help. And the application actually crashes, it's not just a log.

timoshenkoav commented 3 years ago

tried on the sample from this repo on android 19 emulator. was able to login

Nevaehy commented 3 years ago

Try on android 16 emulator

timoshenkoav commented 3 years ago

please provide the full logs or the logs that causes the crash - the attached logs cannot cause the application to crash

timoshenkoav commented 3 years ago

Try on android 16 emulator

tried, works for me

timoshenkoav commented 3 years ago

what is the reason to support api 16? there is <1% of users

Nevaehy commented 3 years ago

The management believes it is still economically profitable

Nevaehy commented 3 years ago

Rebuilt entire app with updated module and it looks like it works now. Thanks!