Skip to content

[iOS] App termination on more than one secureTextEntry, iOS >= 26 #54658

Description

@bdotsamir

Description

Having more than one TextInput rendered at a time with secureTextEntry enabled causes a crash when a non-secureTextEntry field is selected. This bug only occurs on iOS 26 or later, and only on real hardware- not simulators.

Particularly nasty for "register"-type pages where the user is expected to enter an email, password, confirm password. Ask me how I found out...... in production 😳

Code snippet

        <TextInput
          style={styles.hairlineBB}
          placeholder='Non-STE'
        />
        <TextInput
          style={styles.hairlineBB}
          placeholder='STE'
          secureTextEntry
        />
        <TextInput
          style={styles.hairlineBB}
          placeholder='STE'
          secureTextEntry
        />

// ...

// not necessary but still nice to have so you can actually
// *see* the text inputs lol
const styles = StyleSheet.create({
  hairlineBB: {
     borderBottomWidth: 1,
     borderBottomColor: "#000000",
     paddingBottom: 4
   }
}); 

Steps to reproduce

Please note this only happens on a real device. Simulators do not experience this issue, though on Simulators there is the odd problem of the first STE field in a sequence taking a considerable amount of time to focus upon tap.. related?

  1. Install the app on a real device, running iOS 26 or later.
  2. Create a few text fields. In this case, 3.
  3. Set more than one of the fields to have secureTextEntry
  4. Before tapping on any of the STE fields, try tapping on a non-STE field.
  5. Observe the app crashing.

Interestingly, by the way, if you first select an STE field then any other field, the app doesn't terminate regardless of order. Though, navigating away from the screen and back to it, selecting a non-STE field causes a termination.

React Native Version

0.82.1

Affected Platforms

Runtime - iOS

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

System:
  OS: macOS 26.1
  CPU: (10) arm64 Apple M2 Pro
  Memory: 247.22 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 24.11.1
    path: /Users/samir/.nvm/versions/node/v24.11.1/bin/node
  Yarn:
    version: 1.22.21
    path: /usr/local/bin/yarn
  npm:
    version: 11.6.2
    path: /Users/samir/.nvm/versions/node/v24.11.1/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.1
      - iOS 26.1
      - macOS 26.1
      - tvOS 26.1
      - visionOS 26.1
      - watchOS 26.1
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.2 AI-252.25557.131.2521.14432022
  Xcode:
    version: 26.1.1/17B100
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 21.0.8
    path: /Users/samir/.sdkman/candidates/java/current/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: 20.0.0
  react:
    installed: 19.1.1
    wanted: 19.1.1
  react-native:
    installed: 0.82.1
    wanted: 0.82.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

