Skip to content

Android - "cannot remove child at index X" error on new architecture #2339

@cjpete

Description

@cjpete

Description

When navigating back from a stack screen which contains a FlatList, the app throws a soft error:

Cannot remove child at index 9 from parent ViewGroup [106], only 10 children in parent. Warning: childCount may be incorrect!

null
image
IssueWithFlatListFabric.mov

Steps to reproduce

  1. Open the repro app
  2. Navigate to the flatlist screen
  3. Press header back button
  4. Observe error

Snack or a link to a repository

https://github.com/72days/TestNavFlatListIssues

Screens version

3.34.0

React Native version

0.75.2

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

Real device

Device model

Samsung S9 and Pixel 1

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    missing-reproThis issue need minimum repro scenarioplatform:androidIssue related to Android part of the library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions