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.

FATAL EXCEPTION when using okhttpclient with conscrypt

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
schildbachcommented, Apr 5, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

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