Repository navigation
fix(ios): cap the iOS 26 Safari WebView hierarchy step so it cannot stall or kill the runner - #4
Merged
Conversation
…tall or kill the runner The SafariViewService snapshot (iOS 26+) ran on the main actor with no limit, so a heavy page stalled every hierarchy-based command. Worse, its `webViews.count` query records an XCTest failure when the AX request times out instead of throwing; that fails testHttpServer and the runner exits, so the session loses its driver. - Lower XCTest's per-request AX timeout to 10 s for this step only (XCAXClient_iOS _setAXTimeout:error:, exposed via AXClientProxy) and restore it afterwards; on timeout return the app hierarchy without the Safari part. - Replace `webViews.count` + snapshot with one throwing snapshot that both detects the web view and provides the hierarchy, so a timeout surfaces as a caught error rather than a recorded test failure. - Log how long the step took. Verified on an iPhone 17 / iOS 26.4 simulator with e2e simple_web_view: passes with the 10 s cap; with a 1 ms cap the runner survives 16 consecutive timeouts (previously it exited on the first) and the flow fails only because the web content is omitted. Rebuilt the simulator driver zips.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SafariViewService snapshot (iOS 26+) ran on the main actor with no
limit, so a heavy page stalled every hierarchy-based command. Worse, its
webViews.countquery records an XCTest failure when the AX request timesout instead of throwing; that fails testHttpServer and the runner exits,
so the session loses its driver.
(XCAXClient_iOS _setAXTimeout:error:, exposed via AXClientProxy) and
restore it afterwards; on timeout return the app hierarchy without the
Safari part.
webViews.count+ snapshot with one throwing snapshot that bothdetects the web view and provides the hierarchy, so a timeout surfaces as
a caught error rather than a recorded test failure.
Verified on an iPhone 17 / iOS 26.4 simulator with e2e simple_web_view:
passes with the 10 s cap; with a 1 ms cap the runner survives 16
consecutive timeouts (previously it exited on the first) and the flow
fails only because the web content is omitted.
Rebuilt the simulator driver zips.