You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On iOS 26.5 (and likely iOS 18.x) with the New Architecture (Fabric), the app crashes with EXC_CRASH (SIGABRT) / std::terminate() when the user focuses an email or password field
that triggers the iOS Password AutoFill suggestion bar (the QuickType bar with credentials
from the iOS "Passwords" app appearing above the keyboard).
The crash is fatal, happens on Thread 0 (main thread), and is not catchable by JS-level error
boundaries. It is reproducible consistently when using the native iOS AutoFill flow on a login
screen that contains a SafeAreaView from react-native-screens.
Root cause analysis
When the iOS Password AutoFill bar appears above the keyboard, the OS changes windowInsets,
which triggers UIView's safeAreaInsetsDidChange. RNSScreenView intercepts this via
`-[RNSScreenView safeAreaInsetsDidChange]` (RNSScreen.mm:1172) and posts an RNSSafeAreaDidChange NSNotification. RNSSafeAreaViewComponentView receives this notification
and calls updateState, which uses EventQueue::UpdateMode::unstable_Immediate.
unstable_Immediate causes the state update — and consequently ShadowTree::commit — to run synchronously on the main thread. If a Fabric layout pass or mounting transaction is already
in progress at that instant (which is the case during the AutoFill bar appearance, as the keyboard
layout change drives simultaneous RCTMountingManager::initiateTransaction), the ShadowNode
being cloned by ConcreteComponentDescriptor::cloneProps is in an intermediate state. This
causes RawPropsParser::preparse (RawPropsParser.cpp:98) to encounter invalid prop types,
throwing a folly::TypeError which propagates as an unhandled C++ exception and terminates the
process via FIRCLSTerminateHandler / _objc_terminate.
The unstable_Immediate flag was introduced for safe area updates as a side effect of PR #3274
(SplitView synchronous updates), and the #if REACT_NATIVE_VERSION_MINOR >= 82 guard was
removed in PR #4062, making it unconditional in main.
Create a login screen with a <SafeAreaView> (from react-native-screens) wrapping the layout.
Add a text input with keyboardType="email-address" and a secureTextEntry input below it.
Run on a real device with iOS 26.5 (also expected on iOS 18.x).
Tap the email field.
When the iOS Password AutoFill bar (credentials suggestion row from the Passwords app) appears above the keyboard → app crashes immediately.
Environment
react-native-screens
4.25.2
react-native
0.83.2
New Architecture
enabled (Fabric)
iOS
26.5 (also expected on 18.x)
Devices confirmed
iPhone 13 (iPhone14,5), iPhone 12 Pro, iPhone 15
Distribution
TestFlight + production App Store
Workaround
Removing UpdateMode::unstable_Immediate from RNSSafeAreaViewComponentView::updateState
makes the state update async again and eliminates the race condition:
Applied locally via patch-package. The tradeoff is one extra async frame before safe area insets
are applied — visually imperceptible in practice.
Notes
The crash is not related to react-native-safe-area-context — the failing class is RNSSafeAreaViewComponentView from react-native-screens (prefix RNS, not RNC).
The unstable_Immediate mode is intentional for SplitView (PR feat(iOS, SplitView): SplitView synchronous updates #3274), but applying it to all safe area view updates introduces this reentrancy hazard on the main thread during
keyboard/inset transitions.
A scoped fix could be to guard the unstable_Immediate mode exclusively for RNSSplitScreenComponentView, reverting RNSSafeAreaViewComponentView back to async updates.
Description
On iOS 26.5 (and likely iOS 18.x) with the New Architecture (Fabric), the app crashes with
EXC_CRASH (SIGABRT)/std::terminate()when the user focuses an email or password fieldthat triggers the iOS Password AutoFill suggestion bar (the QuickType bar with credentials
from the iOS "Passwords" app appearing above the keyboard).
The crash is fatal, happens on Thread 0 (main thread), and is not catchable by JS-level error
boundaries. It is reproducible consistently when using the native iOS AutoFill flow on a login
screen that contains a
SafeAreaViewfromreact-native-screens.Root cause analysis
When the iOS Password AutoFill bar appears above the keyboard, the OS changes
windowInsets,which triggers
UIView'ssafeAreaInsetsDidChange.RNSScreenViewintercepts this via`-[RNSScreenView safeAreaInsetsDidChange]` (RNSScreen.mm:1172) and posts an
RNSSafeAreaDidChangeNSNotification.RNSSafeAreaViewComponentViewreceives this notificationand calls
updateState, which usesEventQueue::UpdateMode::unstable_Immediate.unstable_Immediatecauses the state update — and consequentlyShadowTree::commit— to runsynchronously on the main thread. If a Fabric layout pass or mounting transaction is already
in progress at that instant (which is the case during the AutoFill bar appearance, as the keyboard
layout change drives simultaneous
RCTMountingManager::initiateTransaction), theShadowNodebeing cloned by
ConcreteComponentDescriptor::clonePropsis in an intermediate state. Thiscauses
RawPropsParser::preparse(RawPropsParser.cpp:98) to encounter invalid prop types,throwing a
folly::TypeErrorwhich propagates as an unhandled C++ exception and terminates theprocess via
FIRCLSTerminateHandler/_objc_terminate.The
unstable_Immediateflag was introduced for safe area updates as a side effect of PR #3274(SplitView synchronous updates), and the
#if REACT_NATIVE_VERSION_MINOR >= 82guard wasremoved in PR #4062, making it unconditional in
main.Crash stack (Thread 0)
Steps to reproduce
<SafeAreaView>(fromreact-native-screens) wrapping the layout.keyboardType="email-address"and asecureTextEntryinput below it.Environment
react-native-screensreact-nativeWorkaround
Removing
UpdateMode::unstable_ImmediatefromRNSSafeAreaViewComponentView::updateStatemakes the state update async again and eliminates the race condition:
Applied locally via
patch-package. The tradeoff is one extra async frame before safe area insetsare applied — visually imperceptible in practice.
Notes
react-native-safe-area-context— the failing class isRNSSafeAreaViewComponentViewfromreact-native-screens(prefixRNS, notRNC).unstable_Immediatemode is intentional for SplitView (PR feat(iOS, SplitView): SplitView synchronous updates #3274), but applying it toall safe area view updates introduces this reentrancy hazard on the main thread during
keyboard/inset transitions.
unstable_Immediatemode exclusively forRNSSplitScreenComponentView, revertingRNSSafeAreaViewComponentViewback to async updates.