react-native
react-native copied to clipboard
Trying to remove a view index above child count
Hello, I am facing the Issue "trying to remove a view index above child count" on version "react-native": "0.62.2"
It only fails in production mode that too only on Android devices. And yes I am not Using onLayoutAnimations anywhere in the application
The Error details can be found here: com.facebook.react.uimanager.IllegalViewOperationException: Trying to remove a view index above child count 3 view tag: 2609 detail: View tag:2609 children(2): [ 2593,2597, ], indicesToRemove(1): [ 3, ], tagsToDelete(1): [ 2607, ]
at com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren(NativeViewHierarchyManager.java:435)
at com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute(UIViewOperationQueue.java:206)
at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:792)
at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:903)
at com.facebook.react.uimanager.UIViewOperationQueue.access$2400(UIViewOperationQueue.java:43)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:963)
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: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)
I am also facing the same issue. It only fails in production mode. "react-native": "0.61.4".
Error:
com.facebook.react.uimanager.IllegalViewOperationException · Trying to remove a view index above child count 0 view tag: 275 detail: View tag:275 children(0): [ ], indicesToRemove(1): [ 0, ], tagsToDelete(1): [ 677, ].
your post are unreadable. Format and add information, I'll read them again.
com.facebook.react.uimanager.IllegalViewOperationException: Trying to remove a view index above child count 3 view tag: 2609
detail: View tag:2609
children(2): [
2593,2597,
],
indicesToRemove(1): [
3,
],
tagsToDelete(1): [
2607,
]
at com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren(NativeViewHierarchyManager.java:435)
at com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute(UIViewOperationQueue.java:206)
at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:792)
at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:903)
at com.facebook.react.uimanager.UIViewOperationQueue.access$2400(UIViewOperationQueue.java:43)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:963)
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: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)
@fabriziobertoglio1987 Please find the below whole error details :
com.facebook.react.uimanager.IllegalViewOperationException · Trying to remove a view index above child count 0 view tag: 3005 detail: View tag:3005 children(0): [ ], indicesToRemove(1): [ 0, ], tagsToDelete(1): [ 3165, ]
NativeViewHierarchyManager.java:434com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren UIViewOperationQueue.java:205com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute UIViewOperationQueue.java:779com.facebook.react.uimanager.UIViewOperationQueue$1.run UIViewOperationQueue.java:888com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches UIViewOperationQueue.java:42com.facebook.react.uimanager.UIViewOperationQueue.access$2200 UIViewOperationQueue.java:948com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded GuardedFrameCallback.java:28com.facebook.react.uimanager.GuardedFrameCallback.doFrame ReactChoreographer.java:174com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame ChoreographerCompat.java:84com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame Choreographer.java:994android.view.Choreographer$CallbackRecord.run Choreographer.java:794android.view.Choreographer.doCallbacks Choreographer.java:725android.view.Choreographer.doFrame Choreographer.java:981android.view.Choreographer$FrameDisplayEventReceiver.run Handler.java:883android.os.Handler.handleCallback Handler.java:100android.os.Handler.dispatchMessage Looper.java:237android.os.Looper.loop ActivityThread.java:7811android.app.ActivityThread.main Method.java:-2java.lang.reflect.Method.invoke RuntimeInit.java:493com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run ZygoteInit.java:1076com.android.internal.os.ZygoteInit.main
I also got this error in version 0.63.1. There is a solution?
@sonam1409 to fix runtime errors in react-native sourcecode we need:
- the developer needs to reproduce his issue in a Minimal Reproducible Example
- We need to debug the sourcecode to find an issue
Thanks Best Regards Fabrizio Bertoglio
:warning: | Missing Required Fields |
---|---|
:information_source: | It looks like your issue may be missing some necessary information. GitHub provides an example template whenever a new issue is created. Could you go back and make sure to fill out the template? You may edit this issue, or close it and open a new one. |
:warning: | Missing Reproducible Example |
---|---|
:information_source: | It looks like your issue is missing a reproducible example. Please provide a Snack or a repository that demonstrates the issue you are reporting in a minimal, complete, and reproducible manner. |
:warning: | Missing Environment Information |
---|---|
:information_source: | Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.
I observe this issue in my project using RN 0.63.2
System:
OS: macOS 11.2.3
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 18.88 GB / 64.00 GB
Shell: 5.0.18 - /usr/local/bin/bash
Binaries:
Node: 12.19.0 - ~/.nvm/versions/node/v12.19.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.5.4 - ~/.nvm/versions/node/v12.19.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.0 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 27, 28, 29
Build Tools: 23.0.1, 23.0.2, 23.0.3, 24.0.0, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 27.0.2, 27.0.3, 28.0.0, 28.0.2, 28.0.3, 29.0.0, 29.0.2, 29.0.3
System Images: android-18 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6308749
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_275 - /usr/bin/javac
Python: 2.7.16 - /usr/local/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Also seeing this on RN 0.64.1, only in the release build. It is not deterministic as far as I can tell. I'm not sure it's possible to make a minimal reproduction of this issue since there doesn't appear to be a clear case in which it arises. It appears random and only in release builds on user's devices which makes it significantly harder to analyze.
Somebody familiar with the native Android code having a look at possible situations where this could arise would likely be the best way to start figuring out a resolution for this.
I am facing the same issue on my react native application, It keeps on showing this error
@fabriziobertoglio1987 @mojodna @augustl @jsierles @sharnik
Hit that issue as well. Any update on that? Or workaround?
I have found a workaround that worked for me
On Fri, 9 Jul 2021, 11:21 pm Sasha Kuchaiev, @.***> wrote:
Hit that issue as well. Any update on that? Or workaround?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/28905#issuecomment-877373035, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASLNXNV3SCCCNEWMK7TDJ7LTW44Z3ANCNFSM4NBVTH6A .
I have found a workaround that worked for me … On Fri, 9 Jul 2021, 11:21 pm Sasha Kuchaiev, @.***> wrote: Hit that issue as well. Any update on that? Or workaround? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#28905 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASLNXNV3SCCCNEWMK7TDJ7LTW44Z3ANCNFSM4NBVTH6A .
How?
So basically in my scenario it was crashing on map and I solved it by giving the Key prop to it
On Sat, 10 Jul 2021, 12:55 am Sasha Kuchaiev, @.***> wrote:
I have found a workaround that worked for me … <#m_878680268158964415_> On Fri, 9 Jul 2021, 11:21 pm Sasha Kuchaiev, @.***> wrote: Hit that issue as well. Any update on that? Or workaround? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#28905 (comment) https://github.com/facebook/react-native/issues/28905#issuecomment-877373035>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASLNXNV3SCCCNEWMK7TDJ7LTW44Z3ANCNFSM4NBVTH6A .
How?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/28905#issuecomment-877422242, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASLNXNTCUF3LCL2EOXPVTXTTW5H2VANCNFSM4NBVTH6A .
giving the Key prop to it
giving key to the flatlist component
Giving key doesn't work too Tried removing this but it's not a perfect solution
if (Platform.OS === 'android') {
if (UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(true)
}
}
If you are using ListFooterComponent or ListHeaderComponent don't render a false value (null, undefined, ...etc) , for that case, returns a Fragment (<></>)
This resolved my problem.
Example
Wrong:
ListFooterComponent={showFooter && <Footer {...footerProps} />}
Correct:
ListFooterComponent={showFooter ? <Footer {...footerProps} /> : <></>}
In my case, adding the style {borderWidth: 1}
to a parent View in a hierarchy of views made the error go away. I don’t know why. I just stumbled on it when trying to find the cause of the error...
This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.
This issue was closed because the author hasn't provided the requested feedback after 7 days.