Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1047] titanium script ends in exception when Visual Studio is present.

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionDuplicate
Resolution Date2015-09-17T06:44:31.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsStudio, Titanium SDK & CLI
Labelscore, defect
Reporterwmmnpr
AssigneeShak Hossain
Created2014-09-10T22:27:31.000+0000
Updated2016-03-08T07:37:23.000+0000

Description

Most of the ti cli commands end with: /******************************begin stack trace *********************************/ c:\Users\wnpr\AppData\Roaming\npm\node_modules\titanium\node_modules\longjohn\dist\longjohn.js:185 throw e; ^ TypeError: Bad argument at ChildProcess.spawn (child_process.js:915:24) /******************************end stack trace *********************************/ By using the debugger /******************************begin debugger call*******************************/ wnpr@GFT6841 ~/Documents/Titanium_Studio_Workspace/Todo List $ node-debug /c/Users/wnpr/AppData/Roaming/npm/node_modules/titanium/lib/titanium.js info Node Inspector is now available from http://localhost:8080/debug?port=5858 Debugging c:/Users/wnpr/AppData/Roaming/npm/node_modules/titanium/lib/titanium.js /******************************begin debugger call*******************************/ I was able to locate that at line 915 in child_process.js that the following call: var r = this._handle.spawn(options); failed whenever the "options" parameter looked as followings: /******************************begin options object*******************************/ options: Object args: Array[5] 0: null 1: "&&" 2: "powershell" 3: "-command" 4: "C:\ProgramData\Titanium\mobilesdk\win32\3.3.0.RC2\node_modules\titanium-sdk\bin\test_permissions.ps1" length: 5 .. cwd: "C:\Programms\Microsoft Visual Studio 11.0\VC" detached: false /******************************end options object*******************************/ This "args" attribute of the options object was what was causing the exception and it was being created by a function in the "windows.js" file at line 376. When I commented out the "powershell" attribute creation code, the exception went away.

Comments

  1. Ingo Muschenetz 2014-09-16

    I believe this may be fixed by TIMOB-17411 or TIMOB-16958. Please try 3.4.0 and see if it addresses the issue.

JSON Source