[Android] Error while updating property 'color' in shadow node of type: AndroidTextInput
See original GitHub issueDescribe the bug
Passing color prop to textInputProps on android crashes the app.
com.facebook.react.bridge.JSApplicationIllegalArgumentException Error while updating property 'color' in shadow node of type: AndroidTextInput
ViewManagersPropertyCache.java:121 com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp
ViewManagerPropertyUpdater.java:156 com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty
ViewManagerPropertyUpdater.java:60 com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps
ReactShadowNodeImpl.java:319 com.facebook.react.uimanager.ReactShadowNodeImpl.updateProperties
UIImplementation.java:265 com.facebook.react.uimanager.UIImplementation.createView
UIManagerModule.java:463 com.facebook.react.uimanager.UIManagerModule.createView
Method.java:-2 java.lang.reflect.Method.invoke
JavaMethodWrapper.java:372 com.facebook.react.bridge.JavaMethodWrapper.invoke
JavaModuleWrapper.java:158 com.facebook.react.bridge.JavaModuleWrapper.invoke
NativeRunnable.java:-2 com.facebook.react.bridge.queue.NativeRunnable.run
Handler.java:873 android.os.Handler.handleCallback
Handler.java:99 android.os.Handler.dispatchMessage
MessageQueueThreadHandler.java:29 com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage
Looper.java:214 android.os.Looper.loop
MessageQueueThreadImpl.java:232 com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run
Thread.java:764 java.lang.Thread.run
Caused by: java.lang.ClassCastException java.lang.String cannot be cast to java.lang.Integer
ViewManagersPropertyCache.java:294 com.facebook.react.uimanager.ViewManagersPropertyCache$BoxedIntPropSetter.getValueOrDefault
ViewManagersPropertyCache.java:106 com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp
ViewManagerPropertyUpdater.java:156 com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty
ViewManagerPropertyUpdater.java:60 com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps
ReactShadowNodeImpl.java:319 com.facebook.react.uimanager.ReactShadowNodeImpl.updateProperties
UIImplementation.java:265 com.facebook.react.uimanager.UIImplementation.createView
UIManagerModule.java:463 com.facebook.react.uimanager.UIManagerModule.createView
Method.java:-2 java.lang.reflect.Method.invoke
JavaMethodWrapper.java:372 com.facebook.react.bridge.JavaMethodWrapper.invoke
JavaModuleWrapper.java:158 com.facebook.react.bridge.JavaModuleWrapper.invoke
NativeRunnable.java:-2 com.facebook.react.bridge.queue.NativeRunnable.run
Handler.java:873 android.os.Handler.handleCallback
Handler.java:99 android.os.Handler.dispatchMessage
MessageQueueThreadHandler.java:29 com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage
Looper.java:214 android.os.Looper.loop
MessageQueueThreadImpl.java:232 com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run
Thread.java:764 java.lang.Thread.run
To Reproduce
Steps to reproduce the behavior:
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
N/A
Additional details
- Device: Google Pixel Simulator; Samsung A6 Device
- OS: Android 9
- react-native-picker-select version: 6.3.3
- react-native version: 16.8.6
- react version: 0.60.6
Reproduction and/or code sample
<RNPickerSelect
style={pickerSelectStyles}
placeholder={{
label: `${placeholderText}`,
value: null
}}
key={items.length}
Icon={() => <PickerIcon color={color} />}
textInputProps={{
fontSize: Fonts.size.medium,
padding: 0,
margin: 0,
fontFamily: 'TTCommons-Regular',
maxFontSizeMultiplier: 1.1,
color: isEmptyOrNil(value) ? '#C7C7CD' : Colors.black // this causes the issue on android
}}
useNativeAndroidPickerStyle={false}
value={value}
onValueChange={onValueChange}
onDonePress={onDonePress}
items={items}
disabled={isDisabled}
/>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Error while updating property 'height' in shadow node of type ...
I am building a simple app and it works fine in the emulator(Genymotioin), but when I run it on real device it shows...
Read more >Error while updating property 'X' in shadow node of type
The error explains that it expects a variable as integer, and not as a string value. Example. <BarItem barInterval={'5'} /> is wrong, but...
Read more >Can you add these blocks in thunkable?
Android will automatically crash because the syntax … ... Critical ERROR while updating property 'fontSize' in shadow node of type:RCTTextat.
Read more >error while updating property 'justifycontent' in shadow node of ...
error while updating property 'justifycontent' in shadow node of type rctview. Without a standalone repro or more context on the places in your...
Read more >Error while updating property 'height' in shadow node
Error while updating property 'height' in shadow node of type: RCTView when I test on real device, but nothing wrong on emulator ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lfkwtz as you suggested, setting the color prop through style on android fixes the issue. thanks!
cool, thanks!