Skip to content

ANR: InputAccessoryView + keyboardDismissMode="interactive" freeze the UI on slow drag #54368

@luqmaan

Description

@luqmaan

Description

On iOS, when a TextInput is used inside an InputAccessoryView and the underlying ScrollView uses keyboardDismissMode="interactive", the UI freezes as you drag the keyboard down.
This does not occur with "on-drag" or "none".

Usually the UI just hangs here, but I've gotten this crash sometimes:

Termination Reason: Namespace FRONTBOARD, Code 2343432205
<RBSTerminateContext| domain:10 code:0x8BADF00D
explanation: scene-update watchdog transgression:

app<host.exp.Exponent>:83523 exhausted real (wall clock) time allowance of 10.00 secon
-[UIViewController _updateViewSafeAreaInsetsAndEagerlyUpdateContentScrollView:]
-[UIViewController _setContentOverlayInsets:andLeftMargin:rightMargin:]
-[UIView _safeAreaInsetsForFrame:inSuperview:ignoreViewController:]

Steps to reproduce

https://snack.expo.dev/@luqmaan/keyboarddismissmode-interactive-freezing-ui

  • If using a simulator make sure the on-screen keyboard is visible (cmd-k)
  • Tap on the input.
  • Very slowly drag down the input to dismiss the keyboard
  • The UI will freeze when the keyboard is ~10px from bottom.

React Native Version

0.81.5

Affected Platforms

Runtime - iOS

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

System:
  OS: macOS 26.0
  CPU: (8) arm64 Apple M1 Pro
  Memory: 257.81 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.16.0
    path: /usr/local/bin/node
  Yarn:
    version: 4.1.0
    path: ~/.npm-packages/bin/yarn
  npm:
    version: 10.9.2
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.10.28.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.0
      - iOS 26.0
      - macOS 26.0
      - tvOS 26.0
      - visionOS 26.0
      - watchOS 26.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.1 AI-251.27812.49.2514.14217341
  Xcode:
    version: 26.0.1/17A400
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 23.0.1
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

Full report here https://gist.github.com/luqmaan/a8bdfd537e62ac7603b79f991f5c3a99

Process:             Expo Go [83523]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/C1CC2842-E055-4AA0-8BBE-B0DE0FB27C8E/data/Containers/Bundle/Application/E11B3F7C-6684-49E2-8CD5-677F6FD2EE6C/Expo-Go-54.0.6.app/Expo Go
Identifier:          host.exp.Exponent
Version:             54.0.6 (54.0.6)
Code Type:           ARM-64 (Native)
Role:                Non UI
Parent Process:      launchd_sim [19472]
Coalition:           com.apple.CoreSimulator.SimDevice.C1CC2842-E055-4AA0-8BBE-B0DE0FB27C8E [2779]
Responsible Process: SimulatorTrampoline [7481]
User ID:             501

Date/Time:           2025-11-01 13:26:19.5753 -0700
Launch Time:         2025-11-01 13:25:29.4896 -0700
Hardware Model:      MacBookPro18,3
OS Version:          macOS 26.0 (25A354)
Release Type:        User

Crash Reporter Key:  E954AEC5-FCDA-8A9E-BA01-5EAF694B3D2A
Incident Identifier: 36D3961E-DCEA-4364-A3D0-8C9E7C3A7ED8

Sleep/Wake UUID:       99884D67-295B-4CA0-A622-54FC645A0987

Time Awake Since Boot: 49000 seconds
Time Since Wake:       9445 seconds

System Integrity Protection: enabled

Triggered by Thread: 0

Exception Type:    EXC_CRASH (SIGKILL)
Exception Codes:   0x0000000000000000, 0x0000000000000000

Termination Reason:  Namespace FRONTBOARD, Code 2343432205, 
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-update watchdog transgression: app<host.exp.Exponent((null))>:83523 exhausted real (wall clock) time allowance of 10.00 seconds
ProcessVisibility: Background
ProcessState: Running
WatchdogEvent: scene-update
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 47.070 (user 34.560, system 12.510), 57% CPU",
"Elapsed application CPU time (seconds): 10.292, 12% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>