NSInvalidArgumentException: *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
  CoreFoundation      0x1a3142964  __exceptionPreprocess
  libobjc.A           0x1a0025810  objc_exception_throw
  CoreFoundation      0x1a315564c  -[__NSArrayM insertObject:atIndex:]
  UIKitCore           0x1a9660eb8  -[UIViewController _addChildViewController:performHierarchyCheck:notifyWillMove:]
  SafariServices      0x1f5404a18  -[_SFPasswordViewController _addRemoteViewAsChild]
  SafariServices      0x1f53a0eb4  -[_SFAppPasswordSavingViewController viewDidLoad]
  UIKitCore           0x1a89e5ef0  -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled]
  UIKitCore           0x1a89d7118  -[UIViewController loadViewIfRequired]
  UIKitCore           0x1a89d6d48  -[UIViewController view]
  UIKit               0x2bdc66860  -[UIViewControllerAccessibility dismissViewControllerWithTransition:completion:]
  UIKitCore           0x1a966ce28  -[UIViewController _performCoordinatedPresentOrDismiss:animated:]
  UIKitCore           0x1a966f520  -[UIViewController dismissViewControllerAnimated:completion:]
  UIKit               0x2bdc662ac  -[UIViewControllerAccessibility dismissViewControllerAnimated:completion:]
  SafariServices      0x1f5431760  +[_SFAutomaticPasswordInputViewController prepareToDisplayInputViewControllerWithAutoFillContext:]
  UIKitCore           0x1a9a2e63c  +[UIInputViewController prepareForNextKeyResponderFromCurrentWindowSceneResponder:]
  UIKitCore           0x1a97d1644  -[UIKeyboardSceneDelegate _reloadInputViewsForResponder:force:fromBecomeFirstResponder:]
  UIKitCore           0x1a9e1d93c  -[UIResponder(UIResponderInputViewAdditions) _reloadInputViewsFromFirstResponder:]
  UIKitCore           0x1a8a42488  -[UIResponder becomeFirstResponder]
  DEVPrepDuel         0x102a325a4  closure in UIResponder.swizzleBecomeFirstResponder
  DEVPrepDuel         0x102a32608  thunk for closure
  UIKitCore           0x1a8a41edc  -[UIView(Hierarchy) becomeFirstResponder]
  UIKitCore           0x1a8ce44a8  -[UITextField becomeFirstResponder]
  UIKitCore           0x1aa0ff934  -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessaryActivatingSelection:]
  UIKitCore           0x1aa0d9ccc  -[UITextSelectionInteraction _checkForRepeatedTap:gestureLocationOut:]
  UIKitCore           0x1aa0dab98  -[UITextSelectionInteraction _handleMultiTapGesture:]
  UIKitCore           0x1a9df39e4  -[UIApplication sendAction:to:from:forEvent:]
  DEVPrepDuel         0x102762c9c  __49-[SentrySwizzleWrapper swizzleSendAction:forKey:]_block_invoke_2
  UIKitCore           0x1a982cb54  -[UITextMultiTapRecognizer onStateUpdate:]
  UIKitCore           0x1a98f8278  -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:]
  UIKitCore           0x1a8cb9af8  _UIGestureRecognizerSendTargetActions
  UIKitCore           0x1a8cb98b8  _UIGestureRecognizerSendActions
  UIKitCore           0x1a8a4b21c  -[UIGestureRecognizer _updateGestureForActiveEvents]
  UIKitCore           0x1a99003a0  -[UIGestureRecognizer gestureNode:didUpdatePhase:]
  Gestures            0x1ae630ac8  __swift_project_value_buffer
  Gestures            0x1ae66f8cc  __swift_memcpy1_1
  Gestures            0x1ae634780  __swift_project_value_buffer
  Gestures            0x1ae63fc24  __swift_allocate_value_buffer
  UIKitCore           0x1a98f19e4  -[UIGestureEnvironment _updateForEvent:window:]
  UIKitCore           0x1a9e251b0  -[UIWindow sendEvent:]
  UIKitCore           0x1a9e07bfc  -[UIApplication sendEvent:]
  UIKit               0x2bdb567e8  -[UIApplicationAccessibility sendEvent:]
  DEVPrepDuel         0x10275cd44  __57-[SentrySessionReplayIntegration swizzleApplicationTouch]_block_invoke_2
  UIKitCore           0x1a8a3f450  __dispatchPreprocessedEventFromEventQueue
  UIKitCore           0x1a8a4e658  __processEventQueue
  UIKitCore           0x1a8a41368  updateCycleEntry
  UIKitCore           0x1a8a4f808  _UIUpdateSequenceRunNext
  UIKitCore           0x1a8a4eba4  schedulerStepScheduledMainSectionContinue
  UpdateCycle         0x291d7a55c  UC::DriverCore::continueProcessing
  CoreFoundation      0x1a30e5f0c  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
  CoreFoundation      0x1a30e5e80  __CFRunLoopDoSource0
  CoreFoundation      0x1a30c3ac8  __CFRunLoopDoSources0
  CoreFoundation      0x1a309a6d4  __CFRunLoopRun
  CoreFoundation      0x1a3099a68  _CFRunLoopRunSpecificWithOptions
  GraphicsServices    0x244bd9494  GSEventRunModal
  UIKitCore           0x1a8a6f738  -[UIApplication _run]
  UIKitCore           0x1a8a17f7c  UIApplicationMain
  DEVPrepDuel         0x10224d65c  main
  dyld                0x1a007ae24  start

  CoreFoundation      0x1a3142964  __exceptionPreprocess
  libobjc.A           0x1a0025810  objc_exception_throw
  CoreFoundation      0x1a315564c  -[__NSArrayM insertObject:atIndex:]
  UIKitCore           0x1a9660eb8  -[UIViewController _addChildViewController:performHierarchyCheck:notifyWillMove:]
  SafariServices      0x1f5404a18  -[_SFPasswordViewController _addRemoteViewAsChild]
  SafariServices      0x1f53a0eb4  -[_SFAppPasswordSavingViewController viewDidLoad]
  UIKitCore           0x1a89e5ef0  -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled]
  UIKitCore           0x1a89d7118  -[UIViewController loadViewIfRequired]
  UIKitCore           0x1a89d6d48  -[UIViewController view]
  UIKit               0x2bdc66860  -[UIViewControllerAccessibility dismissViewControllerWithTransition:completion:]
  UIKitCore           0x1a966ce28  -[UIViewController _performCoordinatedPresentOrDismiss:animated:]
  UIKitCore           0x1a966f520  -[UIViewController dismissViewControllerAnimated:completion:]
  UIKit               0x2bdc662ac  -[UIViewControllerAccessibility dismissViewControllerAnimated:completion:]
  SafariServices      0x1f5431760  +[_SFAutomaticPasswordInputViewController prepareToDisplayInputViewControllerWithAutoFillContext:]
  UIKitCore           0x1a9a2e63c  +[UIInputViewController prepareForNextKeyResponderFromCurrentWindowSceneResponder:]
  UIKitCore           0x1a97d1644  -[UIKeyboardSceneDelegate _reloadInputViewsForResponder:force:fromBecomeFirstResponder:]
  UIKitCore           0x1a9e1d93c  -[UIResponder(UIResponderInputViewAdditions) _reloadInputViewsFromFirstResponder:]
  UIKitCore           0x1a8a42488  -[UIResponder becomeFirstResponder]
  DEVPrepDuel         0x102a325a4  closure in UIResponder.swizzleBecomeFirstResponder
  DEVPrepDuel         0x102a32608  thunk for closure
  UIKitCore           0x1a8a41edc  -[UIView(Hierarchy) becomeFirstResponder]
  UIKitCore           0x1a8ce44a8  -[UITextField becomeFirstResponder]
  UIKitCore           0x1aa0ff934  -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessaryActivatingSelection:]
  UIKitCore           0x1aa0d9ccc  -[UITextSelectionInteraction _checkForRepeatedTap:gestureLocationOut:]
  UIKitCore           0x1aa0dab98  -[UITextSelectionInteraction _handleMultiTapGesture:]
  UIKitCore           0x1a9df39e4  -[UIApplication sendAction:to:from:forEvent:]
  DEVPrepDuel         0x102762c9c  __49-[SentrySwizzleWrapper swizzleSendAction:forKey:]_block_invoke_2
  UIKitCore           0x1a982cb54  -[UITextMultiTapRecognizer onStateUpdate:]
  UIKitCore           0x1a98f8278  -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:]
  UIKitCore           0x1a8cb9af8  _UIGestureRecognizerSendTargetActions
  UIKitCore           0x1a8cb98b8  _UIGestureRecognizerSendActions
  UIKitCore           0x1a8a4b21c  -[UIGestureRecognizer _updateGestureForActiveEvents]
  UIKitCore           0x1a99003a0  -[UIGestureRecognizer gestureNode:didUpdatePhase:]
  Gestures            0x1ae630ac8  __swift_project_value_buffer
  Gestures            0x1ae66f8cc  __swift_memcpy1_1
  Gestures            0x1ae634780  __swift_project_value_buffer
  Gestures            0x1ae63fc24  __swift_allocate_value_buffer
  UIKitCore           0x1a98f19e4  -[UIGestureEnvironment _updateForEvent:window:]
  UIKitCore           0x1a9e251b0  -[UIWindow sendEvent:]
  UIKitCore           0x1a9e07bfc  -[UIApplication sendEvent:]
  UIKit               0x2bdb567e8  -[UIApplicationAccessibility sendEvent:]
  DEVPrepDuel         0x10275cd44  __57-[SentrySessionReplayIntegration swizzleApplicationTouch]_block_invoke_2
  UIKitCore           0x1a8a3f450  __dispatchPreprocessedEventFromEventQueue
  UIKitCore           0x1a8a4e658  __processEventQueue
  UIKitCore           0x1a8a41368  updateCycleEntry
  UIKitCore           0x1a8a4f808  _UIUpdateSequenceRunNext
  UIKitCore           0x1a8a4eba4  schedulerStepScheduledMainSectionContinue
  UpdateCycle         0x291d7a55c  UC::DriverCore::continueProcessing
  CoreFoundation      0x1a30e5f0c  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
  CoreFoundation      0x1a30e5e80  __CFRunLoopDoSource0
  CoreFoundation      0x1a30c3ac8  __CFRunLoopDoSources0
  CoreFoundation      0x1a309a6d4  __CFRunLoopRun
  CoreFoundation      0x1a3099a68  _CFRunLoopRunSpecificWithOptions
  GraphicsServices    0x244bd9494  GSEventRunModal
  UIKitCore           0x1a8a6f738  -[UIApplication _run]
  UIKitCore           0x1a8a17f7c  UIApplicationMain
  DEVPrepDuel         0x10224d65c  main
  dyld                0x1a007ae24  start

MANDATORY Reproducer

https://github.com/bdotsamir/mre-secureTextEntry

Screenshots and Videos

No response

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