Skip to content

[Android] FlatList crashes when a View loses its native view and gets it back #59724

Description

@Nezz

Description

On Android, the app crashes with

IllegalStateException: Check failed.

in ReactViewGroup.isViewClipped after a View inside a FlatList loses its native view and gets it back within the same JS task.

It's likely caused by this optimization:

// FIXME: this optimization is incorrect when multiple transactions are
// merged together

Steps to reproduce

  1. Clone the reproducer and run npm install.
  2. cd android && ./gradlew assembleRelease -PreactNativeArchitectures=arm64-v8a, then
    adb install -r app/build/outputs/apk/release/app-release.apk.
  3. Open the app and tap "one task".

I used an emulator with the Pixel 6 profile and the Android 16 (API 36) Google APIs arm64 image. The original issue was observed primarily with lower-end Android devices.

React Native Version

0.88.1

Affected Platforms

Runtime - Android

Areas

Fabric - The New Renderer

Output of npx @react-native-community/cli info

System:
  OS: macOS 26.7.1
  CPU: (12) arm64 Apple M3 Pro
  Memory: 738.73 MB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 24.22.1
    path: /opt/homebrew/bin/node
  Yarn: Not Found
  npm:
    version: 11.19.1
    path: /opt/homebrew/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.17.0
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 27.0
      - iOS 27.1
      - macOS 27.0
      - tvOS 27.0
      - visionOS 27.0
      - watchOS 27.0
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 27.1/27A9275
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.20.1
    path: /usr/bin/javac
  Ruby:
    version: 4.0.9
    path: /opt/homebrew/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.2.0
    wanted: 20.2.0
  react:
    installed: 19.3.0
    wanted: 19.3.0
  react-native:
    installed: 0.88.1
    wanted: 0.88.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Stacktrace or Logs

