Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19153] Windows: CLI errors with Error: Callback was already called when building to emulator with production deploytype

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-07-29T23:41:02.000+0000
Affected Version/sRelease 4.1.0
Fix Version/sRelease 5.0.0
ComponentsCLI, Windows
Labelsqe-4.1.0
ReporterEwan Harris
AssigneeChristopher Williams
Created2015-07-03T00:46:38.000+0000
Updated2015-08-20T23:01:29.000+0000

Description

Description

When building for an emulator with a deploytype of production the build will error out with the below
C:\Users\Windo_000\.appcelerator\install\4.1.0-0\package\node_modules\appc-cli-titanium\node_modules\titanium\node_modules\longjohn\dist\longjohn.js:1
95
        throw e;
              ^
Error: Callback was already called.
    at WindowsBuilder.<anonymous> (C:\Users\Windo_000\.appcelerator\install\4.1.0-0\package\node_modules\appc-cli-titanium\node_modules\titanium\node_
modules\async\lib\async.js:22:31)
    at CLI._fireHookCallback (C:\Users\Windo_000\.appcelerator\install\4.1.0-0\package\node_modules\appc-cli-titanium\node_modules\titanium\lib\hook.j
s:269:12)
    at C:\Users\Windo_000\.appcelerator\install\4.1.0-0\package\node_modules\appc-cli-titanium\node_modules\titanium\lib\hook.js:248:10
    at C:\Users\Windo_000\.appcelerator\install\4.1.0-0\package\node_modules\appc-cli-titanium\node_modules\titanium\node_modules\async\lib\async.js:2
32:13
    at C:\Users\Windo_000\.appcelerator\install\4.1.0-0\package\node_modules\appc-cli-titanium\node_modules\titanium\node_modules\async\lib\async.js:1
42:25
    at C:\Users\Windo_000\.appcelerator\install\4.1.0-0\package\node_modules\appc-cli-titanium\node_modules\titanium\node_modules\async\lib\async.js:2
29:17
    at C:\Users\Windo_000\.appcelerator\install\4.1.0-0\package\node_modules\appc-cli-titanium\node_modules\titanium\node_modules\async\lib\async.js:5
56:34
    at C:\Users\Windo_000\.appcelerator\install\4.1.0-0\package\node_modules\appc-cli-titanium\node_modules\titanium\lib\hook.js:239:9
    at EventEmitter.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\windows\cli\hooks\wp-run.js:244:9)
---------------------------------------------
    at installApp (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\windows\cli\hooks\wp-run.js:218:8)
    at C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\windows\cli\hooks\wp-run.js:286:7
    at C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:551:21
    at C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:227:13
    at iterate (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:134:13)
    at C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:145:25
    at C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:229:17
    at C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:556:34
---------------------------------------------
    at C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\windows\cli\hooks\wp-run.js:265:8
    at C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:551:21
    at C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:227:13
    at iterate (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:134:13)
    at async.eachSeries (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:150:9)
    at _asyncMap (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:226:9)
    at Object.mapSeries (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:216:23)
    at async.series (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150702140313\node_modules\async\lib\async.js:549:19)

Steps to reproduce

1. Build a project using appc run -p windows -T wp-emulator -D production

Actual result

The CLI will error with the above

Expected result

The CLI should not error

Comments

  1. Christopher Williams 2015-07-27

    https://github.com/appcelerator/titanium_mobile_windows/pull/390
  2. Kota Iguchi 2015-07-28

    I had experienced following error during ti build for development deployment after merging PR#390. Reverted the changes.
       [ERROR] Failed to start emulator "8-1-1"
       [ERROR] Connection failed because of invalid command-line arguments.
       
  3. Christopher Williams 2015-07-29

    https://github.com/appcelerator/titanium_mobile_windows/pull/396
  4. Lokesh Choudhary 2015-08-20

    Verified the fix. We don't see any errors & the appc builds successfully to emulator with deploytype production. Closing. Environment: Appc Studio: 5.0.0.v20150819140421 Ti SDK: 5.0.0.v20150820100424 Ti CLI: 4.1.4 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.2.0-1 APPC CLI: 5.0.0-8 Node : v0.10.37 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows emulator : 8.1

JSON Source