问题
In the past few weeks I've been seeing a lot of crashes with line numbers in the import statement lines.
For example this stacktrace with a crash at line 2
Fatal Exception: java.lang.IllegalArgumentException: Unexpected TLS version: NONE
at okhttp3.TlsVersion.forJavaName(TlsVersion.java:2)
at okhttp3.Handshake.get(Handshake.java:4)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:12)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:4)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:13)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:25)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:1)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:5)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:5)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:10)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:1)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:22)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:10)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:1)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:22)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:10)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:5)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:10)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:1)
Has anyone found a solution to this?
回答1:
Using version 3.10.0.
Avoid using invalid HTTPS sessions. This prevents OkHttp
from crashing with the error Unexpected TLS version: NONE
.
Source: https://square.github.io/okhttp/changelog_3x/
来源:https://stackoverflow.com/questions/53150654/crashlytics-is-reporting-wrong-line-numbers