[TIMOB-27408] Titanium CLI is improperly parsing hex color codes for dark mode
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 8.2.0 |
Fix Version/s | n/a |
Components | n/a |
Labels | cb-tooling, engSchedule |
Reporter | Brenton House |
Assignee | Ewan Harris |
Created | 2019-09-17T13:51:39.000+0000 |
Updated | 2020-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}
[~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
[~eharris] that would be
#55000000
or something similar to that.#argb
modeI believe this issue to be valid.
hexToRgb()
can returnnull
, 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.