-
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
Crash: Unexpected TLS version: NONE #3719
Comments
Does your app change the SSL provider in any way? to GMS services e.g. include ProviderInstaller.installIfNeeded. It could also just be the setup of that phone. Is it a one-off or consistently reproducible? I've seen a similar issue in rare timing cases either before or after a network issue, a non-standard SSL provider can return NONE as the string. OkHttp might have to handle this more gracefully. |
Hi! About your questions:
Is there a manner to catch this exception in my App to avoid a crash? |
I could confirm this issue on multiple devices. You could look in details at Crashlytics http://crashes.to/s/188322d298a Here is part of my application from stacktrace https://gist.github.com/anonymous/eb4c8d96de290e84c3e5be093060023f I use GMS ProviderInstaller and custom SSLSocketFactory. |
n.b. my PR fix will turn these into IOExceptions and handle them cleanly e.g. retry other connection routes. But it won't fix an underlying fatal problem e.g. connecting to specific servers with a custom SSLSocketFactory. |
@yschimke: this crash stills there :( I've added ProviderInstaller.installIfNeeded into my App + a custom SSLSocketFactory. It's really rare, but today 1 user had this crash (Android 7.0 on Galaxy S7 Edge). |
@anthony3444 the fix is in the next release (3.10), until then when they happen you will get a crash from OkHttp. |
We're observing the same crash. 100% of crashes happen to users on Google phones running Android 8.1.0, though we can't reproduce on the same device we have. |
@yschimke do we have an ETA of this release? |
I don't, I think we had planned for a 3.10 earlier than this. cc @swankjesse @JakeWharton |
Hey guys, same crash - it's quite rare for us too, was just wondering if the issue could be kept open until 3.10 is released. Are there any extra informations that I could provide that may be needed/helpful? |
I think this is fixed in 3.10. |
@swankjesse is 3.10 expected to be released any time soon? thanks! |
On the Android platform, when the TLS handshake is interrupted, SSLSession.getProtocol() may return "NONE". square#3719 square#3973
On the Android platform, when the TLS handshake is interrupted, SSLSession.getProtocol() may return "NONE". square#3719 square#3973
same error using 3.10 with Retrofit 2
|
Mostly fixed in 3.10, but there was a race condition. Hopefully fixed correctly in 3.11 |
Also, that stack trace appears to be 3.8. |
Is this fixed in 3.11? |
Yes, if you see it with 3.11 or it manifests in other similar ways, please open an issue. |
@dave-r12 ve |
@gongzelong0718 please give 3.11 a try. The commits in the release are on our git history. |
@gongzelong0718 the stack trace includes class names and line numbers. We can correlate that information with git tags to understand possible versions. For example: In version 3.8 it contains this line of code: And in 3.10: Note that 3.10 has no executable code! |
Hi there!
First at all thank you very much for your library!
I've integrated okhttp3 since couple months ago; there were no problem until yesterday with an user (Huawei, model MHA-L29, on Android 7.0):
Have you got some ideas about this crash?
Thank you very much guys!
The text was updated successfully, but these errors were encountered: