-
Notifications
You must be signed in to change notification settings - Fork 374
WebDriverAgent fails to start on iOS 26.2 / Xcode 26.2 simulator #303
Description
Description
All tools that depend on WebDriverAgent fail with timed out waiting for WebDriverAgent to be ready on an iOS 26.2 simulator (Xcode 26.2). WebDriverAgent never starts — it attempts to listen on a port but the connection is permanently refused.
Environment
- macOS: 26.3.1 (arm64, Apple Silicon)
- Xcode: 26.2 (Build 17C52)
- iOS Simulator Runtime: iOS 26.2 (23C54)
- Simulator Device: iPhone 17 Pro (CF7B2DE4-A852-4CC8-9A43-1234F52A7798)
- mobile-mcp: 0.0.50 (latest via `npx -y @mobilenext/mobile-mcp@latest`)
- mobilecli: 0.1.60
Steps to Reproduce
- Boot an iOS 26.2 simulator:
xcrun simctl boot "iPhone 17 Pro" - Launch any app on the simulator (confirmed the app is running and visible via `xcrun simctl io screenshot`)
- Attempt any mobile-mcp tool that requires WebDriverAgent:
mobile_take_screenshot(device: "CF7B2DE4-...") mobile_list_elements_on_screen(device: "CF7B2DE4-...")
Observed Behavior
All WebDriverAgent-dependent tools fail with:
error starting agent: timed out waiting for WebDriverAgent to be ready
Verbose logs from mobilecli
Running mobilecli screenshot --device <UDID> --format png --output /tmp/test.png -v shows:
[VERBOSE] Could not find WDA process: WebDriverAgent process not found for device CF7B2DE4-...
[VERBOSE] Failed to get existing WDA port: WebDriverAgent process not found for device CF7B2DE4-...
[VERBOSE] Starting WebDriverAgent with USE_PORT=13002 and MJPEG_SERVER_PORT=13202
[VERBOSE] WebDriverAgent not ready yet: failed to fetch endpoint status: Get "http://localhost:13002/status": dial tcp [::1]:13002: connect: connection refused
[VERBOSE] WebDriverAgent not ready yet: ... (repeats for ~30 seconds until timeout)
WebDriverAgent is never successfully started — port 13002 stays refused for the entire timeout duration.
What DOES work
xcrun simctl io <UDID> screenshot— native simctl screenshots work finemobile_list_elements_on_screen— worked once on the iOS home screen (SpringBoard), but failed on subsequent calls and always fails when an app is in the foregroundmobile_launch_app— successfully launches appsmobile_list_available_devices— correctly lists the booted simulator
Likely Root Cause
The upstream Appium WebDriverAgent had a build failure on Xcode 26 due to a -Wno-reserved-identifier compiler flag issue, fixed in appium/WebDriverAgent#1032 and shipped in XCUITest driver 9.5.0+ / WDA v11.4.1 (2026-03-15).
If mobilecli bundles a WDA build that predates this fix, it would fail to compile/run under Xcode 26, which matches the observed behavior (WDA process never starts, port never opens).
The Appium team confirmed iOS 26 works after the fix: appium/appium#21347 (closed as resolved).
Related Issues
- mobilecli#186 — same "timed out waiting for WebDriverAgent to be ready" error on simulator, filed 2026-03-25
Additional Context
Only iOS 26.2 runtime is available with Xcode 26.2 — there is no option to use an older iOS runtime as a workaround without installing a separate Xcode version.