Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12168] CLI: Fix setup command serialization

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-08-02T23:18:42.000+0000
Affected Version/sRelease 3.0.0
Fix Version/s2013 Sprint 16, 2013 Sprint 16 Core, Release 3.2.0
ComponentsCLI
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2012-12-29T17:54:09.000+0000
Updated2013-11-15T07:25:52.000+0000

Description

When the setup command finishes prompting for all values, the values are serialized and saved. It's (somehow) possible that the serialization fails when a value is thought to be a string, but instead it's a boolean.
Path to the Android NDK: (this is needed for building native Titainum Modules for Android) 
 
/usr/local/lib/node_modules/titanium/node_modules/longjohn/index.js:111
      throw e;
            ^
TypeError: Object true has no method 'trim'
    at exports.run (/usr/local/lib/node_modules/titanium/lib/commands/setup.js:310:42)
Here's the Q&A question where the bug was found: http://developer.appcelerator.com/question/146242/problem-occurred-unable-to-create-new-project-with-sdk3.

Comments

  1. Stuart Porteous 2012-12-29

    Here's the full output from terminal.. Path to the Android NDK: (this is needed for building native Titainum Modules for Android) /usr/local/lib/node_modules/titanium/node_modules/longjohn/index.js:111 throw e; ^ TypeError: Object true has no method 'trim' at exports.run (/usr/local/lib/node_modules/titanium/lib/commands/setup.js:310:42) at Array.forEach (native) at exports.run (/usr/local/lib/node_modules/titanium/lib/commands/setup.js:309:25) at prompt.get (/usr/local/lib/node_modules/titanium/node_modules/prompt/lib/prompt.js:317:32) at async.forEachSeries.iterate (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:116:25) at assembler (/usr/local/lib/node_modules/titanium/node_modules/prompt/lib/prompt.js:314:9) at prompt.get (/usr/local/lib/node_modules/titanium/node_modules/prompt/lib/prompt.js:323:32) at prompt.getInput (/usr/local/lib/node_modules/titanium/node_modules/prompt/lib/prompt.js:598:5) at Interface.onLine (/usr/local/lib/node_modules/titanium/node_modules/prompt/node_modules/read/lib/read.js:110:5) The Android NDK path was left blank.
  2. Chris Barber 2013-07-26

    https://github.com/appcelerator/titanium/pull/50 https://github.com/appcelerator/node-appc/pull/50
  3. Chris Barber 2013-07-31

    To test, run "ti setup" and run through the various screens. Since the command was essentially rewritten from the ground up, this specific bug is no longer applicable.
  4. Dhirendra Jha 2013-11-15

    Environment - Appc Studio - 3.2.0.201311140721 SDK - 3.2.0.v20131114184328 acs -1.0.7 alloy - 1.3.0 titanium - 3.2.0 titanium-code-processor - 1.1.0 Xcode - 5.0.2 OS - Mac OS X Mavericks (10.9) Result - Executed "ti setup" and followed the various screen. Did not observe any error or exception. Hence closing this issue.

JSON Source