Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1618] longjohn.js line 185 Exception

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNeeds more info
Resolution Date2015-09-29T01:08:26.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, line185, longjohn.js
ReporterSyed Junaid Yousuf
AssigneeShak Hossain
Created2014-11-25T02:10:54.000+0000
Updated2016-03-08T07:38:06.000+0000

Description

Hello, Whenever I try to create an apk file it gives an error exception in longjohn.js line 185. I added console.log and printed the _error. Here it error thrown. I am using Titanium-CLI 3.2.1 and Titanium 3.2.2.GA and Node version is 0.10.25. App is running perfectly for iOS simulator. ================== { [TypeError: Bad argument] cached_trace: [ { receiver: [Object], fun: [Function], pos: 24308 }, { receiver: [Object], fun: [Function], pos: 18821 }, { receiver: [Object], fun: [Function: run], pos: 1357 }, { receiver: [Object], fun: [Function], pos: 143210 }, { receiver: [Object], fun: [Function], pos: 6093 }, { receiver: [Object], fun: [Function], pos: 6747 }, { receiver: [Object], fun: [Function], pos: 3559 }, { receiver: [Object], fun: [Function], pos: 6535 }, { receiver: [Object], fun: [Function], pos: 6275 }, { receiver: [Object], fun: [Function], pos: 17055 }, {}, { receiver: [Object], fun: [Function: run], pos: 1563 }, { receiver: [Object], fun: [Function], pos: 142503 }, { receiver: [Object], fun: [Function], pos: 6093 }, { receiver: [Object], fun: [Function], pos: 6747 }, { receiver: [Object], fun: [Function], pos: 3559 }, { receiver: [Object], fun: [Function], pos: 6535 }, { receiver: [Object], fun: [Function], pos: 6275 }, { receiver: [Object], fun: [Function], pos: 17055 } ], previous: { [Error] id: 17027, location: 'run (/Users/syedjunaidyousuf/Library/Application Support/Titanium/mobilesdk/osx/3.2.2.GA/node_modules/node-appc/lib/subprocess.js:59)', location: 'EventEmitter.on', previous: null, trace_count: 1, cached_trace: [ [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object] ] } } ================== { [TypeError: Bad argument] cached_trace: [ { receiver: [Object], fun: [Function], pos: 24308 }, { receiver: [Object], fun: [Function], pos: 18821 }, { receiver: [Object], fun: [Function: run], pos: 1357 }, { receiver: [Object], fun: [Function], pos: 143210 }, { receiver: [Object], fun: [Function], pos: 6093 }, { receiver: [Object], fun: [Function], pos: 6747 }, { receiver: [Object], fun: [Function], pos: 3559 }, { receiver: [Object], fun: [Function], pos: 6535 }, { receiver: [Object], fun: [Function], pos: 6275 }, { receiver: [Object], fun: [Function], pos: 17055 }, {}, { receiver: [Object], fun: [Function: run], pos: 1563 }, { receiver: [Object], fun: [Function], pos: 142503 }, { receiver: [Object], fun: [Function], pos: 6093 }, { receiver: [Object], fun: [Function], pos: 6747 }, { receiver: [Object], fun: [Function], pos: 3559 }, { receiver: [Object], fun: [Function], pos: 6535 }, { receiver: [Object], fun: [Function], pos: 6275 }, { receiver: [Object], fun: [Function], pos: 17055 } ], previous: { [Error] id: 17027, location: 'run (/Users/syedjunaidyousuf/Library/Application Support/Titanium/mobilesdk/osx/3.2.2.GA/node_modules/node-appc/lib/subprocess.js:59)', location: 'EventEmitter.on', previous: null, trace_count: 1, cached_trace: [ [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object] ] } } /usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:188 throw e; ^ TypeError: Bad argument at ChildProcess.spawn (child_process.js:923:24) at exports.spawn (child_process.js:723:9) at Object.run (/Users/syedjunaidyousuf/Library/Application Support/Titanium/mobilesdk/osx/3.2.2.GA/node_modules/node-appc/lib/subprocess.js:47:14) at AndroidBuilder. (/Users/syedjunaidyousuf/Library/Application Support/Titanium/mobilesdk/osx/3.2.2.GA/android/cli/commands/_build.js:3954:20) at /usr/local/lib/node_modules/titanium/lib/hook.js:232:13 at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:232:13 at async.eachSeries (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:130:20) at _asyncMap (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:226:9) at Object.mapSeries (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:216:23) at async.series (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:549:19) at Object.run (/Users/syedjunaidyousuf/Library/Application Support/Titanium/mobilesdk/osx/3.2.2.GA/node_modules/node-appc/lib/subprocess.js:59:8) at AndroidBuilder.<anonymous> (/Users/syedjunaidyousuf/Library/Application Support/Titanium/mobilesdk/osx/3.2.2.GA/android/cli/commands/_build.js:3930:21) at /usr/local/lib/node_modules/titanium/lib/hook.js:232:13 at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:232:13 at async.eachSeries (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:130:20) at _asyncMap (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:226:9) at Object.mapSeries (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:216:23) at async.series (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:549:19)

Comments

  1. Shuo Liang 2014-11-25

    Hi, Please try to run "ti setup check" in terminal, then provide us the output. That could be helpful to address the problem. Regards, Shuo
  2. Syed Junaid Yousuf 2014-11-25

    ──────────────────┤ Check Environment ├─────────────────── Node.js ★ node new version v0.10.26 available! (currently v0.10.25) ★ npm new version v1.4.3 available! (currently v1.3.24) Titanium CLI ★ cli new version v3.4.1-rc available (currently v3.2.1) Titanium CLI Dependencies ✓ async up-to-date (v0.2.10) ✓ colors up-to-date (v0.6.2) ✓ fields up-to-date (v0.1.22) ✓ humanize up-to-date (v0.0.9) ✓ jade up-to-date (v0.35.0) ✓ longjohn up-to-date (v0.2.4) ✓ moment up-to-date (v2.4.0) ✓ node-appc up-to-date (v0.2.0) ✓ optimist up-to-date (v0.6.1) ✓ request up-to-date (v2.27.0) ✓ semver up-to-date (v2.2.1) ✓ sprintf up-to-date (v0.1.4) ✓ temp up-to-date (v0.6.0) ✓ winston up-to-date (v0.6.2) ✓ wrench up-to-date (v1.5.8) Titanium SDK ✓ latest sdk installed (v3.4.1.GA) ! selected sdk latest Titanium SDK "v3.4.1.GA" is not the selected SDK (currently v3.2.2.GA) Mac OS X Environment ✓ CLI Tools installed iOS Environment ✓ Xcode installed (5.1.1) ✓ iOS SDK installed (7.1) ✓ WWDR cert installed ! developer cert not found ! distribution cert not found ! dev provisioning not found ! dist provisioning not found Android Environment ✓ sdk installed (/Users/syedjunaidyousuf/Downloads/android-sdk-macosx) ✕ tools unsupported version 23.0.5 ✕ platform tools unsupported version 21 ✓ build tools installed (v19.0.1) ✓ adb installed /Users/syedjunaidyousuf/Downloads/android-sdk-macosx/platform-tools/adb ✓ android installed /Users/syedjunaidyousuf/Downloads/android-sdk-macosx/tools/android ✓ emulator installed /Users/syedjunaidyousuf/Downloads/android-sdk-macosx/tools/emulator ✓ mksdcard installed /Users/syedjunaidyousuf/Downloads/android-sdk-macosx/tools/mksdcard ✕ zipalign "zipalign" executable not found; please reinstall Android SDK ✓ aapt installed /Users/syedjunaidyousuf/Downloads/android-sdk-macosx/build-tools/19.0.1/aapt ✓ aidl installed /Users/syedjunaidyousuf/Downloads/android-sdk-macosx/build-tools/19.0.1/aidl ✓ targets installed (25 found) ✓ avds installed (27 found) ! ndk Android NDK not found Java Development Kit ✓ jdk installed (v1.6.0) ✓ java installed /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java ✓ javac installed /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/javac ✓ keytool installed /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool ✓ jarsigner installed /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/jarsigner Intel® Hardware Accelerated Execution Manager (HAXM) ✓ compatible ! installed not found; install HAXM to use Android x86 emulator Network ✓ online - no proxy server configured ✓ http request test ✓ https request test Directory Permissions ✓ home directory ✓ titanium config directory ✓ titanium sdk install directory
  3. Shuo Liang 2014-11-26

  4. Motiur Rahman 2015-09-02

    Hello, Is it still an issue for you? I recommend you upgrade your studio and SDK to the latest build then let us know if you get the same error again. Thanks.

JSON Source