Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19643] CLI: Runtime error when no DefaultIcon.png exists

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-09-30T19:04:24.000+0000
Affected Version/sRelease 5.0.0
Fix Version/sRelease 5.0.2
ComponentsTooling
Labelsn/a
ReporterKota Iguchi
AssigneeChris Barber
Created2015-09-30T09:23:26.000+0000
Updated2015-09-30T21:10:27.000+0000

Description

There's a typo at builder.generateAppIcons, which causes runtime error when there's no DefaultIcon.png. PR: https://github.com/appcelerator/titanium_mobile/pull/7249
  if (!fs.existsSync(defaultIcon)) {
    if (requiredMissing === 0) {
-      this.logger.warn(__n('There is a missing app icon', 'There are missing app icons', icons.length));
+     this.logger.warn(__('There is a missing app icon', 'There are missing app icons', icons.length));
       this.logger.warn(__('You can either create the missing icons below or create an image named "DefaultIcon.png" in the root of your project'));
...

Comments

  1. Chee Kiat Ng 2015-09-30

    [~cbarber] this looks like a typo for titanium cli no?
  2. Kota Iguchi 2015-09-30

    Yes it's a very trivial one. I have pushed a fix for that: https://github.com/appcelerator/titanium_mobile/pull/7249
  3. Chris Barber 2015-09-30

    This is NOT a typo. __n() is a valid function that handle pluralization. Did you not see there are 3 arguments? Singular string, plural string, and a number to indicate if it should be plural or not. -Either [~kota], [~gmathews], or [~cng] will need to revert the commit ASAP.- I'll do it.
  4. Chris Barber 2015-09-30

    Here's the revert: https://github.com/appcelerator/titanium_mobile/pull/7251
  5. Chris Barber 2015-09-30

    Master PR: https://github.com/appcelerator/titanium_mobile/pull/7252 5_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/7253
  6. Praveen Innamuri 2015-09-30

    PRs merged.
  7. Harry Bryant 2015-09-30

    Verified fixed. checked builder.js file for the fix to __n( ) not being defined before using. Receive appropriate error when DefaultIcon.png does not exist: There are missing app icons [ERROR] : You must either create the missing icons below or create an image named "DefaultIcon.png" in the root of your project [ERROR] : If the DefaultIcon.png image is present, the build will use it to generate all missing icons [ERROR] : It is highly recommended that the DefaultIcon.png be 1024x1024 [ERROR] : Unable to create missing icons: OSX Yosemite: 10.10.5 Studio: 4.3.1.201509301939 Ti SDK: 5.0.2.v20150930120735 Appc CLI: 5.0.3-11
  8. Kota Iguchi 2015-09-30

    ok great, https://github.com/appcelerator/titanium_mobile/pull/7252 worked for me (on Windows) (y)

JSON Source