Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27408] Titanium CLI is improperly parsing hex color codes for dark mode

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 8.2.0
Fix Version/sn/a
Componentsn/a
Labelscb-tooling, engSchedule
ReporterBrenton House
AssigneeEwan Harris
Created2019-09-17T13:51:39.000+0000
Updated2020-01-31T16:47:37.000+0000

Description

It looks like the hexToRgb code in /iphone/cli/commands/_build.js is incorrectly parsing the alpha value of the hex color and thus breaking the build for iOS apps on 8.2.0 {noformat} (node:25015) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'r' of null at iOSBuilder.generateSemanticColors (/Users/brentonhouse/Library/Application Support/Titanium/mobilesdk/osx/8.2.0.RC/iphone/cli/commands/_build.js:5862:29) {noformat}

Comments

  1. Ewan Harris 2019-09-17

    [~bhouse], to make it easier could you attach the value you're supplying in the file. For now I guess you could workaround this by setting the alpha in the file directly
  2. Rene Pot 2019-09-18

    [~eharris] that would be #55000000 or something similar to that. #argb mode
  3. Chris Barber 2020-01-31

    I believe this issue to be valid. hexToRgb() can return null, but the code doesn't handle the scenario where the value is null. Commit: https://github.com/appcelerator/titanium_mobile/commit/1a8ae85c90c8a3a9be08744bae0b154bc125fd25#diff-f430483233aa01af5b10df8390f9635dR5826 This could be fixed in 3 if statements.

JSON Source