Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24683] childprocess.spawn() BAD ARGUMENT : problem with Windows Phone SDK

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-07-20T22:54:47.000+0000
Affected Version/sRelease 6.0.4
Fix Version/sRelease 6.2.0
ComponentsWindows
Labelsandroid, studio, windows_phone
ReporterClement Fauconnier
AssigneeEwan Harris
Created2017-05-11T15:52:48.000+0000
Updated2017-08-29T21:16:54.000+0000

Description

1- Remove everything about Appcelerator, following these instructions : https://medium.com/all-titanium/reinstalling-appcelerator-titanium-on-windows-from-scratch-f7c50e2161f3 2- "del /s /q .appcelerator" didn't work because of nested node_modules creating a too long path that Windows 10 was unable to move or delete (same for .titanium) Use 7-zip File Manager + "shift+delete" to delete these long paths. 3- Install Appcelerator studio, let it download third parties like node. 4- create a default mobile app for android only, launch on emulator or device 5- see attached logs on this ticket (and custom logs for more info) for complete result : 2017-05-10T18:19:57.879Z | DEBUG | [PLUGIN-LOAD] 0ms C:\Users\user\.appcelerator\install\6.2.0\package\appc.js 2017-05-10T18:19:58.269Z | DEBUG | [PLUGIN-LOAD] 390ms C:\Users\user\.appcelerator\install\6.2.0\package\node_modules\appc-cli-titanium\appc.js 2017-05-10T18:19:58.269Z | DEBUG | run plugin: C:\Users\user\.appcelerator\install\6.2.0\package\node_modules\appc-cli-titanium 2017-05-10T18:19:58.269Z | DEBUG | [PLUGIN-LOAD] 0ms C:\Users\user\.appcelerator\install\6.2.0\package\node_modules\arrow\appc.js 2017-05-10T18:19:58.269Z | DEBUG | run plugin: C:\Users\user\.appcelerator\install\6.2.0\package\node_modules\arrow 2017-05-10T18:19:58.269Z | TRACE | plugin "arrow" failed its "when" function check, skipping... 2017-05-10T18:19:58.269Z | TRACE | loading plugin "titanium" for command "run" CLI options via function 2017-05-10T18:19:58.269Z | TRACE | loading plugin "titanium" for command "run" CLI options via array 2017-05-10T18:19:58.269Z | TRACE | executing command "run" with the following plugins: ["titanium"] 2017-05-10T18:19:58.285Z | TRACE | Attempting to load session info from config file 2017-05-10T18:19:58.285Z | TRACE | check if session is invalidated 2017-05-10T18:19:58.519Z | TRACE | refresh session expiry to: 1495045206737 2017-05-10T18:19:58.519Z | TRACE | session expiry 1495045206737 false 2017-05-10T18:19:58.519Z | TRACE | session already loaded in opts.session 2017-05-10T18:19:58.519Z | DEBUG | Titanium Downloads Last Checked: 1494402944711 2017-05-10T18:19:58.597Z | TRACE | No project alloy hook; skipping update to 1.0.0 2017-05-10T18:20:00.214Z | ERROR | An uncaught exception was thrown! Bad argument 2017-05-10T18:20:00.214Z | ERROR | Bad argument 2017-05-10T18:20:00.214Z | TRACE | TypeError: Bad argument at TypeError (native) at ChildProcess.spawn (internal/child_process.js:274:26) at exports.spawn (child_process.js:362:9) at winAppDeployCmdEnumerate (C:\ProgramData\Titanium\mobilesdk\win32\6.0.4.GA\node_modules\windowslib\lib\wptool.js:61:11) at C:\ProgramData\Titanium\mobilesdk\win32\6.0.4.GA\node_modules\windowslib\lib\wptool.js:154:5 at C:\ProgramData\Titanium\mobilesdk\win32\6.0.4.GA\node_modules\windowslib\node_modules\async\lib\async.js:718:13 at async.forEachOf.async.eachOf (C:\ProgramData\Titanium\mobilesdk\win32\6.0.4.GA\node_modules\windowslib\node_modules\async\lib\async.js:233:13) at _parallel (C:\ProgramData\Titanium\mobilesdk\win32\6.0.4.GA\node_modules\windowslib\node_modules\async\lib\async.js:717:9) at Object.async.parallel (C:\ProgramData\Titanium\mobilesdk\win32\6.0.4.GA\node_modules\windowslib\node_modules\async\lib\async.js:731:9) at C:\ProgramData\Titanium\mobilesdk\win32\6.0.4.GA\node_modules\windowslib\lib\wptool.js:151:9 at C:\ProgramData\Titanium\mobilesdk\win32\6.0.4.GA\node_modules\windowslib\lib\windowsphone.js:210:11 at C:\ProgramData\Titanium\mobilesdk\win32\6.0.4.GA\node_modules\windowslib\lib\utilities.js:49:3 at nextTickCallbackWith0Args (node.js:420:9) at process._tickCallback (node.js:349:13) --------------------------------------------- --- Maybe related to this error, I am not able to configure windows as suggested in the dashboard (see attached screenshots) Even when I try to select the Windows SDK location (see result on second screenshot) So Windows is never green-checked on dashboard (see background in screenshots). I don't understand why it searches for windows Phone SDK where I just want to build for android on this app though, and with registry keys that don't exist on my computer..

Attachments

FileDateSize
pastedImage.png2017-05-11T15:48:25.000+0000252395
pastedImage (1).png2017-05-11T15:48:23.000+0000266151
run_default_android_app_logs.txt2017-05-11T15:46:30.000+000015252
run_default_android_app_with_custom_logs.txt2017-05-11T15:46:32.000+000031305

Comments

  1. Ricardo Pereira 2017-05-12

    this also happened to me, I'm using Windows 10, I've Visual Studio 2015 and 2017. It seems like the CLI is broken, I've installed about 2 or 3 times, and every time that I open the Appcelerator Studio setup, in the prerequisites, the CLI version is always "Found: nothing", even after installed through here or by the command: npm install appcelerator -g C:\Users\ricardo>node --version v4.8.3 C:\Users\ricardo>appc info -l trace Appcelerator Command-Line Interface, version 6.2.0 Copyright (c) 2014-2017, Appcelerator, Inc. All Rights Reserved. 2017-05-12T09:29:10.822Z | TRACE | set environment to {"registry":"https://software.appcelerator.com","baseurl":"https://platform.appcelerator.com"} 2017-05-12T09:29:10.838Z | TRACE | executing command "info" with no plugins 2017-05-12T09:29:10.947Z | TRACE | "C:\Program Files\nodejs\node.exe" "C:\Users\ricardo\.appcelerator\install\6.2.0\package\node_modules\titanium\bin\titanium" sdk -o json 2017-05-12T09:29:12.244Z | TRACE | checking for titanium, result: { activeSDK: '6.0.4.GA', defaultInstallLocation: 'C:\\ProgramData\\Titanium', installLocations: [ 'C:\\ProgramData\\Titanium', 'C:\\Users\\ricardo\\AppData\\Roaming\\Titanium', 'C:\\ProgramData\\Application Data\\Titanium' ], installed: { '6.0.4.GA': 'C:\\ProgramData\\Titanium\\mobilesdk\\win32\\6.0.4.GA', '5.5.1.GA': 'C:\\ProgramData\\Titanium\\mobilesdk\\win32\\5.5.1.GA' }, sdks: { '6.0.4.GA': { name: '6.0.4.GA', manifest: [Object], path: 'C:\\ProgramData\\Titanium\\mobilesdk\\win32\\6.0.4.GA' }, '5.5.1.GA': { name: '5.5.1.GA', manifest: [Object], path: 'C:\\ProgramData\\Titanium\\mobilesdk\\win32\\5.5.1.GA' } } } 2017-05-12T09:29:14.416Z | DEBUG | 1 2017-05-12T09:29:14.416Z | DEBUG | 2017-05-12T09:29:14.431Z | ERROR | Error: titanium exited with exit code 1. re-run with -l trace to get detailed output at ChildProcess. (C:\Users\ricardo\.appcelerator\install\6.2.0\package\lib\commands\info.js:45:23) at emitTwo (events.js:87:13) at ChildProcess.emit (events.js:172:7) at maybeClose (internal/child_process.js:862:16) at Socket. (internal/child_process.js:338:11) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at Pipe._onclose (net.js:490:12) 2017-05-12T09:29:14.431Z | TRACE | Sending exit signal to titanium process: 4012
  2. Ewan Harris 2017-05-12

    [~cfauconnier] [~ricardo_jcp] thanks for the report! We'll look into this and update accordingly
  3. Ricardo Pereira 2017-05-12

    I've installed all the Windows Phone SDK (8.1 and 10) available inside the Visual Studio Installer and it solved that issue
  4. Ewan Harris 2017-07-11

    Steps to reproduce

    Install VS2017 https://www.visualstudio.com/vs/

    Run the installer

    Select Individual Components

    Select Windows 10 SDK (10.0.15063.0) for Desktop C++ x86 and x64

    Wait...

    Run appc ti info -t windows

  5. Ewan Harris 2017-07-14

    Bumping to 6.2.0 due to the risk of the tickets that would be pulled in by this change. If you wish to work around this issue yourself please see [this commit](https://github.com/appcelerator/windowslib/pull/72/commits/56c56b762910a9a27dc973c11e0637861aa1c5f2)
  6. Kota Iguchi 2017-07-19

    windowslib PR merged (0.5.2), should update titanium_mobile in order to resolve this ticket.
  7. Christopher Williams 2017-07-20

    Ended up getting merged as part of PR for TIMOB-24591
  8. Ewan Harris 2017-08-10

    titanium_mobile master: https://github.com/appcelerator/titanium_mobile/pull/9297 titanium_mobile 6_2_X: https://github.com/appcelerator/titanium_mobile/pull/9298
  9. Abir Mukherjee 2017-08-29

    Closing this ticket, as fixed already merged. I double0checked the version installed, and windowslib 0.5.4. I also ran "appc ti info -t windows", and no errors were seen.

JSON Source