react-native-reanimated: RELEASE ONLY: E/unknown:NativeViewHierarchyManager: Unable to update properties for view tag xxxx
Description
On the Release build this error is happening a lot. The modals on my app are not opening a lot of times. The error can be seen in the logcat:
E/unknown:NativeViewHierarchyManager: Unable to update properties for view tag 3395 com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 3395 could not be found. at com.facebook.react.uimanager.NativeViewHierarchyManager.resolveViewManager(NativeViewHierarchyManager.java:111) at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties(NativeViewHierarchyManager.java:138) at com.facebook.react.uimanager.UIImplementation.synchronouslyUpdateViewOnUIThread(UIImplementation.java:281) at com.swmansion.reanimated.NodesManager.updateProps(NodesManager.java:354) at com.swmansion.reanimated.nativeProxy.NativeProxyCommon.updateProps(NativeProxyCommon.java:97) at com.swmansion.reanimated.nativeProxy.AnimationFrameCallback.onAnimationFrame(Native Method) at com.swmansion.reanimated.NodesManager.onAnimationFrame(NodesManager.java:245) at com.swmansion.reanimated.NodesManager.access$000(NodesManager.java:42) at com.swmansion.reanimated.NodesManager$1.doFrameGuarded(NodesManager.java:142) at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29) at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:175) at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:85) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:970) at android.view.Choreographer.doCallbacks(Choreographer.java:796) at android.view.Choreographer.doFrame(Choreographer.java:727) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
I was able to reproduce this on the Example app from this package and after playing around playing the animations i started seeing this error appear on the logs and the app was crashing, animations stuck etc. NOTE: THIS IS ONLY HAPPENING IN RELEASE BUILD NOT DEV
Steps to reproduce
- Clone react-native-reanimated
- cd react-native-reanimated -> yarn to install modules
- cd Example -> yarn to install modules
- Open the project in Android Studio
- Build a release version and open it in the emulator
- Play around with the animations, faster you play more errors you are going to see
Snack or a link to a repository
https://github.com/frankoprifti/react-native-reanimated-BUG/tree/main/Example
Reanimated version
2.x.x - 3.0.2
React Native version
0.70.5
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
None
Build type
Release mode
Device
Android emulator
Device model
Android Emulator and Any android Real Device. Tested on Pixel6a and Pixel 4a and Samsung s20
Acknowledgements
Yes
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 15 (6 by maintainers)
@piaskowyk since upgrading to v3 we are seeing a lot of stuck animations in our app as well in production on Android devices. In particular we are seeing many reports from Samsung devices, especially those running One UI 5.1, though we do not believe the issue is isolated to those devices or that OS. The animations are simple cases where we have a shared value (using
useSharedValue) which is used along withwithTiminganduseAnimatedStyleto adjust a width or height property of a view.@piaskowyk it happens for other types of animations too.