Use Device feature fails on iOS 26 real devices — usePreinstalledWDA: true + devicectl process launch causes WDA crash in Device Farm #2052
Unanswered
silashayri
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When clicking "Use Device" from the Device Farm dashboard on iOS 26 real devices, the session always fails with:
Failed to start the preinstalled WebDriverAgent in 120000 ms.Connection was refused to port <dynamic_port>
WDA is installed successfully via installiOSWDA, but immediately crashes when launched via devicectl device process launch. The WDA process never appears in the running processes list (devicectl device info processes returns {}).
Root Cause Analysis
The dashboard "Use Device" flow always sets usePreinstalledWDA: true and then uses devicectl device process launch to start the XCTest runner:
Launching WebDriverAgent on the device without xcodebuildExecuting "xcrun" "devicectl" "device" "process" "launch" --device --terminate-existing --environment-variables {"USE_PORT":"52068","WDA_PRODUCT_BUNDLE_IDENTIFIER":"com.silas.WebDriverAgentRunner.xctrunner","MJPEG_SERVER_PORT":"52067"} "com.silas.WebDriverAgentRunner.xctrunner"
On iOS 26, launching an XCTest runner binary directly via devicectl without the XCTest infrastructure set up by xcodebuild causes an immediate crash. The port is never opened, so every /status poll returns Connection was refused.
Key observation: When usePreinstalledWDA: false is used, Appium runs:
xcodebuild build-for-testing test-without-building ... -destination id=
This properly initializes the XCTest runtime and WDA starts successfully on iOS 26.
Steps to Reproduce
Run Appium v3.5.0 with device-farm v11.3.2 on macOS with iOS 26 real devices
Build and install WDA with bundle ID com.silas.WebDriverAgentRunner via Xcode (iOS 26 SDK)
Upload the resulting IPA as preBuildWDAPath
Click "Use Device" from the dashboard
Session fails after 120s timeout
Expected Behavior
"Use Device" should open a working interactive session on iOS 26 real devices.
Workaround
Setting usePreinstalledWDA: false in default-capabilities works for automated test sessions, but Device Farm dashboard overrides this with usePreinstalledWDA: true during "Use Device" flow, making the dashboard feature unusable for iOS 26.
Question: Is there a plan to support iOS 26 in the "Use Device" dashboard feature? Specifically, should the dashboard use xcodebuild test-without-building instead of devicectl process launch for iOS 18+?
Appium Server Logs
Full session log
[AppiumDriver@c931] Calling AppiumDriver.createSession() with args: [{"alwaysMatch":{"platformName":"ios","appium:automationName":"XCUITest","appium:udid":"00008110-000930CA3E89401E","df:filterByHost":"http://10.10.11.218:31337","df:skipReport":true,"df:liveVideo":true,"appium:mjpegServerPort":52065,"appium:waitForQuiescence":false,"appium:wdaEventloopIdleDelay":0,"appium:eventLoopIdleDelaySec":0,"appium:waitForIdleTimeout":0,"appium:skipLogCapture":true,"appium:settings":{"mjpegServerFramerate":10,"mjpegServerScreenshotQuality":0,"mjpegScalingFactor":50,"animationCoolOffTimeout":0},"df:jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1YjRjYjY3Yy1hMTRmLTQ0MjktODc2NS0yYzM2YjcyNDlkYWEiLCJ1c2VybmFtZSI6ImFkbWluIiwicm9sZSI6ImFkbWluIiwiaWF0IjoxNzgwNTg4OTYzLCJleHAiOjE3ODA2NzUzNjN9.LDZWOlsf6nqI9SsoNDpMTflDM5tzxfiIpbNi_QhEkZw","appium:requestId":"9a5cca92-a1ee-499b-a4f5-9250750a50a5"},"firstMatch":[{}]},{"alwaysMatch":{"platformName":"ios","appium:automationName":"XCUITest","appium:udid":"00008110-000930CA3E89401E","df:filterByHost":"http://10.10.11.218:31337","df:skipReport…
[device-farm-main] 📱 Plugin Args: {"platform":"both","iosDeviceType":"real","androidDeviceType":"both","skipChromeDownload":true,"maxSessions":16,"deviceAvailabilityTimeoutMs":300000,"newCommandTimeoutSec":300,"liveStreaming":true,"enableAuthentication":true,"preBuildWDAPath":"/tmp/wda-ipa/WebDriverAgent-silas.ipa"}
[AppiumDriver@c931] Plugins which can handle cmd 'createSession': device-farm
[AppiumDriver@c931] Plugin device-farm is now handling cmd 'createSession'
[device-farm-main] 📱 pluginArgs: {"platform":"both","iosDeviceType":"real","androidDeviceType":"both","skipChromeDownload":true,"maxSessions":16,"adbRemote":[],"emulators":[],"simulators":[],"deviceAvailabilityTimeoutMs":300000,"deviceAvailabilityQueryIntervalMs":10000,"sendNodeDevicesToHubIntervalMs":30000,"checkStaleDevicesIntervalMs":30000,"checkBlockedDevicesIntervalMs":30000,"newCommandTimeoutSec":300,"bindHostOrIp":"10.10.11.218","enableDashboard":false,"removeDevicesFromDatabaseBeforeRunningThePlugin":false,"remoteConnectionTimeout":60000,"liveStreaming":true,"wdaBundleId":"","preBuildWDAPath":"/tmp/wda-ipa/WebDriverAgent-silas.ipa","androidCleanUpApps":[],"iosCleanUpApps":[],"enableAuthentication":true}
[device-farm-main] Receiving session request at host: 10.10.11.218
[device-farm-main] 📱 Creating temporary session capability_id: 9a5cca92-a1ee-499b-a4f5-9250750a50a5
[device-farm-main] Merged Capabilities: {
"platformName": "ios",
"appium:automationName": "XCUITest",
"appium:udid": "00008110-000930CA3E89401E",
"df:filterByHost": "http://10.10.11.218:31337",
"df:skipReport": true,
"df:liveVideo": true,
"appium:mjpegServerPort": 52065,
"appium:waitForQuiescence": false,
"appium:wdaEventloopIdleDelay": 0,
"appium:eventLoopIdleDelaySec": 0,
"appium:waitForIdleTimeout": 0,
"appium:skipLogCapture": true,
"appium:settings": {
"mjpegServerFramerate": 10,
"mjpegServerScreenshotQuality": 0,
"mjpegScalingFactor": 50,
"animationCoolOffTimeout": 0
},
"df:jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1YjRjYjY3Yy1hMTRmLTQ0MjktODc2NS0yYzM2YjcyNDlkYWEiLCJ1c2VybmFtZSI6ImFkbWluIiwicm9sZSI6ImFkbWluIiwiaWF0IjoxNzgwNTg4OTYzLCJleHAiOjE3ODA2NzUzNjN9.LDZWOlsf6nqI9SsoNDpMTflDM5tzxfiIpbNi_QhEkZw"
}
Acquiring Lock with name aacdeeegiimnorsv
[device-farm-main] Max session count: 16, Busy device count: 0
[device-farm-main] Waiting for free device. Filter: {"platform":"ios","udid":["00008110-000930CA3E89401E"],"busy":false,"userBlocked":false,"filterByHost":"http://10.10.11.218:31337"}}
[device-farm-main] Updated devices with filter: {"platform":"ios","udid":{"$in":["00008110-000930CA3E89401E"]},"busy":false,"userBlocked":false,"host":"http://10.10.11.218:31337"}
[device-farm-main] Updated devices with filter: {"platform":"ios","udid":{"$in":["00008110-000930CA3E89401E"]},"busy":false,"userBlocked":false,"host":"http://10.10.11.218:31337"}
[device-farm-main] 📱 Blocking device 00008110-000930CA3E89401E at host http://10.10.11.218:31337 for new session
[device-farm-main] Updating allocated device: "{"userBlocked":false,"offline":false,"id":"0d38183e-4342-519f-b162-6e7a064a67da","wdaLocalPort":51993,"mjpegServerPort":51994,"udid":"00008110-000930CA3E89401E","sdk":"26.5","name":"iPhone 14 Plus","busy":false,"realDevice":true,"deviceType":"real","platform":"ios","host":"http://10.10.11.218:31337","wdaBundleId":"","productModel":"iPhone14,8","totalUtilizationTimeMilliSec":0,"sessionStartTime":0,"width":"428","height":"926","tags":[],"webDriverAgentHost":"http://10.10.11.218","webDriverAgentUrl":"http://10.10.11.218:51993","nodeId":"34b93032-b8d0-4ecb-83c3-274e74083b70","meta":{"revision":6,"created":1780588956370,"version":0,"updated":1780588962430},"$loki":1}"
[device-farm-main] Updated allocated device: "[{"userBlocked":false,"offline":false,"id":"0d38183e-4342-519f-b162-6e7a064a67da","wdaLocalPort":51993,"mjpegServerPort":51994,"udid":"00008110-000930CA3E89401E","sdk":"26.5","name":"iPhone 14 Plus","busy":true,"realDevice":true,"deviceType":"real","platform":"ios","host":"http://10.10.11.218:31337","wdaBundleId":"","productModel":"iPhone14,8","totalUtilizationTimeMilliSec":0,"sessionStartTime":0,"width":"428","height":"926","tags":[],"webDriverAgentHost":"http://10.10.11.218","webDriverAgentUrl":"http://10.10.11.218:51993","nodeId":"34b93032-b8d0-4ecb-83c3-274e74083b70","meta":{"revision":8,"created":1780588956370,"version":0,"updated":1780588968843},"$loki":1,"newCommandTimeout":300}]"
[device-farm-main] Port 52067 has been allocated
[device-farm-main] Port 52068 has been allocated
[device-farm-main] Updating allocated device: "{"userBlocked":false,"offline":false,"id":"0d38183e-4342-519f-b162-6e7a064a67da","wdaLocalPort":52068,"mjpegServerPort":52067,"udid":"00008110-000930CA3E89401E","sdk":"26.5","name":"iPhone 14 Plus","busy":false,"realDevice":true,"deviceType":"real","platform":"ios","host":"http://10.10.11.218:31337","wdaBundleId":"","productModel":"iPhone14,8","totalUtilizationTimeMilliSec":0,"sessionStartTime":0,"width":"428","height":"926","tags":[],"webDriverAgentHost":"http://10.10.11.218","webDriverAgentUrl":"http://10.10.11.218:51993","nodeId":"34b93032-b8d0-4ecb-83c3-274e74083b70","meta":{"revision":6,"created":1780588956370,"version":0,"updated":1780588962430},"$loki":1}"
[device-farm-main] Updated allocated device: "[{"userBlocked":false,"offline":false,"id":"0d38183e-4342-519f-b162-6e7a064a67da","wdaLocalPort":52068,"mjpegServerPort":52067,"udid":"00008110-000930CA3E89401E","sdk":"26.5","name":"iPhone 14 Plus","busy":true,"realDevice":true,"deviceType":"real","platform":"ios","host":"http://10.10.11.218:31337","wdaBundleId":"","productModel":"iPhone14,8","totalUtilizationTimeMilliSec":0,"sessionStartTime":0,"width":"428","height":"926","tags":[],"webDriverAgentHost":"http://10.10.11.218","webDriverAgentUrl":"http://10.10.11.218:51993","nodeId":"34b93032-b8d0-4ecb-83c3-274e74083b70","meta":{"revision":9,"created":1780588956370,"version":0,"updated":1780588968844},"$loki":1,"newCommandTimeout":300}]"
[device-farm-main] device.host: http://10.10.11.218:31337 and pluginArgs.bindHostOrIp: 10.10.11.218
[device-farm-main] 📱 Creating session on the same node
[device-farm-main] Updated devices with filter: {"udid":{"$in":["00008110-000930CA3E89401E"]}}
[AppiumDriver@c931] Executing default handling behavior for command 'createSession'
[AppiumDriver@c931] Event 'newSessionRequested' logged at 1780588968845 (19:02:48 GMT+0300 (GMT+03:00))
[Appium] Attempting to find matching driver for automationName 'XCUITest' and platformName 'ios'
[Appium] The 'xcuitest' driver was installed and matched caps.
[Appium] Will require it at /Users/mactestotomasyon/.appium/node_modules/appium-xcuitest-driver
[Appium] Requiring driver at /Users/mactestotomasyon/.appium/node_modules/appium-xcuitest-driver/build/lib/index.js
[AppiumDriver@c931] Appium v3.5.0 creating new XCUITestDriver (v11.9.0) session
[AppiumDriver@c931] Checking BaseDriver versions for Appium and XCUITestDriver
[AppiumDriver@c931] Appium's BaseDriver version is 10.6.0
[AppiumDriver@c931] XCUITestDriver's BaseDriver version is 10.6.0
[XCUITestDriver@afa7]
[XCUITestDriver@afa7] Creating session with W3C capabilities: {
"alwaysMatch": {
"platformName": "ios",
"df:filterByHost": "http://10.10.11.218:31337",
"df:skipReport": true,
"df:liveVideo": true,
"df:jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1YjRjYjY3Yy1hMTRmLTQ0MjktODc2NS0yYzM2YjcyNDlkYWEiLCJ1c2VybmFtZSI6ImFkbWluIiwicm9sZSI6ImFkbWluIiwiaWF0IjoxNzgwNTg4OTYzLCJleHAiOjE3ODA2NzUzNjN9.LDZWOlsf6nqI9SsoNDpMTflDM5tzxfiIpbNi_QhEkZw",
"appium:automationName": "XCUITest",
"appium:waitForQuiescence": false,
"appium:wdaEventloopIdleDelay": 0,
"appium:eventLoopIdleDelaySec": 0,
"appium:waitForIdleTimeout": 0,
"appium:skipLogCapture": true,
"appium:newCommandTimeout": 300,
"appium:udid": "00008110-000930CA3E89401E",
"appium:deviceName": "iPhone 14 Plus",
"appium:platformVersion": "26.5",
"appium:mjpegServerPort": 52067,
"appium:wdaLocalPort": 52068,
"appium:usePreinstalledWDA": true,
"appium:updatedWDABundleId": "com.silas.WebDriverAgentRunner.xctrunner",
"appium:updatedWDABundleIdSuffix": "",
"appium:useNewWDA": true,
"appium:showXcodeLog": true,
"appium:wdaLaunchTimeout": 120000
},
"firstMatch": [
{}
]
}
[XCUITestDriver@afa7] The following provided capabilities were not recognized by this driver:
[XCUITestDriver@afa7] df:filterByHost
[XCUITestDriver@afa7] df:skipReport
[XCUITestDriver@afa7] df:liveVideo
[XCUITestDriver@afa7] df:jwt
[XCUITestDriver@afa7] waitForQuiescence
[XCUITestDriver@afa7] eventLoopIdleDelaySec
[XCUITestDriver@afa7] The desired capabilities include neither an app nor a bundleId. WebDriverAgent will be started without the default app
[460ddc44][XCUITestDriver@afa7] Session created with session id: 460ddc44-4693-4369-abf9-55053d222995
[460ddc44][XCUITest] Current user: 'mactestotomasyon'
[460ddc44][XCUITestDriver@afa7] Available real devices: 00008110-000930CA3E89401E, 00008030-000A38DC11EB402E
[460ddc44][XCUITestDriver@afa7] Creating iDevice object with udid '00008110-000930CA3E89401E'
[460ddc44][XCUITestDriver@afa7] Determining device to run tests on: udid: '00008110-000930CA3E89401E', real device: true
[460ddc44][BaseDriver] Initialized new IPC object with max object size of 1048576 bytes and max topics of 1000
[460ddc44][BaseDriver] Subscribing afa7133b-32d9-4cca-b89f-f7348d7fc758 to topic 'xcuitest:sessionUdidClaimed'
[460ddc44][BaseDriver] Subscribing afa7133b-32d9-4cca-b89f-f7348d7fc758 to topic 'xcuitest:sessionUdidContended'
[460ddc44][BaseDriver] Subscribing afa7133b-32d9-4cca-b89f-f7348d7fc758 to topic 'xcuitest:sessionUdidReleased'
[460ddc44][BaseDriver] afa7133b-32d9-4cca-b89f-f7348d7fc758 is publishing a message to topic xcuitest:sessionUdidClaimed
[460ddc44][BaseDriver] Unsubscribing afa7133b-32d9-4cca-b89f-f7348d7fc758 from topic 'xcuitest:sessionUdidContended'
[460ddc44][BaseDriver] Unsubscribing afa7133b-32d9-4cca-b89f-f7348d7fc758 from topic 'xcuitest:sessionUdidReleased'
[460ddc44][XCUITestDriver@afa7] Event 'xcodeDetailsRetrieved' logged at 1780588968989 (19:02:48 GMT+0300 (GMT+03:00))
[460ddc44][XCUITestDriver@afa7] Event 'appConfigured' logged at 1780588968989 (19:02:48 GMT+0300 (GMT+03:00))
[460ddc44][XCUITestDriver@afa7] Event 'resetStarted' logged at 1780588968989 (19:02:48 GMT+0300 (GMT+03:00))
[460ddc44][XCUITestDriver@afa7] Reset: running ios real device reset flow
[460ddc44][XCUITestDriver@afa7] Event 'resetComplete' logged at 1780588968989 (19:02:48 GMT+0300 (GMT+03:00))
[460ddc44][XCUITestDriver@afa7] Using WDA path: '/Users/mactestotomasyon/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent'
[460ddc44][XCUITestDriver@afa7] Using WDA agent: '/Users/mactestotomasyon/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'
[460ddc44][XCUITestDriver@afa7] 'skipLogCapture' is set. Skipping starting logs such as crash, system, safari console and safari network.
[460ddc44][XCUITestDriver@afa7] Setting up real device
[460ddc44][XCUITestDriver@afa7] No obsolete cached processes from previous WDA sessions listening on port 52068 have been found
[460ddc44][XCUITestDriver@afa7] Requesting connection for device 00008110-000930CA3E89401E on local port 52068, device port 52068
[460ddc44][XCUITestDriver@afa7] Cached connections count: 0
[460ddc44][XCUITestDriver@afa7] Using appium-ios-remotexpc usbmux strategy for '00008110-000930CA3E89401E'
[460ddc44][XCUITestDriver@afa7] Successfully requested the connection for 00008110-000930CA3E89401E:52068
[460ddc44][XCUITestDriver@afa7] Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver'
[460ddc44][XCUITestDriver@afa7] Trying to start WebDriverAgent once since at least one of webDriverAgentUrl,usePreinstalledWDA capabilities is provided
[460ddc44][XCUITestDriver@afa7] Event 'wdaStartAttempted' logged at 1780588969038 (19:02:49 GMT+0300 (GMT+03:00))
[460ddc44][DVTSecureSocketProxyService] DVT handshake complete. Found 111 supported identifiers
[460ddc44][XCUITestDriver@afa7] The process of 'com.silas.WebDriverAgentRunner.xctrunner' app was not running
[460ddc44][XCUITestDriver@afa7] Launching WebDriverAgent on the device without xcodebuild
[460ddc44][Devicectl] Executing "xcrun" "devicectl" "device" "process" "launch" "--device" "00008110-000930CA3E89401E" "--terminate-existing" "--environment-variables" "{"USE_PORT":"52068","WDA_PRODUCT_BUNDLE_IDENTIFIER":"com.silas.WebDriverAgentRunner.xctrunner","MJPEG_SERVER_PORT":"52067"}" "com.silas.WebDriverAgentRunner.xctrunner"
[460ddc44][XCUITestDriver@afa7] JWProxy options: {"scheme":"http","server":"127.0.0.1","port":52068,"base":"","reqBasePath":"","sessionId":null,"keepAlive":true}
[460ddc44][XCUITestDriver@afa7] NoSessionProxy options: {"scheme":"http","server":"127.0.0.1","port":52068,"base":"","reqBasePath":"","sessionId":null,"keepAlive":true}
[460ddc44][WD Proxy] NoSessionProxy options: {"scheme":"http","server":"127.0.0.1","port":52068,"base":"","reqBasePath":"","sessionId":null,"timeout":3000}
[460ddc44][WD Proxy] Matched '/status' to command name 'getStatus'
[460ddc44][WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:52068/status] with no body
[460ddc44][XCUITestDriver@afa7] RemoteXPC downstream socket connected (local 52068 -> device 52068)
[460ddc44][XCUITestDriver@afa7] RemoteXPC upstream connect error (local 52068 -> device 52068): Connection was refused to port 52068
[460ddc44][XCUITestDriver@afa7] RemoteXPC downstream socket error (local 52068 -> device 52068): Connection was refused to port 52068
[460ddc44][WD Proxy] socket hang up
[460ddc44][WD Proxy] Matched '/status' to command name 'getStatus'
[460ddc44][WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:52068/status] with no body
[460ddc44][XCUITestDriver@afa7] RemoteXPC downstream socket connected (local 52068 -> device 52068)
[460ddc44][XCUITestDriver@afa7] RemoteXPC upstream connect error (local 52068 -> device 52068): Connection was refused to port 52068
[460ddc44][XCUITestDriver@afa7] RemoteXPC downstream socket error (local 52068 -> device 52068): Connection was refused to port 52068
[460ddc44][WD Proxy] socket hang up
[460ddc44][WD Proxy] Matched '/status' to command name 'getStatus'
[460ddc44][WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:52068/status] with no body
[460ddc44][XCUITestDriver@afa7] RemoteXPC downstream socket connected (local 52068 -> device 52068)
[460ddc44][XCUITestDriver@afa7] RemoteXPC upstream connect error (local 52068 -> device 52068): Connection was refused to port 52068
[460ddc44][XCUITestDriver@afa7] RemoteXPC downstream socket error (local 52068 -> device 52068): Connection was refused to port 52068
[460ddc44][WD Proxy] socket hang up
[460ddc44][WD Proxy] Matched '/status]
Beta Was this translation helpful? Give feedback.
All reactions