10-31 19:05:19.482  4793  4826 I ReactNativeJS: beat=0 current=0
10-31 19:05:21.027  4793  4826 I ReactNativeJS: beat=3 current=1
10-31 19:05:21.039  4793  4793 E unknown:SurfaceMountingManager:MissingViewState: com.facebook.react.bridge.ReactNoCrashSoftException: Unable to find viewState for tag: [124] for removeViewAt
10-31 19:05:21.039  4793  4793 E unknown:SurfaceMountingManager:MissingViewState: com.facebook.react.bridge.ReactNoCrashSoftException: Unable to find viewState for tag: [124] for removeViewAt
10-31 19:05:21.040  4793  4793 E unknown:SurfaceMountingManager: java.lang.IllegalStateException: addViewAt: cannot insert view [120] into parent [154]: View already has a parent: [124] Parent: ReactViewGroup View: ReactTextView
10-31 19:05:21.040  4793  4793 E unknown:SurfaceMountingManager: java.lang.IllegalStateException: addViewAt: cannot insert view [122] into parent [154]: View already has a parent: [124] Parent: ReactViewGroup View: ReactViewGroup
10-31 19:05:21.040  4793  4793 E unknown:SurfaceMountingManager: com.facebook.react.uimanager.IllegalViewOperationException: removeViewAt tried to remove a React View that was actually reused. This indicates a bug in the Differ (specifically instruction ordering). [122]
10-31 19:05:21.040  4793  4793 E unknown:SurfaceMountingManager: com.facebook.react.uimanager.IllegalViewOperationException: removeViewAt tried to remove a React View that was actually reused. This indicates a bug in the Differ (specifically instruction ordering). [120]
10-31 19:05:21.546  4793  4826 I ReactNativeJS: beat=4 current=2
10-31 19:05:21.589  4793  4793 E unknown:ReactViewGroup.isViewClipped: com.facebook.react.bridge.ReactNoCrashSoftException: View missing clipping tag: index=9 parentNull=false parentThis=false transitioning=true
(the same for index 9 and 10 on each frame of the scroll)
10-31 19:05:22.057  4793  4826 I ReactNativeJS: beat=5 current=2
10-31 19:05:22.074  4793  4793 E unknown:SurfaceMountingManager:MissingViewState: com.facebook.react.bridge.ReactNoCrashSoftException: Unable to find viewState for tag: [136] for removeViewAt
10-31 19:05:22.075  4793  4793 E unknown:SurfaceMountingManager:MissingViewState: com.facebook.react.bridge.ReactNoCrashSoftException: Unable to find viewState for tag: [136] for removeViewAt
10-31 19:05:22.075  4793  4793 E unknown:SurfaceMountingManager: java.lang.IllegalStateException: addViewAt: cannot insert view [132] into parent [154]: View already has a parent: [136] Parent: ReactViewGroup View: ReactTextView
10-31 19:05:22.075  4793  4793 E unknown:SurfaceMountingManager: java.lang.IllegalStateException: addViewAt: cannot insert view [134] into parent [154]: View already has a parent: [136] Parent: ReactViewGroup View: ReactViewGroup
10-31 19:05:22.075  4793  4793 E unknown:SurfaceMountingManager: com.facebook.react.uimanager.IllegalViewOperationException: removeViewAt tried to remove a React View that was actually reused. This indicates a bug in the Differ (specifically instruction ordering). [134]
10-31 19:05:22.075  4793  4793 E unknown:SurfaceMountingManager: com.facebook.react.uimanager.IllegalViewOperationException: removeViewAt tried to remove a React View that was actually reused. This indicates a bug in the Differ (specifically instruction ordering). [132]
10-31 19:05:22.076  4793  4793 E AndroidRuntime: FATAL EXCEPTION: main
10-31 19:05:22.076  4793  4793 E AndroidRuntime: Process: com.clippedsubviewsrepro, PID: 4793
10-31 19:05:22.076  4793  4793 E AndroidRuntime: java.lang.IllegalStateException: Check failed.
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.views.view.ReactViewGroup.isViewClipped(ReactViewGroup.kt:767)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.views.view.ReactViewGroup.updateSubviewClipStatus(ReactViewGroup.kt:562)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.views.view.ReactViewGroup.access$updateSubviewClipStatus(ReactViewGroup.kt:79)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.views.view.ReactViewGroup$ChildrenLayoutChangeListener.onLayoutChange(ReactViewGroup.kt:111)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at android.view.View.layout(View.java:25647)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.fabric.mounting.SurfaceMountingManager.updateLayout(SurfaceMountingManager.kt:859)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.fabric.mounting.mountitems.IntBufferBatchMountItem.execute(IntBufferBatchMountItem.kt:139)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue(MountItemDispatcher.kt:379)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems$lambda$7$lambda$6(MountItemDispatcher.kt:269)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.fabric.mounting.MountItemDispatcher$$ExternalSyntheticLambda4.invoke(D8$$SyntheticClass:0)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.internal.tracing.PerformanceTracer.trace(PerformanceTracer.kt:46)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.internal.tracing.PerformanceTracer.trace(PerformanceTracer.kt:35)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems(MountItemDispatcher.kt:250)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems(MountItemDispatcher.kt:94)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.fabric.FabricUIManager$DispatchUIFrameCallback.doFrameGuarded(FabricUIManager.java:1660)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.kt:42)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.modules.core.ReactChoreographer.frameCallback$lambda$1(ReactChoreographer.kt:58)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.facebook.react.modules.core.ReactChoreographer$$ExternalSyntheticLambda0.doFrame(D8$$SyntheticClass:0)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1568)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1579)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at android.view.Choreographer.doCallbacks(Choreographer.java:1179)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at android.view.Choreographer.doFrame(Choreographer.java:1104)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1553)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:995)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:103)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:248)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:338)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:9067)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
10-31 19:05:22.076  4793  4793 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:932)

MANDATORY Reproducer

https://github.com/Nezz/expo-repro/tree/repro/MergedTransactionDeleteOrder

Screenshots and Videos

No screenshots, just a crash

Activity

  1. added a commit that references this issue on Nov 2, 2026
    60ada85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions