-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to extract the trust manager #2323
Comments
Ahh, yeah I gotta fix this for the GMS TLS stack. Will fix. |
Released as 3.1.1 and 2.7.4. |
Just re-checked with 3.1.1, unfortunately, still doesn't work under Robolectric but works on actual Android (API 23).
|
Same thing here, robolectric tests are now crashing after upgrade from 3.0.0-RC1 |
Same here on robolectric tests:
|
@swankjesse please see above: should this be reopened, or would you prefer a new issue opened for the |
Fixes for Robolectric released in OkHttp 3.1.2. |
Yupp, Robolectric tests are now back to normal, thanks! |
Hi, Unable to extract the trust manager on okhttp3.internal.Platform$Android@53244b48, sslSocketFactory is class crittercism.android.q at okhttp3.OkHttpClient.(OkHttpClient.java:187) |
This issue should be re-opened, I still have the same issue using Retrofit 2.0.0-beta4 (/OkHttp 3.1.2) in combination with Crittercism (5.5.5-rc-1 to be exact). Error:
|
@kacamak , @PieterAelse ugh! You guys interested in trying to help out with the fix? I need to be able to extract the X509TrustManager instance from the SSLSocketFactory, but I don’t know anything about the SSLSocketFactory that gets configured when you use Crittercism. (Also, why is Crittercism customizing the system’s SSL? That seems sketchy.) |
@swankjesse, some folks are seeing this in the PayPal Sdk too. PayPal uses custom SSLSocketFactory for pinning purposes and to enable TLSv1.2 on API 16-19 devices. |
Have this problem with DAVdroid's SSLSocketFactoryCompat. Has anything changed in how SSLSocketFactories should be set? |
If you rename that factory’s private |
Can you please elaborate on your above comment a little bit more @swankjesse !! That would be very helpful. |
to
|
Thanks @iNoles ! I had a complete different thing in mind :) This was easy. |
Can confirm that it works with |
@swankjesse I also don't know whyyy Crittercism is doing anything with SSL. So I'm also not sure how I'll be able to help you out with getting the SSLSocketFactory. |
Hi, same issue Here wirh the Crittercism API. |
Hey there, also seeing the same issue. Specifically with the combination of Crittercism and Optimizely... |
Still same issue with Crittercism. Caused by: java.lang.IllegalStateException: Unable to extract the trust manager on okhttp3.internal.Platform$Android@256897c7, sslSocketFactory is class crittercism.android.q
at okhttp3.OkHttpClient.<init>(OkHttpClient.java:187)
at okhttp3.OkHttpClient.<init>(OkHttpClient.java:151) |
@jkang-critter when Crittercism 5.6.2 update fix will be integrated in cordova-plugin-apteligent ? |
EDIT: see response below |
@codebaum You shouldn't have to disable service monitoring anymore. The bug was fixed in Crittercism 5.6.1. An even later version (5.6.3( is now available. |
@dshirley Never mind, I thought it wasn't working with 5.6.3-rc-1 but I re-tested and I'm not seeing a crash anymore. |
Just a friendly ping to see if we can get a fix/release for this issue. Trying to get things updated for the Parse SDK so would want to have a way to make a call to systemDefaultTrustManager() |
I have read the discussion on this issue, however I am totally confused by all the discussion on 3rd party libraries that just use OkHttp. My major problem is that I neither do see a clear description why this error is occurring nor how to fix it (or better how to get around it). I am using plain OkHttp 3.2.0 and Android with my custom SSLSocketFactor and TrustManager implementation. |
I'm personally getting this error with Retrofit2 v2.0.2:
|
Using OkHttp 3.3.0-SNAPSHOT fixed the issue for me. |
Was fixed here by using Crittercism v5.6.3 |
When Crittercism v5.6.3 will be integrated in cordova-plugin-apteligent ? |
Hey so i'm running both Crittercsim 5.6.4 and OkHttp V3.3.0 and still facing the crash. Any update on how to fix it ? |
We're also having this crash. Only on Androids 4.0 and 4.1. |
+1 Having this same issue on retrofit:2.1.0, I'm simply trying to build an instance of retrofit on the setUp method of a test.
Full stacktrace:
|
Can you put a breakpoint on |
Sure, the following line on
Throws this exception:
Hope that helps |
@feresr looks like PowerMock is causing you harm here. |
@swankjesse Yes, thank you! that was exactly it. that solved my issue. |
Why Class.forName("sun.security.ssl.SSLContextImpl") has not found here? From the code: Server: JBoss AS 7.1.1.Final "Brontes" pom.xml: |
okhttp:3.1.2 and retrofit 2.0.2 but still getting the issue |
I experienced this error while using a custom -keepclassmembers class * implements javax.net.ssl.SSLSocketFactory {
private final javax.net.ssl.SSLSocketFactory delegate;
} In my SocketFactory class, I had the following field: private final SSLSocketFactory delegate; So adjust the ProGuard rule accordingly. E.g, the access modifiers like |
@swankjesse iam not getting why wont it work without the delegate hack |
@JeffreyCA ooooooof you saved my life :)) |
|
Hi,
after upgrading from OkHttp 3.0.1 to 3.1.0 I get the following stack trace and crash after calling build() to create a OkHttpClient.
This issue was not present in 3.0.1.
Here's where the crash happens:
The text was updated successfully, but these errors were encountered: