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.
master PR: https://github.com/appcelerator/titanium_mobile/pull/6413
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