[TIMOB-20579] Android: "ti.verify" causes crash on startup when connecting to Internet via TLS 1.1 or higher
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2018-10-31T00:10:00.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Christopher Gedrim |
Assignee | Ashraf Abu |
Created | 2016-03-15T13:42:29.000+0000 |
Updated | 2018-10-31T00:10:00.000+0000 |
Description
When building for _test_ or _development_ calls are made by the TiVerify class to verify modules. This fails on the Samsung S2 (our only device running SDK 16/4.1), seemingly due to a TLS error, and causes the app to crash.
The crash does not occur when using a middleware proxy (Charles).
Commenting out the following lines fixes the issue:
{{112-115 of ~/Library/Application\ Support/Titanium/mobilesdk/osx/5.2.0.GA/android/templates/App.java
87- 90 of ~/Library/Application\ Support/Titanium/mobilesdk/osx/5.2.0.GA/android/templates/build/App.java}}
E/AndroidRuntime( 5046): Process: com.firstutility.firstutility, PID: 5046
E/AndroidRuntime( 5046): java.lang.IncompatibleClassChangeError: Class 'ti.modules.titanium.network.NonValidatingSSLSocketFactory' does not implement interface 'org.apache.http.conn.scheme.SocketFactory' in call to 'java.net.Socket org.apache.http.conn.scheme.SocketFactory.createSocket()' (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
E/AndroidRuntime( 5046): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:145)
E/AndroidRuntime( 5046): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
E/AndroidRuntime( 5046): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
E/AndroidRuntime( 5046): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:365)
E/AndroidRuntime( 5046): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
E/AndroidRuntime( 5046): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:514)
*E/AndroidRuntime( 5046): at org.appcelerator.titanium.TiVerify.run(Unknown Source) *
E/AndroidRuntime( 5046): at java.util.Timer$TimerImpl.run(Timer.java:284)
Hello, You haven't provide a sample test case. Please provide a test code and steps to follow for regenerating the issue. We will let you know if we can regenerate the issue in our environment. Also, Please provide your platform Information. Thanks.
Interestingly, having changed nothing (and not patching the files as stated above), we're now not seeing the issue. _The issue was seen all day Friday 11th and Monday 14th March 2016, which patching the files fixed_
[~hpham] you might want to have a look at this since you've been dealing with
NonValidatingSSLSocketFactory
.I have seen the exact same issue with an almost identical crash log: [ERROR] AndroidRuntime: FATAL EXCEPTION: Timer-0 [ERROR] AndroidRuntime: Process: com.firstutility.firstutility, PID: 30059 [ERROR] AndroidRuntime: java.lang.IncompatibleClassChangeError: Class 'ti.modules.titanium.network.NonValidatingSSLSocketFactory' does not implement interface 'org.apache.http.conn.scheme.SocketFactory' in call to 'java.net.Socket org.apache.http.conn.scheme.SocketFactory.createSocket()' (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar) [ERROR] AndroidRuntime: at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:189) [ERROR] AndroidRuntime: at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:172) [ERROR] AndroidRuntime: at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:130) [ERROR] AndroidRuntime: at org.apache.http.impl.client.DefaultRequestDirector.executeOriginal(DefaultRequestDirector.java:1317) [ERROR] AndroidRuntime: at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:707) [ERROR] AndroidRuntime: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:694) [ERROR] AndroidRuntime: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:542) [ERROR] AndroidRuntime: at org.appcelerator.titanium.TiVerify.run(Unknown Source) [ERROR] AndroidRuntime: at java.util.Timer$TimerImpl.run(Timer.java:284) [ERROR] Sensors: ~SensorEventQueue 0 [ERROR] E/ : BitTube(): close receivedFd (55) Device Specification (at time of error): Device Name: Galaxy S5 Neo Model Number: SM-G903F Android Version: 5.1.1 Additional information: Appcelerator : 5.2.0 Titanium CLI: v5.0.6 Alloy: 1.7.35 Java: 1.8.0_74 Platform tools: v23.1 Build tools: v22.0.1
I have this issue when using the new compiled backport for 3.5.x => 3.5.2.v20160308093511 when using modules. About a second after window creation the TiVerify module is called and verboses: 'Verifying module licenses' after which it 'FATAL ERROR's .... " {quote} 03-31 07:23:53.955: W/TiVerify(5671): (Timer-0) [4997,4997] Verifying module licenses... 03-31 07:23:53.955: E/AndroidRuntime(5671): FATAL EXCEPTION: Timer-0 03-31 07:23:53.955: E/AndroidRuntime(5671): Process: org.example.appname.android, PID: 5671 03-31 07:23:53.955: E/AndroidRuntime(5671): java.lang.NoClassDefFoundError: Failed resolution of: Lti/modules/titanium/network/NonValidatingSSLSocketFactory; 03-31 07:23:53.955: E/AndroidRuntime(5671): at org.appcelerator.titanium.TiVerify.run(Unknown Source) 03-31 07:23:53.955: E/AndroidRuntime(5671): at java.util.Timer$TimerImpl.run(Timer.java:284) 03-31 07:23:53.955: E/AndroidRuntime(5671): Caused by: java.lang.ClassNotFoundException: Didn't find class "ti.modules.titanium.network.NonValidatingSSLSocketFactory" on path: DexPathList[[zip file "/data/app/org.example.appname.android-2/base.apk"],nativeLibraryDirectories=[/data/app/org.example.appname.android-2/lib/x86, /data/app/org.example.appname.android-2/base.apk!/lib/x86, /vendor/lib, /system/lib]] 03-31 07:23:53.955: E/AndroidRuntime(5671): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 03-31 07:23:53.955: E/AndroidRuntime(5671): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 03-31 07:23:53.955: E/AndroidRuntime(5671): at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 03-31 07:23:53.955: E/AndroidRuntime(5671): ... 2 more 03-31 07:23:53.955: E/AndroidRuntime(5671): Suppressed: java.lang.ClassNotFoundException: ti.modules.titanium.network.NonValidatingSSLSocketFactory 03-31 07:23:53.955: E/AndroidRuntime(5671): at java.lang.Class.classForName(Native Method) 03-31 07:23:53.955: E/AndroidRuntime(5671): at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 03-31 07:23:53.955: E/AndroidRuntime(5671): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 03-31 07:23:53.955: E/AndroidRuntime(5671): at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 03-31 07:23:53.955: E/AndroidRuntime(5671): ... 3 more 03-31 07:23:53.955: E/AndroidRuntime(5671): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available 03-31 07:23:53.970: I/TiRootActivity(5671): (main) [0,0] checkpoint, on root activity resume. activity = org.example.appname.android.AppnameAndroidActivity@42ce4ba {quote}
[~rpl] It seems you are still using a slightly older version of 3.5.2. You need a newer version that has that fix.
-deleted-
[~rpl] please use 3.5.2.v20160311103211 which is linked from: http://www.appcelerator.com/blog/2016/03/update-on-recent-google-security-alerts/#we