Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23766] Android: Default alloy & classic app crashes after launch with error : Requested module not found: ti.cloud, even though present

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-08-30T06:45:55.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 6.0.0
ComponentsAndroid
Labelsqe-6.0.0
ReporterLokesh Choudhary
AssigneeChee Kiat Ng
Created2016-08-11T21:20:10.000+0000
Updated2016-09-01T20:39:20.000+0000

Description

Steps To Reproduce:

1. Create a default alloy/classic app with SDK mentioned in environment. 2. Build for android device/emulator.

Actual Results:

1. The app crashes after launch with error:
[DEBUG] :  Module: require called with un-prefixed module id, should be a core or CommonJS module. Falling back to old Ti behavior and assuming it's an absolute file
[ERROR] :  TiExceptionHandler: (main) [210,210] ----- Titanium Javascript Runtime Error -----
[ERROR] :  TiExceptionHandler: (main) [0,210] - In ti:/module.js:301,2
[ERROR] :  TiExceptionHandler: (main) [0,210] - Message: Uncaught Error: Requested module not found: ti.cloud
[ERROR] :  TiExceptionHandler: (main) [1,211] - Source: 	throw new Error("Requested module not found: " + request); // TODO Set 'code' property to 'MODULE_NOT_FOUND' to match Node?
[ERROR] :  V8Exception: Exception occurred at ti:/module.js:301: Uncaught Error: Requested module not found: ti.cloud

Expected Results:

1. The app should not crash & run successfully.

Comments

  1. Ashraf Abu 2016-08-22

    [~cwilliams] Logs mention V8Exception. Is this related to any of the changes for the new V8 support or the way that the request module is done?
  2. Ashraf Abu 2016-08-24

    Currently investigating this area: https://github.com/appcelerator/titanium_mobile/blob/master/android/runtime/common/src/js/module.js#L232-L302
  3. Chee Kiat Ng 2016-08-25

    PRs here: https://github.com/appcelerator/titanium_mobile/pull/8263 backport 6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8264
  4. Chee Kiat Ng 2016-08-26

  5. Lokesh Choudhary 2016-08-30

    [~cng], I created a default app with services enabled using the SDK with the fix. I don't see the crash or the ti.cloud error anymore but some new error:
       [ERROR] :  TiHTTPClient: (TiHttpClient-1) [337,337] HTTP Error (java.io.IOException): 411 : Length Required
       [ERROR] :  TiHTTPClient: java.io.IOException: 411 : Length Required
       [ERROR] :  TiHTTPClient: 	at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1217)
       [ERROR] :  TiHTTPClient: 	at java.lang.Thread.run(Thread.java:818)
       [ERROR] :  D/com.google.android.apps.docs.quickoffice.X(28099): Loading recent documents list
       [ERROR] :  D/com.google.android.apps.docs.quickoffice.X(28099): Checking validity of 1 items
       [INFO] :   ACS Login Results for environment development:
       [INFO] :   [object Object]
       
    Environment: Appc Studio : 4.8.0.201608221113 Ti SDK : 6.0.0.v20160830110225 Ti CLI : 5.0.9 Alloy : 1.9.1 MAC El Capitan : 10.11.6 Appc NPM : 4.2.7 Appc CLI : 6.0.0-31 Node: 4.4.4 Nexus 6 - Android 6.0.1
  6. Chee Kiat Ng 2016-08-31

    [~msamah] can you verify if this is a different issue altogether, and if possible see if it's fixable? looks like its something to do with httpclient
  7. Ashraf Abu 2016-08-31

    This is another issue. That error is a response from the server. https://github.com/appcelerator/titanium_mobile/blob/8d8d1925e5d2d23116d6e2bb86835a9f5ff25190/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java#L1217 Response from server: HTTP Status Code 411. Length Required. [~lchoudhary] Can you create a different ticket for this error?
  8. Lokesh Choudhary 2016-08-31

  9. Lokesh Choudhary 2016-09-01

    Closing as fixed.

JSON Source