Repository navigation
android crash #13984
Copy link
Copy link
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
RN .44, Android is crashing a lot. iOS is fine.
This is the crash report from BugSnag. I have no idea what is happening, or (more importantly) how I can stop these crashes.
Any feedback would be greatly appreciated.
com.facebook.react.uimanager.IllegalViewOperationException Trying to remove a view index above child count 38 view tag: 776
detail: View tag:776
children(38): [
15984,777,792,820,834,876,890,905,919,934,948,963,977,1658,1673,1687,
1818,1833,1847,1868,1883,1897,1918,1933,1947,1969,1984,1998,2019,2034,2048,2069,
2084,2098,2119,2134,15998,2148,
],
indicesToRemove(1): [
38,
],
tagsToDelete(1): [
15998,
]
NativeViewHierarchyManager.java:345 com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren
UIViewOperationQueue.java:179 com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute
UIViewOperationQueue.java:787 com.facebook.react.uimanager.UIViewOperationQueue$2.run
UIViewOperationQueue.java:843 com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches
UIViewOperationQueue.java:48 com.facebook.react.uimanager.UIViewOperationQueue.access$1600
UIViewOperationQueue.java:889 com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded
GuardedFrameCallback.java:31 com.facebook.react.uimanager.GuardedFrameCallback.doFrame
ReactChoreographer.java:129 com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame
ChoreographerCompat.java:107 com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame
Choreographer.java:872 android.view.Choreographer$CallbackRecord.run
Choreographer.java:686 android.view.Choreographer.doCallbacks
Choreographer.java:618 android.view.Choreographer.doFrame
Choreographer.java:860 android.view.Choreographer$FrameDisplayEventReceiver.run
Handler.java:751 android.os.Handler.handleCallback
Handler.java:95 android.os.Handler.dispatchMessage
Looper.java:154 android.os.Looper.loop
ActivityThread.java:6290 android.app.ActivityThread.main
Method.java:-2 java.lang.reflect.Method.invoke
ZygoteInit.java:886 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
ZygoteInit.java:776 com.android.internal.os.ZygoteInit.main
Reacted by along, hyochan, Mitch Crowe, aleksei-klyshnikov, Cole Bradley and dblachut-adb
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Activity
rzsombor commentedon May 16, 2017
Could you also post sample code that reproduces this issue?
parkerdan commentedon May 16, 2017
No... I can not provide code that reproduces this issue. If I could, I would not have the issue.
This is a random crash, that just happens when using the app. There is not particular screen where this happens, no combination of button presses that causes this. It just happens...
This is why I am throwing up a desperation issues in hopes someone knows what this crash report is saying/doing.
This crash has happened over 200 times on android devices, with only 40 testers.
The iOS app has over 2000 users and no crash reports, which leads me to believe this is an issue with the react-native framework...
dobrienlzd commentedon May 16, 2017
It's likely in recycler view: see #9549
I would try to make certain that you really are deploying with React Native 0.44.0. Please show us the package.json Also check you development directory where package.json is located:
npm list | grep 'react-native@'
npm list | grep 'react@'
if you are not on unix try then:
npm -g ls --depth=0
or
npm -g ls --depth=1 // increase depth slowly until you see the actual packages installed start at 0.
make sure these really match what you have in package.json. It's possible you have older version of react or react-native and did not realize it. Sometimes npm does not really install the correct version even though it is in package.json
dobrienlzd commentedon May 16, 2017
Also check your animation code and if any layouts have: shouldAnimateLayoutChildrenInView
which you can try removing and see if app still runs ok. I think it's either recycler view or unnecessary animation. Tell us exactly what kind of animations you are doing and if 'shouldAnimateLayoutChildrenInView' appears anywhere in your code or layouts? Do a search! thanks!
dobrienlzd commentedon May 16, 2017
#9549 also suggest you might be trying to do something with recycler views and RN.
So we have three possibilities:
Let us know what seems to be the case with your code! Thanks!
parkerdan commentedon May 16, 2017
@dobrienlzd, thanks for the suggestions...I will remove all reference to the Animated library and test.
I can tell you this
1: Recycler Views do not exist in my project
2:
shouldAnimateLayoutChildrenInViewdoes not exist in my project.3: I am using the Animated library for some very basic animations (I used this on many other production apps with no problems), but I'll try a test without this library.
4: I am running react-native: 0.44.0, and react: 16.0.0-alpha.6,
st0ffern commentedon May 17, 2017
I guess you are using LayoutAnimation
This issue will be fixed in this PR #11962
henrikra commentedon May 29, 2017
I guess our crash is related also? Do we know cause of this?
st0ffern commentedon May 29, 2017
@henrikra https://github.com/facebook/react-native/pull/11962/files
henrikra commentedon May 29, 2017
We are not using
LayoutAnimationanywhere is our codebase 🤔st0ffern commentedon May 29, 2017
Any dependencies that use it?
henrikra commentedon May 29, 2017
Maybe. Well maybe we just update to RN 0.45 when it is available and see if we get this crash anymore :) 14 crashes in total
solartcc commentedon Jun 1, 2017
[Android, RN 0.41.0] The same problem I have encountered. Here are some recent crash reports.
parkerdan commentedon Jun 1, 2017
I removed Layout Animation and this stopped.
I am closing this because I know the culprit.
Thank you @Stoffern
10 remaining items
dluksza commentedon Dec 15, 2017
My workaround is to detect device model (using RN device-info library) and disable layout animations for particular devices.
mcrowe commentedon Dec 16, 2017
This issue is occurring for me on RN 0.46.3. Over 2000 users have seen this crash in my app. This is <1% of total users, but still very significant. It is rare and I haven't been able to recreate it in a controlled environment. I am using LayoutAnimation.
@parkerdan Could you please re-open this issue. It has not been resolved. It is good that you found a work-around by not using LayoutAnimation, but this is still a bug that should be addressed, right?
coderdave commentedon Jan 1, 2018
I am also getting this error on Android in RN 0.51.0. Where do I remove LayoutAnimation from? I'm not using LayoutAnimation in my main codebase, but it's referenced many, many times in node_modules.
oakis commentedon Jan 9, 2018
This needs to be re-opened.
GetSource1234 commentedon Jan 10, 2018
Same issue on RN 50.1, with LayoutAnimation on Android.
Gumija commentedon Feb 6, 2018
I found a workaround for my case. I had lines like these in render:
And for some reason layout animation cannot remove this View so I just place it with and empty View
paruckerr commentedon Feb 6, 2018
Same issue RN 51.0 @Gumija I change all my conditions but not work. Any solution?
dluksza commentedon Feb 7, 2018
For me it seams that bumping
compileSdkVersionandtargetSdkVersionto 26 seams to fix this issue. Unfortunately I needed to revert back to 25 because other issues.Gumija commentedon Feb 7, 2018
@paruckerr you can try removing tags from your code to see which one causes the issue and figure out a solution from there
GianniGM commentedon Feb 14, 2018
@Gumija Works for me!! Thank you 💃
shrolr commentedon Apr 23, 2018
Can anyone manage to fix this problem?
paruckerr commentedon Apr 24, 2018
@Gumija I just remove all items in .babelrc file and fixed the problem, thanks for response.
{
"presets": ["react-native"]
}
androidsihai1 commentedon May 9, 2018
com.facebook.react.uimanager.IllegalViewOperationException: Trying to add unknown view tag: 236
at com.facebook.react.uimanager.f._61_a(UIImplementation.java:480)
at com.facebook.react.uimanager.UIManagerModule.setChildren(UIManagerModule.java:439)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge._61_q._61_a(JavaMethodWrapper.java:374)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at com.facebook.react.bridge.queue._61_a.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:166)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194)
at java.lang.Thread.run(Thread.java:784)