question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSLHandshakeException: Connection closed by peer

See original GitHub issue

I’m getting this exception from time to time after updating Lock.Android from 2.8.2 to 2.8.3:

Non-fatal Exception: com.auth0.android.authentication.AuthenticationException: Request failed
       at com.auth0.android.request.internal.AuthenticationErrorBuilder.from(AuthenticationErrorBuilder.java:3018)
       at com.auth0.android.request.internal.BaseRequest.onFailure$349ed88b(BaseRequest.java:151)
       at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:185)
       at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:764)
Caused by com.auth0.android.Auth0Exception: Failed to execute request to https://xxx.eu.auth0.com/delegation
       at com.auth0.android.request.internal.BaseRequest.onFailure$349ed88b(BaseRequest.java:150)
       at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:185)
       at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:764)
Caused by javax.net.ssl.SSLHandshakeException: Connection closed by peer
       at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(NativeCrypto.java)
       at com.android.org.conscrypt.SslWrapper.doHandshake(SslWrapper.java:374)
       at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:217)
       at com.squareup.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:7192)
       at com.squareup.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184)
       at com.squareup.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
       at com.squareup.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
       at com.squareup.okhttp.Call.com.squareup.okhttp.internal.http.HttpEngine.connect(Call.java:23281)
       at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243)
       at com.squareup.okhttp.Call$AsyncCall.com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:3205)
       at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:764)
  • Lock version: com.auth0.android:lock:2.8.3
  • Android version & Phone Model:

image

  • Versions of Gradle: gradle-4.6-all
  • Android Plugin: 3.1.1-3.1.2
  • Build tools: 27.0.3
  • Android SDK: 19-27

Any idea? Thanks for your help.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
davidmiglozcommented, Jul 27, 2019

Hi @lbalmaceda ,

I cannot tell you if it’s still happening because we’re not using auth0 anymore, sorry.

Best regards, David

0reactions
Rohan1joshicommented, Nov 5, 2022

Exception : javax.net.ssl.SSLHandshakeException Connection closed by peer at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:566) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:875) Caused by java.lang.reflect.InvocationTargetException: at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:556) Caused by javax.net.ssl.SSLHandshakeException: Connection closed by peer at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake at com.android.org.conscrypt.SslWrapper.doHandshake (SslWrapper.java:374) at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake (ConscryptFileDescriptorSocket.java:217) at com.android.okhttp.internal.io.RealConnection.connectTls (RealConnection.java:192) at com.android.okhttp.internal.io.RealConnection.connectSocket (RealConnection.java:149) at com.android.okhttp.internal.io.RealConnection.connect (RealConnection.java:112) at com.android.okhttp.internal.http.StreamAllocation.findConnection (StreamAllocation.java:184) at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection (StreamAllocation.java:126) at com.android.okhttp.internal.http.StreamAllocation.newStream (StreamAllocation.java:95) at com.android.okhttp.internal.http.HttpEngine.connect (HttpEngine.java:299) at com.android.okhttp.internal.http.HttpEngine.sendRequest (HttpEngine.java:237) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute (HttpURLConnectionImpl.java:461) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect (HttpURLConnectionImpl.java:127) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect (DelegatingHttpsURLConnection.java:89) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect

Read more comments on GitHub >

github_iconTop Results From Across the Web

javax.net.ssl.SSLHandshakeException: Connection closed by ...
my device was connected to the wifi but wifi router was not having the internet connection and then the exception was thrown.
Read more >
javax.net.ssl.SSLHandshakeException: Connection closed by ...
Unzip files into your app folder and add them to your project. ... 2) Not a fact that this will help. "Connection closed...
Read more >
How to fix Connection closed by peer android
Indicates that the peer's identity has not been verified. When the peer was not able to identify itself (for example; no certificate, the...
Read more >
Web Socket error - javax.net.ssl.SSLHandshakeException
Or is there a connection to the problem described above? 2) Web Socket error - javax.net.ssl.SSLHandshakeException: Abruptly closed by peer
Read more >
SSLHandshakeException - Talk - The Movie Database (TMDB)
SSLHandshakeException: Connection closed by peer at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found