react-native: error running app with flatuiimplementation

I’m using RN 42 in genymotion. It works fine in IOS and android when not using the new experimental android nodes. When I add the code to android to “turn on” the new experimental nodes I get the following error. thanks

Cannot add a child that doesn't have a YogaNode to a parent without a measure function! (Trying to add a 'ReactVirtualTextShadowNode' to a 'NativeViewWrapper')
addChildAt
    ReactShadowNode.java:172
addChildAt
    FlatShadowNode.java:219
addChildAt
    NativeViewWrapper.java:98
addChildAt
    FlatUIImplementation.java:505
setChildren
    FlatUIImplementation.java:185
setChildren
    UIManagerModule.java:312
invoke
    Method.java:-2
invoke
    BaseJavaModule.java:345
invoke
    JavaModuleWrapper.java:136
run
    NativeRunnable.java:-2
handleCallback
    Handler.java:739
dispatchMessage
    Handler.java:95
dispatchMessage
    MessageQueueThreadHandler.java:31
loop
    Looper.java:148
run
    MessageQueueThreadImpl.java:196
run
    Thread.java:818

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 29 (14 by maintainers)

Commits related to this issue

Most upvoted comments

I tracked down the issue and will push a fix later today.

@ericvicenti We’ve encountered the same problem on our project as well. It seems that this is a bug related to RN’s Text component. To verify it we created a new project using react-native init, overriden ReactNativeHost’s getUIImplementationProvider method to return new FlatUIImplementationProvider() in MainApplication.java and lauched the project. The app produced the following error: screenshot 2017-03-08 03-02-56 popiet The app lauches fine with Text components removed.

Fixed in current source.

<View>
       <Image
         style={{height: 30, width: 30}}
         source={{uri : 'ic_home_black_24dp'}}/>
       <Text>Home</Text>
</View>

I did a sample to try FlatUIImplementation but hit the same issue