Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18097] Android: App with module containing a native '.so' library fail to build

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-12-02T23:53:30.000+0000
Affected Version/sRelease 4.0.0
Fix Version/sRelease 3.5.0
ComponentsAndroid
Labelsmodule_android, qe-3.6.0, qe-manualtest, qe-testadded
ReporterLokesh Choudhary
AssigneeHieu Pham
Created2014-11-25T22:19:08.000+0000
Updated2015-01-08T01:30:20.000+0000

Description

Description:

1. Create a default app with services enabled. 2. Build it to an android device/emulator with sdk 3.6.0.v20141125101716.

Actual Result:

1. The build fails with the following errors:
/usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:185
        throw e;
              ^
TypeError: Cannot call method 'test' of undefined
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/android/cli/commands/_build.js:1557:28
    at Array.forEach (native)
    at AndroidBuilder.<anonymous> (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/android/cli/commands/_build.js:1554:56)
    at Array.forEach (native)
    at AndroidBuilder.<anonymous> (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/android/cli/commands/_build.js:1500:18)
    at AndroidBuilder.<anonymous> (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/node_modules/titanium-sdk/lib/builder.js:211:3)
    at detect.callback (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/node_modules/node-appc/lib/timodule.js:386:52)
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/node_modules/node-appc/lib/timodule.js:170:51
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/node_modules/node-appc/node_modules/async/lib/async.js:592:17
    at done (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/node_modules/node-appc/node_modules/async/lib/async.js:135:19)
---------------------------------------------
    at Object.run (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/node_modules/node-appc/lib/subprocess.js:59:8)
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/node_modules/titanium-sdk/lib/emulators/genymotion.js:318:21
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/node_modules/async/lib/async.js:511:21
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/node_modules/async/lib/async.js:227:13
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/node_modules/async/lib/async.js:111:13
    at Array.forEach (native)
    at _each (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/node_modules/async/lib/async.js:32:24)
    at async.each (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.6.0.v20141125101716/node_modules/async/lib/async.js:110:9)
[ERROR] Application Installer abnormal process termination. Process exit value was 8
2. Talking to chris barber figured out that javascript context is not passed into forEach() loop in file _build.js at 1569 as there is no
, this
which causes the failure.

Comments

  1. Hieu Pham 2014-12-02

    master PR: https://github.com/appcelerator/titanium_mobile/pull/6413
  2. Lokesh Choudhary 2015-01-05

    Verified the fix. Building app with module containing a native '.so' library does not fails to build. Closing. Environment: Appc Studio : 3.4.1.201410281743 Ti SDK : 3.6.0.v20150105084202 CLI : 3.4.1 Alloy : 1.5.1 GA Code Processor : 1.1.1 MAC Yosemite : 10.10 Nexus 5 - Android 5.0.1

JSON Source