Repository navigation
[Android][Fabric] "Unable to remove a view from a view that is not a ViewGroup" still crashes with fixDifferentiatorParentTagForUnflattenCase enabled (0.86.2) #57800
Description
Activity
- addedNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.
on Aug 3, 2026 Warning
Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:
- For majority of bugs: send us a Pull Request with the RNTesterPlayground.js edited to reproduce your bug.
- If your bug is UI related: a Snack
- If your bug is build/upgrade related: a project using our Reproducer Template
You can read more about about it on our website: How to report a bug.This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.
- addedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Aug 28, 2026 I have the same bug crashing my app on RN 0.86.3.
It is not deterministic. It happens after a new install and I tap one of my nav buttons.
- removedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Aug 31, 2026 This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.
- addedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Sep 24, 2026 Still relevant, please keep this open. A short update:
- The hard throw itself is gone on
main: Fix IllegalStateException in SurfaceMountingManager.removeViewAt (#57860) #57860 (landed 2026-08-10 as 3f553d7) turnsremoveViewAt's "not a ViewGroup" case into a soft exception and an early return, the same approach as the workaround described above. It is in0.88.0-rc.*, but I can't find it on0.86-stableor0.87-stable, so apps on 0.86.x/0.87.x (like @kosumic on 0.86.3) still crash. Could it be picked into the next 0.86 and 0.87 patch releases? - The differ emitting the wrong parent is still the underlying bug. [Fabric][iOS] Differ creates a mounted view again when a child with negative zIndex moves in a nested flatten/unflatten #58647 / Fix differ creating or deleting a view that a nested (un)flattening moves #58648 look like the same family (nested flatten/unflatten in one commit, the differ creating or deleting a view that only moved), and [Fabric][iOS] Differ creates a mounted view again when a child with negative zIndex moves in a nested flatten/unflatten #58647 has a deterministic reproducer on iOS. The Android symptom here would fit the same mutations landing on a parent that is no longer a container.
About the reproducer: we still can't produce a deterministic one. It only happens under production timing (rotation, then a large conditional re-render). If #58648 lands, we'll ship it and report back whether the Android crash disappears from Crashlytics.
- The hard throw itself is gone on
- addedNeeds: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.and removed
on Sep 24, 2026 - removedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Sep 27, 2026
Description
We are still seeing the fatal Android Fabric crash
in production with
fixDifferentiatorParentTagForUnflattenCaseenabled, on stock React Native 0.86.2 (new architecture, bridgeless, Hermes).After #56542 ("Fix parentTagForUpdate in unflatten-unflatten branch") we backported the fix by force-enabling the flag at startup:
We verified the override is effective (the
dangerouslyForceOverridereturn value confirms the flag had not been read before the override, and the override happens inApplication.onCreatebefore any surface is mounted). The crash volume dropped after enabling the flag, but the crash recurred in a build that provably contains it — so at least one more differ reparenting path can still emit aRemovemutation against a wrong parent tag (a tag whose ViewState holds a null or non-ViewGroupview, i.e. a non-container or a never-materialized/non-layoutable node).Occurrence details from the crash session (Crashlytics):
"Cannot remove child at index X from parent ViewGroup"reported elsewhere (e.g. Cannot remove child at index X from parent ViewGroup X, only X children in parent. Warning: childCount may be incorrect! software-mansion/react-native-screens#2491)Stack (top frames):
We could not reproduce locally (hundreds of scripted navigations/re-renders on the same screens stay clean); the reparenting race appears to need production timing. We're reporting because the flag from #56542 finished rollout and is default-true on main, so this evidences that the unflatten wrong-parent-tag family is not fully closed.
Workaround we ship meanwhile (in case it helps other affected apps): a build-time ASM transform that wraps
SurfaceMountingManager.removeViewAtintry/catch (IllegalStateException)→ log non-fatal → skip the remove. This matches the method's existing soft-fail handling of its other inconsistency cases, andaddViewAtalready self-heals a child that is still attached elsewhere. Not proposing that upstream — the differ emitting the wrong parent tag is the actual bug.Happy to provide more Crashlytics context (thread dumps, breadcrumb timeline) on request.
Steps to reproduce
No deterministic repro. Observed pattern: device rotation (two orientation changes) followed by a large conditional re-render that flattens/unflattens nested views; crash fires during a subsequent mount batch.
React Native Version
0.86.2
Affected Platforms
Runtime - Android
Areas
Fabric - The New Renderer
Output of
npx @react-native-community/cli info