-
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
Native crash in SSL_CTX_set_alpn_protos #666
Comments
Duplicate of #647. Workaround the problem by adding this code to run early in your program:
It's caused by mixing both AOSP's built-in HttpURLConnection and OkHttp in the same process. There's a bug in Android's TLS stack that fixes the problem, but that fix isn't widely available. |
We already have that workaround in, first line in Application's oncreate. |
Hmm, maybe this is from using the same context on multiple threads? |
@kruton that should be supported. Is sharing an SSLContext between threads broken in 4.4? |
I meant calling |
(OkHttp code calls |
Yes, but the |
@kruton I'll open an AOSP bug? |
Sounds good. |
In the interim I'll disable ALPN... |
ALPN disabled. Still to do: cherry-pick to 1.5 branch and release that. |
Any update on merging this to the 1.5 branch? |
Will do this week. |
It's been 8 days and I still haven't cherry-picked. I was hoping to find a reproducible fix for another, unrelated issue, but that's not revealing itself. |
1.5.4 went out last night. |
We get this error using okhttp 1.5.2. We get it when activly using our app (loading next page of data + loading a ton of images for that new page), it's not terribly difficult to reproduce. Happens on a nexus 5 4.4.2.
I managed to reproduce it 3 times in fairly short succession, downgraded to 1.3.0 and used the app for a while without issues so I'm fairly confident it's okhttp causing it, but it's tricky to be 100% certain :/.
I'm downgrading okhttp in this branch now and I'll close this issue if I'm ever able to reproduce it on 1.3.x.
The text was updated successfully, but these errors were encountered: