Crash: Unexpected TLS version: NONE
See original GitHub issueHi there!
First at all thank you very much for your library!
I’ve integrated okhttp3 since couple months ago; there were no problem until yesterday with an user (Huawei, model MHA-L29, on Android 7.0):
Fatal Exception: java.lang.IllegalArgumentException: Unexpected TLS version: NONE
at okhttp3.TlsVersion.forJavaName(TlsVersion.java:53)
at okhttp3.Handshake.get(Handshake.java:56)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:300)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:268)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:160)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:256)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:134)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:113)
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:125)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:147)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:776)
Have you got some ideas about this crash?
Thank you very much guys!
Issue Analytics
- State:
- Created 6 years ago
- Comments:24 (2 by maintainers)
Top Results From Across the Web
Android: okhttp3 > crash: Unexpected TLS version: NONE
Can you try this by providing TLS configuration I am not sure if this will work. referred from here ConnectionSpec spec = new...
Read more >Common issues when enabling TLS 1.2 - Microsoft Learn
This article provides advice for common issues that occur when you enable TLS 1.2 support in Configuration Manager.
Read more >crash : An unexpected TLS packet was received. - Screenly OSE
I am trying to find a solution to this problem with current uzbl because the Qt Webview application is still in experimental version...
Read more >Rehash: How to Fix the SSL/TLS Handshake Failed Error
The TLS Handshake Failed error can originate from the client or the server, here's a guide for fixing the problem for both users...
Read more >3.x Change Log - OkHttp
Fix: Don't crash on Java 8u252 which introduces an API previously found only on Java ... OkHttp from crashing with the error, Unexpected...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
same error using 3.10 with Retrofit 2
Fatal Exception: java.lang.IllegalArgumentException: Unexpected TLS version: at okhttp3.TlsVersion.forJavaName(TlsVersion.java:53) at okhttp3.TlsVersion.forJavaNames(TlsVersion.java:59) at okhttp3.ConnectionSpec.tlsVersions(ConnectionSpec.java:113) at okhttp3.ConnectionSpec.toString(ConnectionSpec.java:221) at java.lang.String.valueOf(String.java:2683) at java.lang.StringBuilder.append(StringBuilder.java:129) at java.util.AbstractCollection.toString(AbstractCollection.java:458) at java.util.Collections$UnmodifiableCollection.toString(Collections.java:1108) at java.lang.String.valueOf(String.java:2683) at java.lang.StringBuilder.append(StringBuilder.java:129) at okhttp3.internal.connection.ConnectionSpecSelector.configureSecureSocket(ConnectionSpecSelector.java:70) at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:274) at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:251) at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:151) at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:192) at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121) at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at com.justdo.logic.network.RestClient$1.intercept(RestClient.java:60) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:762)
Also, that stack trace appears to be 3.8.