question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crash with error "index=4 count=3" using LayoutAnimation.easeInEaseOut() on Android

See original GitHub issue

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

This bug has been there for several months and is still there with react-native@0.51.0.

Environment: OS: Windows 10 Node: 8.9.1 Yarn: 1.3.2 npm: 5.6.0 Watchman: Not Found Xcode: N/A Android Studio: Version 3.0.0.0 AI-171.4443003

Packages: (wanted => installed) react: ^16.2.0 => 16.2.0 react-native: 0.51.0 => 0.51.0

Steps to Reproduce

On Android, updating a specific (but very simple) component tree after calling LayoutAnimation.easeInEaseOut() leads to an error. Here is a repro : https://snack.expo.io/H1H0AbDZM Just click 2 times on the top text component to see the app crash.

Expected Behavior

No app crash.

Actual Behavior

Component are not correctly rendered after first click (some are missing). App crash after second click.:

index=4 count=3
addInArray
    ViewGroup.java:3971
addViewInner
    ViewGroup.java:3902
addView
    ViewGroup.java:3733
addView
    ViewGroup.java:3678
addView
    ViewGroupManager.java:47
manageChildren
    NativeViewHierarchyManager.java:401
execute
    UIViewOperationQueue.java:180
run
    UIViewOperationQueue.java:819
flushPendingBatches
    UIViewOperationQueue.java:926
access$2100
    UIViewOperationQueue.java:47
doFrameGuarded
    UIViewOperationQueue.java:986
doFrame
    GuardedFrameCallback.java:31
doFrame
    ReactChoreographer.java:136
doFrame
    ChoreographerCompat.java:107
run
    Choreographer.java:765
doCallbacks
    Choreographer.java:580
doFrame
    Choreographer.java:549
run
    Choreographer.java:753
handleCallback
    Handler.java:739
dispatchMessage
    Handler.java:95
loop
    Looper.java:135
main
    ActivityThread.java:5221
invoke
    Method.java
invoke
    Method.java:372
run
    ZygoteInit.java:899
main
    ZygoteInit.java:694

Reproducible Demo

Cf Steps to Reproduce

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11

github_iconTop GitHub Comments

3reactions
Larryseacommented, Feb 24, 2018

@react-native-bot hello I am still face this exception com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 10 could not be found did this also solved in v0.53.0

0reactions
evanjmgcommented, Jul 29, 2018

Android crashes on Flatlist with LayoutAnimation. Please note this in the docs as warning until this index handling is fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trying to remove a view index above child count error
It's happening when you call layout animation when it already in process. iOS will show an warning while Android will explode ...
Read more >
LayoutAnimation - React Native
Automatically animates views to their new positions when the next layout happens.
Read more >
Using reanimated transitions as a LayoutAnimation replacement
Have you ever used LayoutAnimation in your React Native app? It makes animating view transition as simple as calling a single method.
Read more >
React Native LayoutAnimation - Level Up Coding
Before the next app layout––in most cases, before setState({}) is called or a Redux action is ... It also does NOT work on...
Read more >
Animated node with tag ### does not exists - Codesti
App crashes randomly on Android 12 with `JSApplicationIllegalArgumentException: Animated ... I tried replicate the error in Android 9 but no error is threw....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found