Repository: react-native
Issue: Android App Crash with `Animated node with tag (child) [xxxx] does not exists`
Labels: Issue: Author Provided Repro,Needs: Repro,Needs: Attention,Needs: React Native Team Attention

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.

https://user-images.githubusercontent.com/1210628/234848355-ed5b4d7c-8d4d-43fe-bba7-286567cbc70b.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 https://github.com/facebook/react-native/issues/33686#issuecomment-1525541443_