Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28266] CLI: Building to Android with target device and a device ID results in an error

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 9.3.0, Release 9.2.2
Fix Version/sn/a
ComponentsAndroid, CLI
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2020-12-03T11:04:59.000+0000
Updated2020-12-03T11:05:09.000+0000

Description

Description

When building to a specific Android device (i.e. appc run -p android -T device -C foo) and no device is attached the following error will occur, I think this might be down to calling callback in the device-id prompt without any values
TypeError: Cannot read property 'once' of undefined
    at wireupPrePrompt (/Users/awam/git/titanium/lib/cli.js:421:12)
    at /Users/awam/git/titanium/lib/cli.js:590:21
    at /Users/awam/Library/Application Support/Titanium/mobilesdk/osx/9.3.0.v20201125050632/android/cli/commands/_build.js:421:17
    at AndroidBuilder.findTargetDevices (/Users/awam/Library/Application Support/Titanium/mobilesdk/osx/9.3.0.v20201125050632/android/cli/commands/_build.js:157:12)
    at prompt (/Users/awam/Library/Application Support/Titanium/mobilesdk/osx/9.3.0.v20201125050632/android/cli/commands/_build.js:378:8)
    at Object.opt.prompt (/Users/awam/git/titanium/lib/cli.js:589:11)
    at /Users/awam/git/titanium/lib/cli.js:847:9
    at /Users/awam/git/titanium/node_modules/async/dist/async.js:4096:9
    at Object.process (/Users/awam/git/titanium/node_modules/async/dist/async.js:2344:17)
    at /Users/awam/git/titanium/node_modules/async/dist/async.js:2252:19

Steps to reproduce

1. Make sure no devices are attached 2. Build a project with appc run -p android -T device -C foo

Actual

Error is thrown

Expected

No error

Comments

No comments

JSON Source