Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NativeViewHierarchyManager: Unable to update properties for view tag 12187 #3860

Closed
OrenMe opened this issue Dec 13, 2022 · 6 comments
Closed
Labels
Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer

Comments

@OrenMe
Copy link

OrenMe commented Dec 13, 2022

Description

App crashes and I see this appearing in our Sentry hitting many end users.

E/unknown:NativeViewHierarchyManager: Unable to update properties for view tag 12187
    com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 12187 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:305)
        at com.swmansion.reanimated.NodesManager.updateProps(NodesManager.java:588)
        at com.swmansion.reanimated.NativeProxy.updateProps(NativeProxy.java:167)
        at com.swmansion.reanimated.NativeProxy$AnimationFrameCallback.onAnimationFrame(Native Method)
        at com.swmansion.reanimated.NodesManager.onAnimationFrame(NodesManager.java:273)
        at com.swmansion.reanimated.NodesManager.access$000(NodesManager.java:65)
        at com.swmansion.reanimated.NodesManager$1.doFrameGuarded(NodesManager.java:170)
        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:964)
        at android.view.Choreographer.doCallbacks(Choreographer.java:790)
        at android.view.Choreographer.doFrame(Choreographer.java:721)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:951)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Steps to reproduce

Issue is happening mainly on luncher apps when clicking on MENU button, hard to give proper steps to reproduce as this is mainly coming from Sentry alerts
This could be related to fact that app goes to background when this happens

Snack or a link to a repository

Private repo

Reanimated version

2.6.0

React Native version

react-native-tvos@0.66.3-1

Platforms

Android

JavaScript runtime

None

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Release mode

Device

Real device

Device model

No response

Acknowledgements

Yes

@OrenMe OrenMe added the Needs review Issue is ready to be reviewed by a maintainer label Dec 13, 2022
@tristanheilman
Copy link

I'm also seeing this issue running

Reanimated Version

2.13.0

React Native Version

0.70.5

Platforms

Android (version 12)

Device

Samsung Galaxy S20

I was trying to debug another issue that was causing app ANR's on my android release build and ran into this one. I turned Strict Mode on and ran logcat. Was seeing the same error over and over again when transitioning to a new screen using react-navigation .replace() method.

01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: Unable to update properties for view tag 4903
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 4903 could not be found.
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.facebook.react.uimanager.NativeViewHierarchyManager.resolveViewManager(NativeViewHierarchyManager.java:111)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties(NativeViewHierarchyManager.java:138)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.facebook.react.uimanager.UIImplementation.synchronouslyUpdateViewOnUIThread(UIImplementation.java:306)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.swmansion.reanimated.NodesManager.updateProps(NodesManager.java:590)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.swmansion.reanimated.NativeProxy.updateProps(NativeProxy.java:185)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.swmansion.reanimated.NativeProxy$AnimationFrameCallback.onAnimationFrame(Native Method)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.swmansion.reanimated.NodesManager.onAnimationFrame(NodesManager.java:275)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.swmansion.reanimated.NodesManager.access$000(NodesManager.java:67)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.swmansion.reanimated.NodesManager$1.doFrameGuarded(NodesManager.java:172)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:175)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:85)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1106)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at android.view.Choreographer.doCallbacks(Choreographer.java:866)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at android.view.Choreographer.doFrame(Choreographer.java:792)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1092)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at android.os.Handler.handleCallback(Handler.java:938)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at android.os.Handler.dispatchMessage(Handler.java:99)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at android.os.Looper.loopOnce(Looper.java:226)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at android.os.Looper.loop(Looper.java:313)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at android.app.ActivityThread.main(ActivityThread.java:8751)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at java.lang.reflect.Method.invoke(Native Method)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
01-18 15:52:27.878 22227 22227 E unknown:NativeViewHierarchyManager: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Not positive if my ANR's are related but when the navigation took place I could visibly see the screen hang and not animate as expected. Also noting that my app is utilizing react-native-shared-element as well. I need to double check and mess around with this to see if it could have some impact in the navigation transitions.

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Jan 18, 2023
@github-actions
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@sweatherall
Copy link

Also getting this issue on Android after upgrading dependencies:
react native: 0.71.3
react-native-reanimated: 2.14.4
Causing the app to crash.
Full error log from android studio:

Unable to update properties for view tag 7679
com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 7679 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:590)
at com.swmansion.reanimated.NativeProxy.updateProps(NativeProxy.java:185)
at com.swmansion.reanimated.NativeProxy$AnimationFrameCallback.onAnimationFrame(Native Method)
at com.swmansion.reanimated.NodesManager.onAnimationFrame(NodesManager.java:275)
at com.swmansion.reanimated.NodesManager.access$000(NodesManager.java:67)
at com.swmansion.reanimated.NodesManager$1.doFrameGuarded(NodesManager.java:172)
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:1035)
at android.view.Choreographer.doCallbacks(Choreographer.java:845)
at android.view.Choreographer.doFrame(Choreographer.java:775)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7842)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

@Marvedog
Copy link

Hello! I am also experiencing this issue in our app.

  • react-native: 0.68.5
  • react-native-reanimated: 2.9.1

I am able to consistently reproduce it, but it is quite difficult to share the repro here due to the specific scenario it is triggered in. I can share some details, and maybe someone can help me with some ideas to produce a repro I can share here.

We have a health app which continually streams sensor data from external BLE sensors for 10 minutes. After the 10 minutes of streaming we do the following quite intensive operations:

  • We compute some computationally expensive statistics on the JS layer
  • We disconnect the BLE sensors
  • We then trigger an some reanimated animation from the streaming screen to a statistics screen

During the transition from the streaming screen to the statistics screen the exact error reported by @sweatherall occurs. The weird thing is that I am not able to reproduce it without computing the full sequence of steps outlined above. We have implemented the reanimated animations in a separate component library with storybook, but the animation works totally fine here. If anyone has any ideas that would be helpful! I will try to create a repro in our component library and I can possibly provide temporary access to someone from the reanimated team if that is useful :)

@Latropos
Copy link
Contributor

Closing since we are unable to solve this issue due to lack of reproduction. However I believe that the problem described is already fixed (I remember similar bugs with FlatList hat got already resolved)

github-merge-queue bot pushed a commit that referenced this issue May 13, 2024
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

I'm opening this PR to address a critical issue previously tackled by PR
#5216, which has stalled due to the original author's inactivity.

This fix is crucial for resolving significant bugs affecting Android
view property updates (referenced in issues #4505, #4231, #3860) that
impact application stability and performance.

Typical error : 
```unknown:NativeViewHierarchyManager: Unable to update properties for view tag 943
03-07 19:54:33.543 19722 19722 E unknown:NativeViewHierarchyManager: com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 943 could not be found.
```

## Test plan

<!-- Provide a minimal but complete code snippet that can be used to
test out this change along with instructions how to run it and a
description of the expected behavior. -->

### Before patching

https://github.com/software-mansion/react-native-reanimated/assets/40337934/a7cd7f8c-c0a3-4a84-98f7-4853886799f0

### After patching

https://github.com/software-mansion/react-native-reanimated/assets/40337934/c4dfe495-fed9-48cf-a227-e7768cec26cc

---------

Co-authored-by: Krzysztof Piaskowy <krzysztof.piaskowy@swmansion.com>
@piaskowyk
Copy link
Member

Fixed with #5767, changes will be available in the next release - 3.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants