React-native-paper: NativeViewHierarchyManager: Unable to update properties for view tag error thrown in logcat android when using ActivityIndicator component from RNPaper

Created on 6 Mar 2019  路  12Comments  路  Source: callstack/react-native-paper

Current behaviour

When using Activity Indicator component from React native paper, the below error is continuously occurring in Logcat when run on an Android emulator.

:NativeViewHierarchyManager: Unable to update properties for view tag 33
com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 33 could not be found
at com.facebook.react.uimanager.NativeViewHierarchyManager.resolveViewManager(NativeViewHierarchyManager.java:107)
at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties(NativeViewHierarchyManager.java:134)
at com.facebook.react.uimanager.UIImplementation.synchronouslyUpdateViewOnUIThread(UIImplementation.java:338)
at com.facebook.react.animated.PropsAnimatedNode.restoreDefaultValues(PropsAnimatedNode.java:76)
at com.facebook.react.animated.NativeAnimatedNodesManager.restoreDefaultValues(NativeAnimatedNodesManager.java:337)
at com.facebook.react.animated.NativeAnimatedModule$18.execute(NativeAnimatedModule.java:350)
at com.facebook.react.animated.NativeAnimatedModule$2.execute(NativeAnimatedModule.java:141)
at com.facebook.react.uimanager.UIViewOperationQueue$UIBlockOperation.execute(UIViewOperationQueue.java:583)
at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:917)
at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:1025)
at com.facebook.react.uimanager.UIViewOperationQueue.access$2600(UIViewOperationQueue.java:46)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1085)
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:166)
at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:110)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer.doFrame(Choreographer.java:693)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Expected behaviour

No error like this is likely to be expected when using any of the react-native-paper components

Code sample

Cloning the project from my git repo and just run it on an android emulator (Pixel 2 or above)
https://github.com/hvardhan617/RNARCoreSceneform.git

Screenshots (if applicable)

logcaterror

What have you tried

Uncommenting the activityIndicator used in the AssetsScreen.js isnt throwing any such error in the logcat.

My Environment

| software | version
| --------------------- | -------
| ios or android | Pixel XL API 28 Android
| react-native | 0.58.6
| react-native-paper | ^2.12.0
| node | 8.11.3
| npm or yarn | yarn 1.12.3
| expo sdk | not using expo

Most helpful comment

My error was not related to this package. Sorry about the confusion. Resolved!

All 12 comments

Maybe on Android some views are collapsed and we need to add collapsable prop to more views within ActivityIndicator? Unfortunately, I cannot reproduce it right now.

@hvardhan617 can you try to add collapsable={false} to all of the Animated.Views in ActivityIndicator.js and see if that helps?

@jaulz Am sorry ..but am unable to understand..can u plz explain?
You can just try using ActivityIndicator component of RNPaper in a sample view in RN,and check the logcat error log.You will be able to reproduce this.

@hvardhan617 just find the react-native-paper folder in node_modules and change the code of the src/components/ActivityIndicator.js by adding collapsable={false} to all Animated.Viewss

@hvardhan617 Thanks for creating issue! Could you follow what @jaulz is suggesting and try once again? If it works with that changes, we will be able to create a quick fix :)

Hi @jaulz and @Trancever I had tried the approach suggested by jaulz..but still the issue persists.

@hvardhan617 can you also try it again after you cleared the cache and then implemented the changes? You can clear the cache via:
watchman watch-del-all && rm yarn.lock && rm -rf node_modules && rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-map-* && yarn

Any additional info on how to solve this, if it was solved ?

@rdewolff Can you create a reproducible repository? It's hard for us to fix the issue if we can't reproduce it

My error was not related to this package. Sorry about the confusion. Resolved!

@rdewolff please can you explain what caused the error ? am having the same issue

@rdewolff please can you explain what caused the error ? am having the same issue

@hvardhan617 can you also try it again after you cleared the cache and then implemented the changes? You can clear the cache via:
watchman watch-del-all && rm yarn.lock && rm -rf node_modules && rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-map-* && yarn

It worked for me, thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sm2017 picture sm2017  路  4Comments

scottybo picture scottybo  路  3Comments

timothystewart6 picture timothystewart6  路  4Comments

ButuzGOL picture ButuzGOL  路  4Comments

talaikis picture talaikis  路  3Comments