Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20534] Android: Services enabled app crashes with error "Didn't find class ti.modules.titanium.network.NonValidatingSSLSocketFactory" when built with 3.5.2 & 4.0.1 SDK

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-03-14T02:02:30.000+0000
Affected Version/sRelease 3.5.1, Release 4.1.0, Release 4.0.1
Fix Version/sRelease 3.5.1, Release 4.1.0, Release 4.0.1
ComponentsAndroid
Labelsqe-3.5.2, qe-4.0.1
ReporterLokesh Choudhary
AssigneeHieu Pham
Created2016-03-08T23:14:24.000+0000
Updated2017-03-31T22:04:18.000+0000

Description

Steps to reproduce:

1. Create a defaut alloy or clasic app. Make sure you have services enabled. 2. Using the components & SDK in the description build for android device/emulator. 3. Let the app launch.

Actual Results:

1. The app crashes 2-3 seconds after launch with error:
[WARN] :   TiVerify: (Timer-0) [5003,5003] Verifying module licenses...
[ERROR] :  TiApplication: (Timer-0) [4,5007] Sending event: exception on thread: Timer-0 msg:java.lang.NoClassDefFoundError: Failed resolution of: Lti/modules/titanium/network/NonValidatingSSLSocketFactory;; Titanium 4.0.1,2016/03/08 10:35,72e9f11
[ERROR] :  TiApplication: java.lang.NoClassDefFoundError: Failed resolution of: Lti/modules/titanium/network/NonValidatingSSLSocketFactory;
[ERROR] :  TiApplication:     at org.appcelerator.titanium.TiVerify.run(Unknown Source)
[ERROR] :  TiApplication:     at java.util.Timer$TimerImpl.run(Timer.java:284)
[ERROR] :  TiApplication: Caused by: java.lang.ClassNotFoundException: Didn't find class "ti.modules.titanium.network.NonValidatingSSLSocketFactory" on path: DexPathList[[zip file "/data/app/com.app.theefivetwoclassic-2/base.apk"],nativeLibraryDirectories=[/data/app/com.app.theefivetwoclassic-2/lib/arm, /vendor/lib, /system/lib]]
[ERROR] :  TiApplication:     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[ERROR] :  TiApplication:     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
[ERROR] :  TiApplication:     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
[ERROR] :  TiApplication:     ... 2 more
[ERROR] :  TiApplication:     Suppressed: java.lang.ClassNotFoundException: ti.modules.titanium.network.NonValidatingSSLSocketFactory
[ERROR] :  TiApplication:         at java.lang.Class.classForName(Native Method)
[ERROR] :  TiApplication:         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
[ERROR] :  TiApplication:         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
[ERROR] :  TiApplication:         at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
[ERROR] :  TiApplication:         ... 3 more
[ERROR] :  TiApplication:     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
2. This might be due to the fact that the "NonValidatingSSLSocketFactory" class is removed as a part of the google security fix. 3. When built with SDK 3.5.1.GA & 4.0.0.GA this issue is not seen.

Expected Results:

1. The app should not crash.

Comments

  1. Ingo Muschenetz 2016-03-08

    Hieu, can you take a look?
  2. Fokke Zandbergen 2016-03-10

    [~hpham] 4_1_X will also need the fix.
  3. Ashraf Abu 2016-03-11

    PR's for various branches with updated Titanium Verify *.jar and *.so:- - master (5.2.0.GA) [PR] (https://github.com/appcelerator/titanium_mobile/pull/7837) - 5_3_X (5.2.0.GA) [PR] (https://github.com/appcelerator/titanium_mobile/pull/7836) - 5_2_X (5.2.0.GA) [PR] (https://github.com/appcelerator/titanium_mobile/pull/7835) - 5_1_X (5.1.0.GA) [PR] (https://github.com/appcelerator/titanium_mobile/pull/7834) - 5_0_X (5.0.0.GA) [PR] (https://github.com/appcelerator/titanium_mobile/pull/7833) - 4_1_X (4.1.0.GA) [PR](https://github.com/appcelerator/titanium_mobile/pull/7832) - 4_0_X (4.0.0.GA) [PR](https://github.com/appcelerator/titanium_mobile/pull/7830) - 3_5_X (3.5.1.GA) [PR](https://github.com/appcelerator/titanium_mobile/pull/7831) The bracket TitaniumMobile SDK version is what the Titanium Verify is compiled against. I've scons the branches and tried it out. No crashes and able to get it working correctly.
  4. Ashraf Abu 2016-03-14

    PRs that have been merged:- - 4_1_X (4.1.0.GA) [PR](https://github.com/appcelerator/titanium_mobile/pull/7832) - 4_0_X (4.0.0.GA) [PR](https://github.com/appcelerator/titanium_mobile/pull/7830) - 3_5_X (3.5.1.GA) [PR](https://github.com/appcelerator/titanium_mobile/pull/7831)
  5. Chris Barber 2016-03-22

    [~lchoudhary] Titanium SDK 3.5.x only supports Node.js 0.10.4+ and 0.12.x. - make sure you're on a supported version.
  6. Lee Morris 2017-03-31

    Closing ticket as fixed, if there are any problems, please file a new ticket.

JSON Source