Updating Expo SDK to v35 - NSString cannot be converted to a UIColor

  1. SDK Version: v35.0.0
  2. Platforms: iOS

After updating to Expo SDK v35.0.0, when I start my app I’m getting this error. I have no clue where this is coming from. Any ideas of how I can find out?

JSON value '#EA1B0A' of type NSString cannot be converted to a UIColor. Did you forget to call processColor() on the JS side?

+[ABI35_0_0RCTConvert UIColor:]
-[ABI35_0_0RNSVGSvgViewManager set_color:forView:withDefaultView:]
-[ABI35_0_0RCTComponentData callCustomSetter:onView:withProp:isShadowView:]
__58-[ABI35_0_0RCTComponentData createPropBlock:isShadowView:]_block_invoke_2
__46-[ABI35_0_0RCTComponentData setProps:forView:]_block_invoke
-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]
-[ABI35_0_0RCTComponentData setProps:forView:]
__53-[ABI35_0_0RCTUIManager flushUIBlocksWithCompletion:]_block_invoke
__53-[ABI35_0_0RCTUIManager flushUIBlocksWithCompletion:]_block_invoke.394

PS: On SDK v34.0.0 it’s all right.

It looks like it is related to an SVG. How many places in your app do you use that colour for an SVG? The other place this message could be logged from is the Stripe payment module, but I don’t think that’s relevant to your case.

I use it on many places. But other colours give the same error too. Therefore, it doesn’t look like it is related to this specific colour, but to colours in general.

Any advice about what I can try?

Okay, we finally found a workaround to fix it! But it’s still an issue I guess. See here: https://github.com/react-native-community/react-native-svg/issues/1088#issuecomment-535015770

Credits to @hristoeftimov for finding a solution!

1 Like

Glad you got it fixed :slight_smile:

And I see it was caused by a bug in react-native-svg that is now fixed. (Pasting here for the benefit of people not subscribed to the issue on GitHub):


commented about 8 hours ago

:tada: This issue has been resolved in version 9.9.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.