Skip to content

Android App Crash with Animated node with tag (child) [xxxx] does not exists #37267

Description

@cortinico

I was able to create a reproducible example in a test build where I added 20 swimlanes of which 2 out of 3 randomly animate, the screen is quite heavy but if you navigate a few times the app eventually crashes quite quickly with little effort.

Mostly with this exception:

04-27 13:20:21.717 27102 27102 E AndroidRuntime: FATAL EXCEPTION: main
04-27 13:20:21.717 27102 27102 E AndroidRuntime: Process: io.evix.reactnativetvexample, PID: 27102
04-27 13:20:21.717 27102 27102 E AndroidRuntime: com.facebook.react.bridge.JSApplicationIllegalArgumentException: connectAnimatedNodes: Animated node with tag (child) [5998] does not exist
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.facebook.react.animated.NativeAnimatedNodesManager.connectAnimatedNodes(NativeAnimatedNodesManager.java:346)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.facebook.react.animated.NativeAnimatedModule$16.execute(NativeAnimatedModule.java:751)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.facebook.react.animated.NativeAnimatedModule$ConcurrentOperationQueue.executeBatch(NativeAnimatedModule.java:147)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.facebook.react.animated.NativeAnimatedModule$3.execute(NativeAnimatedModule.java:332)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.facebook.react.uimanager.UIViewOperationQueue$UIBlockOperation.execute(UIViewOperationQueue.java:579)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:915)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:1026)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.facebook.react.uimanager.UIViewOperationQueue.access$2600(UIViewOperationQueue.java:47)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1086)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:175)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:85)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1035)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at android.view.Choreographer.doCallbacks(Choreographer.java:845)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at android.view.Choreographer.doFrame(Choreographer.java:775)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7839)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
04-27 13:20:21.717 27102 27102 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)

But sometimes also with this one:

04-27 13:18:32.957 26938 26938 E AndroidRuntime: FATAL EXCEPTION: main
04-27 13:18:32.957 26938 26938 E AndroidRuntime: Process: io.evix.reactnativetvexample, PID: 26938
04-27 13:18:32.957 26938 26938 E AndroidRuntime: java.lang.RuntimeException: java.lang.IllegalArgumentException: Mapped property node does not exists
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at com.facebook.react.animated.NativeAnimatedModule$1.doFrameGuarded(NativeAnimatedModule.java:230)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:175)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:85)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1035)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at android.view.Choreographer.doCallbacks(Choreographer.java:845)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at android.view.Choreographer.doFrame(Choreographer.java:775)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7839)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: Mapped property node does not exists
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at com.facebook.react.animated.PropsAnimatedNode.updateView(PropsAnimatedNode.java:100)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at com.facebook.react.animated.NativeAnimatedNodesManager.updateNodes(NativeAnimatedNodesManager.java:690)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at com.facebook.react.animated.NativeAnimatedNodesManager.runUpdates(NativeAnimatedNodesManager.java:597)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	at com.facebook.react.animated.NativeAnimatedModule$1.doFrameGuarded(NativeAnimatedModule.java:214)
04-27 13:18:32.957 26938 26938 E AndroidRuntime: 	... 15 more

Both seem to originate from NativeAnimatedNodesManager.java.

demo.mp4

A reproducible example can be found here: https://github.com/wouterds/react-native-tv-example/tree/bug/animation-crash

I can't attach the .apk because it's above the limits of GitHub file upload, but crashlog, video & apk can be found here:
https://drops.evix.io/rn-crash-connectAnimatedNodes/

Originally posted by @wouterds in #33686 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.Resolution: FixedA PR that fixes this issue has been merged.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions