Skip to content

error running app with flatuiimplementation #12770

Closed
@jcharbo

Description

@jcharbo

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

Activity

ericvicenti

ericvicenti commented on Mar 8, 2017

@ericvicenti
Contributor

I don't think you've provided enough details for core developers to reproduce and debug this issue. Can you please re-open this issue when you've identified exactly what your app is doing to cause this error, and provide the sample code that can cause it to happen?

nihgwu

nihgwu commented on Mar 8, 2017

@nihgwu
Contributor

@ericvicenti plz reopen this issue, Nodes works really well on RN below 0.42, it solves a lot of layout issues in may app, but I got this error since I upgrade RN to 0.42, and I have no idea what happened and how to resolve it, as it throws the error and stop the initialization of the app. So I've stopped upgrade the android version of my app. I thought it's still in experimental and will be resolved, but it's still there on RN0.43

ericvicenti

ericvicenti commented on Mar 8, 2017

@ericvicenti
Contributor

cc @ahmedre

Can you provide any more details about how to get this error?

gerbenis

gerbenis commented on Mar 8, 2017

@gerbenis

@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.

jcharbo

jcharbo commented on Mar 8, 2017

@jcharbo
Author

@ericvicenti I'd like to provide you more info but I have thousands of lines of code and this error does not give me enough info to find the underlying code issue. Hopefully the info from everyone above will be enough.

ahmedre

ahmedre commented on Mar 8, 2017

@ahmedre

cc @AaaChiuuu since i am traveling at the moment

gerbenis

gerbenis commented on Mar 16, 2017

@gerbenis

@ericvicenti, @AaaChiuuu, any news on the issue? Moreover, I suggest to reopen it as there is a very clear way to reproduce it.

ayc1

ayc1 commented on Mar 17, 2017

@ayc1
Contributor

I wasn't able to reproduce this issue on multiple applications after enabling nodes.

@gerbenis @jcharbo can you provide a clear minimum repro that includes js code?

Ashoat

Ashoat commented on Mar 20, 2017

@Ashoat
Contributor

I'm seeing the same exact issue using React-Native 42.3

gavinyeah

gavinyeah commented on Mar 20, 2017

@gavinyeah

I'm also seeing this issue after upgrading to RN42.0

gerbenis

gerbenis commented on Mar 20, 2017

@gerbenis

@ayc1, as I already mentioned, creating initial RN 42.0 project via CLI with nodes enabled in MainApplication.java was enough to reproduce the error. If it'll be of any help, I can create a repo and share it here.

christianbach

christianbach commented on Mar 20, 2017

@christianbach

We to are seeing the same issue in our app. Worked prior to 0.42.0 and now we have the same yoga error. For us the error is related to the Text component.

adogor

adogor commented on Mar 24, 2017

@adogor

Hi @ericvicenti , could we reopen this issue ? Or do we have to create another one ?

Like @gerbenis with all versions after 0.42.0 even the react-native init doesn't work. So we have to stay at 0.41.x .

Thanks !

dbof10

dbof10 commented on Mar 25, 2017

@dbof10
<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

37 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @raffij@ahmedre@gavinyeah@chunghe@hramos

        Issue actions

          error running app with flatuiimplementation · Issue #12770 · facebook/react-native