Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16417] CLI: Build - If you have 3.2.0 CLI with 3.2.1 SDK selected in CLI and in tiapp.xml, then "Invalid platform "undefined"" message is returned

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2014-02-06T23:56:52.000+0000
Affected Version/sRelease 3.2.1
Fix Version/sn/a
ComponentsCLI
Labelsn/a
ReporterWilson Luu
AssigneeChris Barber
Created2014-02-06T22:18:54.000+0000
Updated2017-03-20T17:20:13.000+0000

Description

Comments

  1. Chris Barber 2014-02-06

    This was introduced when fixing TIMOB-16153. This error only occurs when you have a 3.2.0 CLI and a 3.2.1 or newer SDK. What's happening is the 3.2.0 CLI loads the build command, then calls the build command's config() function. Inside the config() function, it fires the "build.config" hook, but because the hook API changed in 3.2.1, 3.2.0 expects the arguments in the old order (which is error, results, result). The "result" is the build command configuration and "results" is the result of all post hook functions, usually an empty array. The 3.2.0 CLI receives "results" as an empty array as the config options and treats it as no options. Then it continues to load the command with the only know options of --config and --sdk. Because the --platform option was never found, it doesn't know that -p is actually --platform and eventually the build command's validate() will catch the problem and error. Now, if you use --platform, then the build will fail again because the platform specific build script's hooks use the new hook API and cause the CLI to crash. In any case, as long as the min CLI version mechanisms are working, then this error will NEVER be encountered.
  2. Lee Morris 2017-03-20

    Closing ticket as invalid.

JSON Source