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

Android 11 breaks compatibility layer for TLS 1.2+ #68

Closed
0xpr03 opened this issue Nov 6, 2021 · 6 comments
Closed

Android 11 breaks compatibility layer for TLS 1.2+ #68

0xpr03 opened this issue Nov 6, 2021 · 6 comments
Labels

Comments

@0xpr03
Copy link
Owner

0xpr03 commented Nov 6, 2021

Describe the bug
On android 11 the survey crashes (sometimes?) due to problems with the netcipher compat layer that provides TLS 1.2+ on android 4.4

msg: java.lang.NoSuchMethodException: com.android.org.conscrypt.Java8EngineSocket.setHostname [class java.lang.String]
stacktrace: java.lang.IllegalStateException: Could not enable SNI
	at info.guardianproject.netcipher.client.TlsOnlySocketFactory$DelegateSSLSocket.setHostname(TlsOnlySocketFactory.java:534)
	at info.guardianproject.netcipher.client.TlsOnlySocketFactory.makeSocketSafe(TlsOnlySocketFactory.java:110)
	at info.guardianproject.netcipher.client.TlsOnlySocketFactory.createSocket(TlsOnlySocketFactory.java:121)
	at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:185)
	at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:153)
	at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
	at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
	at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
	at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
	at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
	at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262)
	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219)
	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30)
	at vocabletrainer.heinecke.aron.vocabletrainer.lib.ViewModel.SurveyViewModel.lambda$submitSurvey$0(SurveyViewModel.java:68)
	at vocabletrainer.heinecke.aron.vocabletrainer.lib.ViewModel.SurveyViewModel.lambda$submitSurvey$0$SurveyViewModel(Unknown Source:0)
	at vocabletrainer.heinecke.aron.vocabletrainer.lib.ViewModel.-$$Lambda$SurveyViewModel$QQ0OZbz57vK6Kw9lAdA7DOx-pyo.run(Unknown Source:4)
	at java.lang.Thread.run(Thread.java:923)
Caused by: java.lang.NoSuchMethodException: com.android.org.conscrypt.Java8EngineSocket.setHostname [class java.lang.String]
	at java.lang.Class.getMethod(Class.java:2072)
	at java.lang.Class.getMethod(Class.java:1693)
	at info.guardianproject.netcipher.client.TlsOnlySocketFactory$DelegateSSLSocket.setHostname(TlsOnlySocketFactory.java:531)
	... 19 more
@0xpr03 0xpr03 added the crash label Nov 6, 2021
@slash-under
Copy link

slash-under commented Dec 2, 2021

I'm getting constant crashes from the survey, leading to me being unable to submit successfully on Android 12.

@0xpr03
Copy link
Owner Author

0xpr03 commented Dec 2, 2021

Yeah for now the best is to reject the survey until I've got a fix out.

@slash-under
Copy link

slash-under commented Dec 2, 2021 via email

@slash-under
Copy link

Rejecting is the only way I can find to break that loop and make the app usable again.

@0xpr03
Copy link
Owner Author

0xpr03 commented Dec 2, 2021

Unfortunately not rejecting it makes the app unusable since the survey pops up each time, then when you accept, the app crashes.

Eh yeah, I messed that sentence up. I wanted to say reject the survey.

@0xpr03
Copy link
Owner Author

0xpr03 commented Dec 11, 2021

This takes a little bit longer to fix because I had to do a lot of stuff in the background. If you want to know more the details are below:

  • I introduced a big DB 3.0 change
  • I want to ship that change with the next fix
  • I want proper crash reporting for this big change
  • I had to get a crash reporting instance running that bugged out
  • I can't actually test crash reporting in a valid manner without already having the reporting service up and running due to android limitations
  • I had to migrate a ton of stuff when moving my server lately
  • log4j happened today

@0xpr03 0xpr03 closed this as completed in dc96942 Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants