Title
device.dump.ui times out on a heavy React Native screen on iOS simulator
Environment
Mobilewright: 0.0.60
@mobilewright/test: 0.0.60
mobilecli: 1.0.13
Platform: iOS simulator
Device: iPhone 16e
iOS: 26.5
Xcode: 26.6
App stack: React Native 0.81 / Hermes release build
Problem
On one heavy React Native screen, any Mobilewright native locator query causes device.dump.ui to time out before a UI tree is returned.
Example shape:
await device.openUrl("myapp://some/deep/link/to/heavy/react-native/list-screen")
await new Promise(resolve => setTimeout(resolve, 60_000))
await expect(screen.getByTestId("MainListScrollView")).toBeVisible({ timeout: 60_000 })
The same timeout also happens when querying an item inside the list:
await screen.getByTestId("list-item-container").first().tap()
So the issue does not appear to be a missing testID. Any locator on that screen triggers a full UI dump, and the dump itself times out.
Error
RpcError: failed to dump UI from device <UDID>:
RPC call device.dump.ui failed:
Post "http://localhost:<port>/rpc": context deadline exceeded
What Was Tried
Upgraded mobilecli from 1.0.11 to 1.0.13.
Upgraded Mobilewright from 0.0.59 to 0.0.60.
Killed/restarted mobilecli and the iOS DeviceKit runner before reruns.
Waited 10 seconds before the first locator query.
Waited 60 seconds before the first locator query.
Tried querying both the main scroll view and the first item container.
Tried opening the deep link while the app was already running.
Tried terminating the app and launching into the deep link.
Same device.dump.ui timeout still occurs.
Screen Shape
The failing screen is a complex React Native native screen with a structure like:
<KeyboardAvoidingView>
<AnimatedSectionList
testID="MainListScrollView"
sections={sections}
renderItem={renderItem}
scrollEventThrottle={1}
onScroll={Animated.event(...)}
/>
</KeyboardAvoidingView>
Each list item contains multiple nested React Native views, buttons, images, text, badges, and live/updating state.
Hypothesis
Mobilewright native locators appear to require a full native view hierarchy dump before resolving a testID. On this heavy screen, XCTest/DeviceKit cannot complete that full accessibility snapshot before the internal RPC deadline.
Increasing the Mobilewright locator timeout does not help, because each poll still depends on device.dump.ui completing first.
Question / Feature Request
Is there a supported way to avoid full-tree dumps for heavy React Native screens?
Useful options would be:
Direct native lookup by accessibility identifier/testID without dumping the whole tree.
Partial/subtree UI dump, e.g. start at a known testID.
Configurable internal timeout for device.dump.ui.
Diagnostic logging to identify which subtree or native element causes snapshotting to hang.
Shallow UI tree dump with lazy child expansion.
Impact
This blocks porting UI tests that need to interact with controls inside a heavy React Native list screen.
Title
device.dump.ui times out on a heavy React Native screen on iOS simulator
Environment
Mobilewright: 0.0.60
@mobilewright/test: 0.0.60
mobilecli: 1.0.13
Platform: iOS simulator
Device: iPhone 16e
iOS: 26.5
Xcode: 26.6
App stack: React Native 0.81 / Hermes release build
Problem
On one heavy React Native screen, any Mobilewright native locator query causes device.dump.ui to time out before a UI tree is returned.
Example shape:
The same timeout also happens when querying an item inside the list:
So the issue does not appear to be a missing testID. Any locator on that screen triggers a full UI dump, and the dump itself times out.
Error
What Was Tried
Upgraded mobilecli from 1.0.11 to 1.0.13.
Upgraded Mobilewright from 0.0.59 to 0.0.60.
Killed/restarted mobilecli and the iOS DeviceKit runner before reruns.
Waited 10 seconds before the first locator query.
Waited 60 seconds before the first locator query.
Tried querying both the main scroll view and the first item container.
Tried opening the deep link while the app was already running.
Tried terminating the app and launching into the deep link.
Same device.dump.ui timeout still occurs.
Screen Shape
The failing screen is a complex React Native native screen with a structure like:
Each list item contains multiple nested React Native views, buttons, images, text, badges, and live/updating state.
Hypothesis
Mobilewright native locators appear to require a full native view hierarchy dump before resolving a testID. On this heavy screen, XCTest/DeviceKit cannot complete that full accessibility snapshot before the internal RPC deadline.
Increasing the Mobilewright locator timeout does not help, because each poll still depends on device.dump.ui completing first.
Question / Feature Request
Is there a supported way to avoid full-tree dumps for heavy React Native screens?
Useful options would be:
Direct native lookup by accessibility identifier/testID without dumping the whole tree.
Partial/subtree UI dump, e.g. start at a known testID.
Configurable internal timeout for device.dump.ui.
Diagnostic logging to identify which subtree or native element causes snapshotting to hang.
Shallow UI tree dump with lazy child expansion.
Impact
This blocks porting UI tests that need to interact with controls inside a heavy React Native list screen.