Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to locate view on native tree #19954

Closed
3 tasks done
TylerNRobertson opened this issue Jun 28, 2018 · 4 comments
Closed
3 tasks done

Unable to locate view on native tree #19954

TylerNRobertson opened this issue Jun 28, 2018 · 4 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.

Comments

@TylerNRobertson
Copy link

TylerNRobertson commented Jun 28, 2018

Environment

Environment:
OS: macOS High Sierra 10.13.4
Node: 8.11.3
Yarn: 1.6.0
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.4.1
Android Studio: 3.1

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.4 => 0.55.4

Description

I have no idea what triggers this problem. This only started to happen to me once I put an image inside of a TouchableOpacity. I understand that TouchableOpacity is an Animated.View but this should still not cause this error(or at least I believe it shouldn't).

Reproducible Demo

Cannot provide a code sample or example project at this time. But here is a GIPHY of what happens.
Error Message: Invariant Violation: Invariant Violation: Unable to locate attached view in the native tree
buggiph

@hramos hramos added the Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. label Jun 28, 2018
@react-native-bot
Copy link
Collaborator

Please use Stack Overflow for this type of question.

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Jun 29, 2018
@dihan
Copy link

dihan commented Aug 9, 2018

@TylerNRobertson Do you have a link to the Stack Overflow page or find a solution?

@raphaelrk
Copy link

raphaelrk commented Aug 10, 2018

I've been running into this for the past few days. Users will open our app and it will crash almost immediately, I think upon loading an Animated.Image, but I can't reliably reproduce it. Can't find anything anywhere on this issue or how to fix this.

The line of code it breaks on:

    // source is a local file uri
    // sourceOpacity is an Animated.Value
    {source &&
      <Animated.Image
        source={source}
        style={{ width: '100%', height: '100%', opacity: sourceOpacity }}
        {...otherProps}
      />}

The error message:
simulator screen shot - iphone se - 2018-08-09 at 18 42 34

I also have sentry logs of the issue that I can share with anyone trying to fix it.

@raphaelrk
Copy link

raphaelrk commented Aug 13, 2018

@hramos would it be possible to post a self-answered StackOverflow question if you know what the solution to this issue is, or comment with some more information on what causes the above error message? There's also a stackoverflow post at here but without a good answer.

Edit: looking at the react native source, seems this is raised here. Perhaps my source && mounting/dismounting is causing an issue?

@facebook facebook locked as resolved and limited conversation to collaborators Jun 29, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jun 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants