question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Node has not been attached to a view in `PropsAnimatedNode.updateView`

See original GitHub issue

Description

Seems like there are some rare cases will cause the following error:

Fatal Exception: java.lang.IllegalStateException: Node has not been attached to a view
       at com.facebook.react.animated.PropsAnimatedNode.updateView(PropsAnimatedNode.java:49)
       at com.facebook.react.animated.NativeAnimatedNodesManager.runUpdates(NativeAnimatedNodesManager.java:453)
       at com.facebook.react.animated.NativeAnimatedModule$1.doFrameGuarded(NativeAnimatedModule.java:117)
       at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
       at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:131)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:824)
       at android.view.Choreographer.doCallbacks(Choreographer.java:605)
       at android.view.Choreographer.doFrame(Choreographer.java:574)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:812)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:145)
       at android.app.ActivityThread.main(ActivityThread.java:6918)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

Additional Information

  • React Native version: 0.42
  • Platform: Android
  • Operating System: MacOS
  • Dev tools: Android Studio 2.3

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:19
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
jhildencommented, May 15, 2017

We are seeing the same issue in our production RN app. We are on version 0.42.3 and, as already stated, it only happens on Android.

Any pointers in which direction to look, would be extremely appreciated.

Here is our stacktrace, but it is pretty much identical to the one @rayshih posted.

java.lang.IllegalStateException: Node has not been attached to a view
    at com.facebook.react.animated.PropsAnimatedNode.updateView(PropsAnimatedNode.java:49)
    at com.facebook.react.animated.NativeAnimatedNodesManager.runUpdates(NativeAnimatedNodesManager.java:453)
    at com.facebook.react.animated.NativeAnimatedModule$1.doFrameGuarded(NativeAnimatedModule.java:117)
    at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
    at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:131)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:869)
    at android.view.Choreographer.doCallbacks(Choreographer.java:683)
    at android.view.Choreographer.doFrame(Choreographer.java:616)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6154)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
3reactions
jerolimovcommented, Jan 2, 2018

FYI: This commit https://github.com/facebook/react-native/commit/2b4ff6ea19dc674cf035ee419daa132cde8d1f5e#diff-ed80d5990dea7c0f1947e73bb23569ddL49 is part of the react-native release 0.51.0 and changed the assertion / exception / behaviour.

With this version this exception should not happen anymore. I hadn’t time to verify this with our app, which has many of these crashes, too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - Node has not been attached to a view in ...
I'm using redux, React version: 0.39 , ...... this.props.user.errorMessage is a simple state inside user Store, changed using a redux action ...
Read more >
NativeViewHierarchyOptimizer.java example - Javatips.net
If the * view is layout only, no updateView call will be dispatched to the native hierarchy. */ public void handleUpdateView( ReactShadowNode node, ......
Read more >
Java类com.facebook.react.uimanager.UIImplementation的实例源码 ...
public final void updateView(UIImplementation uiImplementation) { if (mConnectedViewTag == -1) { throw new IllegalStateException("Node has not been attached ...
Read more >
react-native/ReactAndroid/src/main/java/com/facebook/react ...
we expect to reach a special type of the node: PropsAnimatedNode that is then responsible for ... "not been connected with the given...
Read more >
Free Automated Malware Analysis Service - powered by Falcon ...
Remote Access: Contains a remote desktop related string; Fingerprint: Has the ability to ... Not all malicious and suspicious indicators are displayed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found