Thread 0 Crashed:
0   libobjc.A.dylib               	       0x18007107c objc_retain + 52
1   UIKitCore                     	       0x185a88694 -[UIViewController _updateViewSafeAreaInsetsAndEagerlyUpdateContentScrollView:] + 120
2   UIKitCore                     	       0x185a8904c -[UIViewController _setContentOverlayInsets:andLeftMargin:rightMargin:] + 768
3   UIKitCore                     	       0x185a8b9d4 __121-[UIViewController __updateContentOverlayInsetsWithOurRect:inBoundsOfAncestorViewController:viaImmediateChildOfAncestor:]_block_invoke + 416
4   UIKitCore                     	       0x185a8a21c -[UIViewController __updateContentOverlayInsetsWithOurRect:inBoundsOfAncestorViewController:viaImmediateChildOfAncestor:] + 2620
5   UIKitCore                     	       0x185a8a980 -[UIViewController _updateContentOverlayInsetsFromParentIfNecessary] + 812
6   UIKitCore                     	       0x186821284 -[UIView _safeAreaInsetsForFrame:inSuperview:ignoreViewController:] + 116
7   UIKitCore                     	       0x1868215d0 -[UIView _updateSafeAreaInsets] + 92
8   UIKitCore                     	       0x186835638 -[UIView(Geometry) _applyISEngineLayoutValuesToBoundsOnly:] + 1060
9   UIKitCore                     	       0x186835714 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 152
10  CoreFoundation                	       0x18045172c __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
11  CoreFoundation                	       0x1803cc9c4 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 408
12  UIKitCore                     	       0x186834d24 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 96
13  UIKitCore                     	       0x186759a5c -[UIView(AdditionalLayoutSupport) _is_layout] + 104
14  UIKitCore                     	       0x18683a2d0 -[UIView _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 768
15  UIKitCore                     	       0x18683a5d4 -[UIView(Hierarchy) layoutSubviews] + 200
16  UIKitCore                     	       0x1854df290 0x185156000 + 3707536
17  UIKitCore                     	       0x1854df5f0 0x185156000 + 3708400
18  UIKitCore                     	       0x1868494bc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2504
19  QuartzCore                    	       0x18c65eb1c CA::Layer::perform_update_(CA::Layer*, CALayer*, unsigned int, CA::Transaction*) + 348
20  QuartzCore                    	       0x18c65e48c CA::Layer::update_if_needed(CA::Transaction*, unsigned int, unsigned int) + 536
21  QuartzCore                    	       0x18c669f14 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 176
22  QuartzCore                    	       0x18c581804 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 544
23  QuartzCore                    	       0x18c5b16e0 CA::Transaction::commit() + 636
24  QuartzCore                    	       0x18c5b2c8c CA::Transaction::flush_as_runloop_observer(bool) + 68
25  UIKitCore                     	       0x18625e368 _UIApplicationFlushCATransaction + 48
26  UIKitCore                     	       0x18617e834 __setupUpdateSequence_block_invoke_2 + 372
27  UIKitCore                     	       0x185773878 _UIUpdateSequenceRunNext + 120
28  UIKitCore                     	       0x18617ec90 schedulerStepScheduledMainSectionContinue + 56
29  UpdateCycle                   	       0x2509462b4 UC::DriverCore::continueProcessing() + 80
30  CoreFoundation                	       0x1804114ac __CFMachPortPerform + 164
31  CoreFoundation                	       0x18044dbe0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
32  CoreFoundation                	       0x18044d1f8 __CFRunLoopDoSource1 + 480
33  CoreFoundation                	       0x18044c2c0 __CFRunLoopRun + 2100
34  CoreFoundation                	       0x180446e24 _CFRunLoopRunSpecificWithOptions + 496
35  GraphicsServices              	       0x1925319bc GSEventRunModal + 116
36  UIKitCore                     	       0x18625fc3c -[UIApplication _run] + 772
37  UIKitCore                     	       0x186263e64 UIApplicationMain + 124
38  Expo Go                       	       0x1048b8424 main + 64
39  ???                           	       0x10a5893d0 ???
40  dyld                          	       0x10a45cd54 start + 7184

MANDATORY Reproducer

https://snack.expo.dev/@luqmaan/keyboarddismissmode-interactive-freezing-ui

Screenshots and Videos

Screen.Recording.2025-11-01.at.1.22.16.PM.mov

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions