FATAL EXCEPTION when using okhttpclient with conscrypt
See original GitHub issueI want tls 1.3 so I use conscrypt, according to TestTls13Request.java I use :
Security.insertProviderAt(Conscrypt.newProviderBuilder().provideTrustManager().build(), 1)
but it crashed, here is log
AndroidRuntime: java.lang.NoClassDefFoundError: org.conscrypt.TrustManagerImpl
AndroidRuntime: at org.conscrypt.TrustManagerFactoryImpl.engineGetTrustManagers(TrustManagerFactoryImpl.java:87)
AndroidRuntime: at javax.net.ssl.TrustManagerFactory.getTrustManagers(TrustManagerFactory.java:219)
AndroidRuntime: at okhttp3.internal.Util.platformTrustManager(Util.java:667)
AndroidRuntime: at okhttp3.OkHttpClient.<init>(OkHttpClient.java:257)
AndroidRuntime: at okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:1040)
There is no excepiton if I use this instead:
Security.insertProviderAt(new org.conscrypt.OpenSSLProvider(), 1);
but okhttpclient use tls 1.2 to handshake not 1.3
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
FATAL EXCEPTION: AsyncTask #1 error after copy file to ...
1 Answer 1 · Make a copy of your server application as well and run it on a machine at your office. Get...
Read more >PI83412: ANDROID APP WOULD CRASH AFTER UPGRADE ...
After upgrading from OkHttp 3.0.1 to 3.1.0 Android App crash and get the following. ... sslSocketFactory is class com.google.android.gms.org.conscrypt.
Read more >okhttp3.internal.platform.ConscryptPlatform.<init> java code ...
public static ConscryptPlatform buildIfSupported() { try { // Trigger an early exception over a fatal error, prefer a RuntimeException over Error. Class.
Read more >okhttp3.internal.platform.ConscryptPlatform Maven / Gradle / Ivy
Conscrypt; /** * Platform using Conscrypt (conscrypt.org) if installed as the ... early exception over a fatal error, prefer a RuntimeException over Error....
Read more >ClassCastException after updating to R8 2.0.59 (Android ...
... 12:38:33.807 5147-5885/? E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher Process: ... And another reported stack trace through Firebase (retraced ...
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
@yschimke Well, it doesn’t work. At least not out of the box. I’ll post to StackOverflow.
I’d rather not use proprietary close source components like Google Play Services; I’m fine for now if TLSv1.3 only works on Android 8 and 9.
fwiw: https://stackoverflow.com/questions/55539513/how-to-enable-tlsv1-3-for-okhttp-3-12-x-on-android-8-9