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)
Same here
+1
+1
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)
This has been useful to me:
https://github.com/react-community/react-navigation/issues/438
Had this issue when trying to access to this.props in a constructor (yeah I've been dumb..), if that can help..
I have this issue on IOS too
I've seen this happen when I rename a method in a component but I forget to update this.method = this.method.bind(this) in the constructor and pass this method as a property to a child component.
+1
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.
Problem still persist on 0.47.2.
App sometimes crashes on the line 489:
https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java#L489
Problem still persist on ^0.48.4",
Problem still persist on 0.48.4
The same issue in 0.47.2
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.
@jerolimov Did updating to 0.51 solve your issues?
You should check any type of error, mainly a Type or Reference error. This is a silent error, it does not appear in React Packager, therefore, check any hints in your console. In my experience, when I have this is a consequense of another error, therefore, it is not able to mount the node.
Most helpful comment
We are seeing the same issue in our production RN app. We are on version
0.42.3and, 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.