[TIMOB-16458] CLI: Cannot build a project when the directory switch is specified
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-03-28T18:10:23.000+0000 |
Affected Version/s | Release 3.2.1 |
Fix Version/s | 2014 Sprint 06, 2014 Sprint 06 Tooling, Release 3.2.3, Release 3.3.0 |
Components | CLI |
Labels | qe-testadded, regression |
Reporter | Davide |
Assignee | Chris Barber |
Created | 2014-02-12T22:18:03.000+0000 |
Updated | 2014-06-19T12:44:10.000+0000 |
Description
It seems that I cannot build a project when giving the project directory -d switch
ti build -d /home/davide/Titanium_Studio_Workspace/projectname/ --platform android --log-level error
/usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:184
throw e;
^
Error
at Object. (/usr/local/lib/node_modules/titanium/lib/cli.js:159:30)
at Module._compile (module.js:456:26)
at Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at run (/usr/local/lib/node_modules/titanium/lib/titanium.js:180:17)
at /usr/local/lib/node_modules/titanium/lib/titanium.js:101:3
at /usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/subprocess.js:100:8
---------------------------------------------
at Object.run (/usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/subprocess.js:59:8)
at find (/usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/subprocess.js:96:14)
at q.process (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:731:21)
at processImmediate (timers.js:309:15)
When instead I cd in the directory and launch the build command:
ti build --no-prompt --platform android --log-level error
All is working fine.
The build process was fine with 3.2.1 beta.
I can reproduce this problem only if tiapp.xml points to 3.2.0 SDK as per the following entry.
Just tested as well with different version of SDK in tiapp.xml problem exists with:
Moving this ticket to engineering as I can reproduce this issue with 3.2.1 CLI + 3.2.0 SDK on OSX. Reporter is running into this problem with SDK 3.2.1 GA as well but I cannot reproduce that particular combination. Nonetheless, it is a bug with 3.2.1 CLI.
Great find!
This is a regression that was introduced in Titanium SDK 3.2.0 around the time the Android build was rewritten.
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5552 3.2.x pull request: https://github.com/appcelerator/titanium_mobile/pull/5553
Verified fixed on: Linux Mint 16 (x64) Titanium CLI, build: 3.2.1, 3.2.3-alpha2 Titanium SDK, build: 3.2.1.GA, 3.2.2.GA, 3.2.3.v20140403105720 Alloy: 1.3.1 Followed the test steps in the description, and managed to replicate the error using 3.2.1.GA and 3.2.2.GA versions of the SDK on both 3.2.1 and 3.2.3-alpha2 CLI. Using 3.2.3.v20140403105720 on 3.2.1 and 3.2.3-alpha2 CLI fixed the error and the project built and installed successfully. Closing.