Skip to content
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 on Android10Platform, sslSocketFactory is class com.android.org.conscrypt.OpenSSLSocketFactoryImpl site:stackoverflow.com #449

Open
terence-codigo opened this issue Sep 23, 2020 · 9 comments

Comments

@terence-codigo
Copy link

Issue Summary

I'm using version 1.1.3.
VimeoClient crashes upon initialize with the following stack trace:

Caused by: java.lang.IllegalStateException: Unable to extract the trust manager on Android10Platform, sslSocketFactory is class com.android.org.conscrypt.OpenSSLSocketFactoryImpl
        at okhttp3.OkHttpClient$Builder.sslSocketFactory(OkHttpClient.kt:751)
        at com.vimeo.networking.RetrofitClientBuilder.build(RetrofitClientBuilder.java:186)
        at com.vimeo.networking.VimeoClient.createOkHttpClient(VimeoClient.java:182)
        at com.vimeo.networking.VimeoClient.createRetrofit(VimeoClient.java:132)
        at com.vimeo.networking.VimeoClient.<init>(VimeoClient.java:121)
        at com.vimeo.networking.VimeoClient.initialize(VimeoClient.java:114)

Reproduction Steps

Initialize the VimeoClient.

Expected Behavior

VimeoClient initializes.

Actual Behavior

VimeoClient throws IllegalStateException upon initialize.

@Cosmopal
Copy link

Yes, facing the same issue

@iamdamjanmiloshevski
Copy link

I'm experiencing this too!

@iamdamjanmiloshevski
Copy link

Managed to solve it with the help of this https://stackoverflow.com/questions/65737921/vimeo-networking-library-crash-for-android-10-platform-api29/65771964#65771964.

Hope it helps everybody else until Vimeo releases a fix

@filwiesner
Copy link

So I assume the problem is related to this issue and as per the comment in the linked SO answer the solution "makes the connection insecure". Is this fixed in some alpha versions of this lib or are there any other workarounds for this problem? Because this "bug" makes this lib unusable.
cc. @anthonycr @WhosNickDoglio

@filwiesner
Copy link

I guess the team is inactive because they are working on version 2.0 which will fix a lot of current issues but a simple "We are working on it" would go a long way.

@anthonycr
Copy link
Contributor

Really sorry for the issues you're all running into with the release version.

My advice is to use to the alpha versions of the library from Jitpack (latest is 2.0.0-alpha.86 as of writing this) instead of the 1.1.3 release version on Jcenter. It's what we use in the Vimeo Android app, and keep it up to date. Unfortunately there is a decent amount of documentation work to be done for us to be able to release 2.0 as a non-alpha version, and since the primary job of us library maintainers is to work on Vimeo's Android app and not this library (we aren't on the API team), we haven't been able to take the time to finish it up.

If you as a Vimeo user want to see this library ship regularly to a release channel, I suggest contacting support by filing a ticket and letting them know that you need public, regular releases of this library.

If you're fine to use alpha versions (which are stable enough to ship in production), then I suggest doing that.

@filwiesner
Copy link

Thank you for your answer. I almost lost hope 😅
I've tried the alpha versions but I get conflict errors when trying to build:

...(20 similar errors with different classes)...
Duplicate class com.vimeo.networking2.params.SearchSortType found in the following modules: 
jetified-models-2.0.0-alpha.88 (com.github.vimeo.vimeo-networking-java:models:2.0.0-alpha.88),   
jetified-models-parcelable-2.0.0-alpha.88-runtime (com.github.vimeo.vimeo-networking-java:models-parcelable:2.0.0-alpha.88)   
and jetified-models-serializable-2.0.0-alpha.88 (com.github.vimeo.vimeo-networking-java:models-serializable:2.0.0-alpha.88)  

It might be a problem on my side but I've never seen a similar error with any other libs.

I understand that releasing public versions of this library is not the main focus and I am willing to use the alpha versions as long as they work. If filing a support ticket might help to improve the situation, I'll gladly do it.

@WhosNickDoglio
Copy link
Contributor

@wooodenleg What artifacts are you adding to your gradle file?

You should only need the the top level networking library (com.vimeo.networking:vimeo-networking:2.0.0-alpha.88) and and only one of the model artifacts (models, models-parcelable or models-serializable).

All three models artifacts are the same classes (which seems to be whats causing your error) but offer something a little different.

  • com.vimeo.networking:models: No serializing mechanism applied.
  • com.vimeo.networking:models-serializable: All models implement the Serializable interface so objects can be serialized on the JVM (or Android)
  • com.vimeo.networking:models-parcelable: All models implement the Parcelable interface so objects can be serialized on Android (No JVM)

@filwiesner
Copy link

Well, since I thought that alpha versions are only on Jitpack, I am using only com.github.vimeo:vimeo-networking-java:2.0.0-alpha.88 artifact. I haven't noticed that there are others artifacts like models-parcelable so I didn't include them. It looks like that the Jitpack dependency includes the whole repo with all modules so I am actually depending on all of the models modules.
When I realized this I excluded models-parcelable and models-serializable dependencies and everything seems to work now.

For future reference I used:

repositories {
    // ...
    maven { url = uri("https://jitpack.io") }
}

dependencies {
    // ...
    implementation("com.github.vimeo:vimeo-networking-java:2.0.0-alpha.88") {
        exclude(module = "models-serializable")
        exclude(module = "models-parcelable")
    }
}

@WhosNickDoglio
com.vimeo.networking:vimeo-networking:2.0.0-alpha.88 does not seem to work. I guess that would have to be on maven central but there is only the 1.1.3 version.

sandy105 pushed a commit to sandy105/react-native-ssl-pinning that referenced this issue Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants