Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24897] Android : Building android module from CLI fails with error 'spawn ti ENOENT'

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionCannot Reproduce
Resolution Date2018-04-12T16:36:50.000+0000
Affected Version/sRelease 6.1.0, Release 6.0.4, Release 6.1.1
Fix Version/sn/a
ComponentsAndroid, Tooling
Labelsqe-6.1.1
ReporterLokesh Choudhary
AssigneeYordan Banev
Created2017-06-27T01:32:18.000+0000
Updated2018-04-12T16:36:51.000+0000

Description

*NOTE: This might be an user error, gonna ask other team members to try on their side as well, to confirm. Seeing this with SDK 6.1.0.GA & 6.0.4.GA as well.*

Steps to reproduce:

1. Create a module using studio or CLI. 2. CD into the android folder. 3. Run appc run -l trace or appc run -p android -l trace.

Actual results:

1. The module build fails with error below:
[DEBUG] Running AAPT command: /Users/lchoudhary/Desktop/android-sdk-macosx/build-tools/26.0.0-rc2/aapt package -f -I /Users/lchoudhary/Desktop/android-sdk-macosx/platforms/android-23/android.jar -M /Users/lchoudhary/Desktop/lokimod/android/build/intermediates/manifests/aapt/AndroidManifest.xml -S /Users/lchoudhary/Desktop/lokimod/android/build/intermediates/res/merged -m -J /Users/lchoudhary/Desktop/lokimod/android/build/generated/r --custom-package com.app.lokimod --non-constant-id -0 apk --output-text-symbols /Users/lchoudhary/Desktop/lokimod/android/build/intermediates/bundles --no-version-vectors --extra-packages android.support.v7.appcompat:android.support.v7.cardview:ti.modules.titanium.ui
[INFO]  Packaging the module
[INFO]  Creating module zip
[INFO]  Writing module zip: /Users/lchoudhary/Desktop/lokimod/android/dist/com.app.lokimod-android-1.0.0.zip
[DEBUG] Staging module project at /var/folders/pk/k370szc955l_9w7hsb9nfvg00000gq/T/ti-android-module-build-117526-2710-lv5qdk.c3ch5pcik9
2017-06-27T01:24:29.868Z | ERROR  | An uncaught exception was thrown!
spawn ti ENOENT
2017-06-27T01:24:29.869Z | ERROR  | spawn ti ENOENT
2017-06-27T01:24:29.869Z | TRACE  | Error: spawn ti ENOENT
    at exports._errnoException (util.js:1018:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
---------------------------------------------
    at ChildProcess.spawn (internal/child_process.js:301:13)
    at exports.spawn (child_process.js:378:9)
    at runTiCommand (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/android/cli/commands/_buildModule.js:1839:15)
    at AndroidModuleBuilder.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/android/cli/commands/_buildModule.js:1873:4)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:3816:26
    at replenish (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:982:17)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:986:9
    at eachOfLimit (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:1011:22)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:1016:16
    at _parallel (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:3815:5)
    at Object.series (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:4664:3)
    at Object.series (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/node-appc/lib/async.js:62:8)
    at AndroidModuleBuilder.runModule (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/android/cli/commands/_buildModule.js:1934:13)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:3816:26
    at replenish (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:982:17)
---------------------------------------------
    at AndroidModuleBuilder.tasks (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/android/cli/commands/_buildModule.js:1676:15)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:3816:26
    at replenish (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:982:17)
    at iterateeCallback (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:967:17)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:944:16
    at WriteStream.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:3821:13)
    at apply (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:21:25)
    at WriteStream.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:56:12)
    at emitNone (events.js:91:20)
    at WriteStream.emit (events.js:185:7)
    at fs.js:2051:14
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/graceful-fs/graceful-fs.js:43:10
    at /Users/lchoudhary/.appcelerator/install/6.2.2/package/node_modules/titanium/node_modules/fs-extra/node_modules/graceful-fs/graceful-fs.js:43:10
    at /Users/lchoudhary/.appcelerator/install/6.2.2/package/node_modules/tar.gz/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js:43:10
---------------------------------------------
    at AndroidModuleBuilder.generateModuleJar (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/android/cli/commands/_buildModule.js:1632:20)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:3816:26
    at replenish (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:982:17)
    at iterateeCallback (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:967:17)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:944:16
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:3821:13
    at apply (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:21:25)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:56:12
    at AndroidModuleBuilder.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/android/cli/commands/_buildModule.js:1613:4)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:3816:26
    at replenish (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:982:17)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:986:9
    at eachOfLimit (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:1011:22)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:1016:16
    at _parallel (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:3815:5)
---------------------------------------------
    at Object.run (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/node-appc/lib/subprocess.js:59:8)
    at AndroidModuleBuilder.generateModuleRClassFile (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/android/cli/commands/_buildModule.js:586:20)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:3816:26
    at replenish (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:982:17)
    at iterateeCallback (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:967:17)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:944:16
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:3821:13
    at apply (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:21:25)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/async/dist/async.js:56:12
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/6.1.1.v20170626160851/node_modules/graceful-fs/graceful-fs.js:43:10
    at /Users/lchoudhary/.appcelerator/install/6.2.2/package/node_modules/titanium/node_modules/fs-extra/node_modules/graceful-fs/graceful-fs.js:43:10
    at /Users/lchoudhary/.appcelerator/install/6.2.2/package/node_modules/tar.gz/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js:43:10
    at /Users/lchoudhary/.appcelerator/install/6.2.2/package/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js:43:10
    at /Users/lchoudhary/.appcelerator/install/6.2.2/package/node_modules/fs-extra/node_modules/graceful-fs/graceful-fs.js:43:10
    at FSReqWrap.oncomplete (fs.js:123:15)

Expected Results:

1. The module should complete successfully.

Comments

  1. Lokesh Choudhary 2018-04-12

    Yes [~ybanev].

JSON Source