appium: usePreinstalledWDA=true does not work with iOS 17 (Xcode 15)
Do I have the most recent component updates?
- I use the most recent available driver/plugin and server versions
Is the component officially supported by the Appium team?
- I have verified the component repository is present under the Appium organization in GitHub
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
appium inspector Connects to appium incorrectly. The appium inspector cannot be started properly
Expected Behavior
Normal start
Minimal Reproducible Example
{ “platformName”: “iOS”, “appium:platformVersion”: “14.3”, “appium:deviceName”: “iPhone Xr”, “appium:bundleId”: “com.sina.weibo”, “appium:udid”: “00008110-001435E436F2801E”, “appium:xcodeSigningId”: “iPhone Developer”, “appium:automationName”: “XCUITest”, “appium:wdaLocalPort”: “8100”, “appium:noReset”: true, “appium:usePreinstalledWDA”: true, “appium:updatedWDABundleId”: “com.tewbie.test.WebDriverAgentRunner” }
Environment
- Operating system:
- Appium server version (output of
appium --version
): 2.1.3 - Appium driver(s) and their version(s): XCUITest 5.4.0
- Appium plugin(s) and their version(s):
- Node.js version (output of
node --version
): npm
version (output ofnpm --version
):9.8.1- Last component(s) version which did not exhibit the problem:
- Platform and version under test:
- Real device or emulator/simulator:
Link to Appium Logs
No response
Further Information
xxx@xxxdeMacBook-Pro ~ % appium
[Appium] Welcome to Appium v2.1.3
[Appium] Attempting to load driver xcuitest…
[debug] [Appium] Requiring driver at /Users/xxx/.appium/node_modules/appium-xcuitest-driver
[Appium] Appium REST http interface listener started on http://0.0.0.0:4723
[Appium] You can provide the following URLs in your client code to connect to this server:
[Appium] http://127.0.0.1:4723/ (only accessible from the same host)
[Appium] http://172.16.7.184:4723/
[Appium] http://169.254.82.58:4723/
[Appium] Available drivers:
[Appium] - xcuitest@5.4.0 (automationName ‘XCUITest’)
[Appium] No plugins have been installed. Use the “appium plugin” command to install the one(s) you want to use.
[HTTP] --> GET /sessions
[HTTP] {}
[debug] [AppiumDriver@5a3b] Calling AppiumDriver.getSessions() with args: []
[debug] [AppiumDriver@5a3b] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /sessions 304 11 ms - -
[HTTP]
[HTTP] --> POST /session
[HTTP] {“capabilities”:{“alwaysMatch”:{“platformName”:“iOS”,“appium:platformVersion”:“14.3”,“appium:deviceName”:“iPhone Xr”,“appium:bundleId”:“com.sina.weibo”,“appium:udid”:“0
0008110-001435E436F2801E”,“appium:xcodeSigningId”:“iPhone Developer”,“appium:automationName”:“XCUITest”,“appium:wdaLocalPort”:“8100”,“appium:noReset”:true,“appium:usePreinstal
ledWDA”:true,“appium:updatedWDABundleId”:“com.tewbie.test.WebDriverAgentRunner”,“appium:includeSafariInWebviews”:true,“appium:newCommandTimeout”:3600,“appium:connectHardwareKe
yboard”:true},“firstMatch”:[{}]},“desiredCapabilities”:{“platformName”:“iOS”,“appium:platformVersion”:“14.3”,“appium:deviceName”:“iPhone Xr”,“appium:bundleId”:“com.sina.weibo”
,“appium:udid”:“00008110-001435E436F2801E”,“appium:xcodeSigningId”:“iPhone Developer”,“appium:automationName”:“XCUITest”,“appium:wdaLocalPort”:“8100”,“appium:noReset”:true,“ap
pium:usePreinstalledWDA”:true,“appium:updatedWDABundleId”:“com.tewbie.test.WebDriverAgentRunner”,“appium:includeSafariInWebviews”:true,"appium:newCommand…
[debug] [AppiumDriver@5a3b] Calling AppiumDriver.createSession() with args: [{“platformName”:“iOS”,“appium:platformVersion”:“14.3”,“appium:deviceName”:“iPhone Xr”,“appium:bund
leId”:“com.sina.weibo”,“appium:udid”:“00008110-001435E436F2801E”,“appium:xcodeSigningId”:“iPhone Developer”,“appium:automationName”:“XCUITest”,“appium:wdaLocalPort”:“8100”,“ap
pium:noReset”:true,“appium:usePreinstalledWDA”:true,“appium:updatedWDABundleId”:“com.tewbie.test.WebDriverAgentRunner”,“appium:includeSafariInWebviews”:true,“appium:newCommand
Timeout”:3600,“appium:connectHardwareKeyboard”:true},null,{“alwaysMatch”:{“platformName”:“iOS”,“appium:platformVersion”:“14.3”,“appium:deviceName”:“iPhone Xr”,"appium:bundleId
":“com.sina.weibo”,“appium:udid”:“00008110-001435E436F2801E”,“appium:xcodeSigningId”:“iPhone Developer”,“appium:automationName”:“XCUITest”,“appium:wdaLocalPort”:“8100”,“appium
:noReset”:true,“appium:usePreinstalledWDA”:true,“appium:updatedWDABundleId”:“com.tewbie.test.WebDriverAgentRunner”,“appium:includeSafariInWebviews”:true,“appium:newCommandTime
out”:3600,“appium:connectHardwareKeyboard”:true…
[debug] [AppiumDriver@5a3b] Event ‘newSessionRequested’ logged at 1695724840129 (18:40:40 GMT+0800 (China Standard Time))
[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/xxx/.appium/node_modules/appium-xcuitest-driver
[debug] [Appium] Requiring driver at /Users/xxx/.appium/node_modules/appium-xcuitest-driver
[AppiumDriver@5a3b] Appium v2.1.3 creating new XCUITestDriver (v5.4.0) session
[AppiumDriver@5a3b] Checking BaseDriver versions for Appium and XCUITestDriver
[AppiumDriver@5a3b] Appium’s BaseDriver version is 9.3.20
[AppiumDriver@5a3b] XCUITestDriver’s BaseDriver version is 9.3.20
[debug] [XCUITestDriver@2190] Creating session with W3C capabilities: {
[debug] [XCUITestDriver@2190] “alwaysMatch”: {
[debug] [XCUITestDriver@2190] “platformName”: “iOS”,
[debug] [XCUITestDriver@2190] “appium:platformVersion”: “14.3”,
[debug] [XCUITestDriver@2190] “appium:deviceName”: “iPhone Xr”,
[debug] [XCUITestDriver@2190] “appium:bundleId”: “com.sina.weibo”,
[debug] [XCUITestDriver@2190] “appium:udid”: “00008110-001435E436F2801E”,
[debug] [XCUITestDriver@2190] “appium:xcodeSigningId”: “iPhone Developer”,
[debug] [XCUITestDriver@2190] “appium:automationName”: “XCUITest”,
[debug] [XCUITestDriver@2190] “appium:wdaLocalPort”: “8100”,
[debug] [XCUITestDriver@2190] “appium:noReset”: true,
[debug] [XCUITestDriver@2190] “appium:usePreinstalledWDA”: true,
[debug] [XCUITestDriver@2190] “appium:updatedWDABundleId”: “com.tewbie.test.WebDriverAgentRunner”,
[debug] [XCUITestDriver@2190] “appium:includeSafariInWebviews”: true,
[debug] [XCUITestDriver@2190] “appium:newCommandTimeout”: 3600,
[debug] [XCUITestDriver@2190] “appium:connectHardwareKeyboard”: true
[debug] [XCUITestDriver@2190] },
[debug] [XCUITestDriver@2190] “firstMatch”: [
[debug] [XCUITestDriver@2190] {}
[debug] [XCUITestDriver@2190] ]
[debug] [XCUITestDriver@2190] }
[BaseDriver] Number capability passed in as string. Functionality may be compromised.
[XCUITestDriver@2190] Capability ‘wdaLocalPort’ changed from string (‘8100’) to integer (8100). This may cause unexpected behavior
[XCUITestDriver@2190 (62b888f1)] Session created with session id: 62b888f1-f7fc-41e1-bc77-f9ab718f1af7
[debug] [XCUITest] Current user: ‘xxx’
[debug] [XCUITestDriver@2190 (62b888f1)] Available devices: 00008110-001435E436F2801E
[debug] [XCUITest] Creating iDevice object with udid ‘00008110-001435E436F2801E’
[XCUITestDriver@2190 (62b888f1)] Determining device to run tests on: udid: ‘00008110-001435E436F2801E’, real device: true
[debug] [XCUITestDriver@2190 (62b888f1)] Event ‘xcodeDetailsRetrieved’ logged at 1695724840254 (18:40:40 GMT+0800 (China Standard Time))
[debug] [XCUITestDriver@2190 (62b888f1)] Event ‘appConfigured’ logged at 1695724840256 (18:40:40 GMT+0800 (China Standard Time))
[debug] [XCUITestDriver@2190 (62b888f1)] Event ‘resetStarted’ logged at 1695724840257 (18:40:40 GMT+0800 (China Standard Time))
[debug] [XCUITest] Reset: fullReset not set. Leaving as is
[debug] [XCUITestDriver@2190 (62b888f1)] Event ‘resetComplete’ logged at 1695724840257 (18:40:40 GMT+0800 (China Standard Time))
[XCUITestDriver@2190 (62b888f1)] Using WDA path: ‘/Users/xxx/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent’
[XCUITestDriver@2190 (62b888f1)] Using WDA agent: ‘/Users/xxx/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj’
[debug] [XCUITest] Crash reports root ‘/Users/xxx/Library/Logs/CrashReporter/MobileDevice/13mini’ does not exist. Got nothing to gather.
[debug] [XCUITestDriver@2190 (62b888f1)] Event ‘logCaptureStarted’ logged at 1695724840787 (18:40:40 GMT+0800 (China Standard Time))
[XCUITestDriver@2190 (62b888f1)] Setting up real device
[debug] [XCUITestDriver@2190 (62b888f1)] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[DevCon Factory] Requesting connection for device 00008110-001435E436F2801E on local port 8100, device port 8100
[debug] [DevCon Factory] Cached connections count: 0
[DevCon Factory] Successfully requested the connection for 00008110-001435E436F2801E:8100
[debug] [XCUITestDriver@2190 (62b888f1)] Starting WebDriverAgent initialization with the synchronization key ‘XCUITestDriver’
[debug] [XCUITestDriver@2190 (62b888f1)] Trying to start WebDriverAgent 1 times with 10000ms interval
[debug] [XCUITestDriver@2190 (62b888f1)] These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities
[debug] [XCUITestDriver@2190 (62b888f1)] Event ‘wdaStartAttempted’ logged at 1695724841152 (18:40:41 GMT+0800 (China Standard Time))
[debug] [XCUITest] The executable name for the bundle id ‘com.tewbie.test.WebDriverAgentRunner.xctrunner’ was ‘WebDriverAgentRunner-Runner’
[XCUITest] The process of the bundle id ‘com.tewbie.test.WebDriverAgentRunner.xctrunner’ was not running
[XCUITestDriver@2190 (62b888f1)] Launching WebDriverAgent on the device without xcodebuild
[ios-device] SignerIdentifier: Apple Development: xxx@163.com (86YG2ZHKY8)
[debug] [ios-device] removing /tmp/WebDriverAgentRunner-681E624C-FD80-49C6-8CD7-FA7E69B594A3.xctestconfiguration
[ios-device] Test runner ready
[debug] [ios-device] Xctest for com.tewbie.test.WebDriverAgentRunner.xctrunner on device 00008110-001435E436F2801E has stopped!
[XCUITestDriver@2190 (62b888f1)] Launching WebDriverAgent on the device without xcodebuild
uncaughtException: Cannot read properties of undefined (reading ‘_callChannel’)
TypeError: Cannot read properties of undefined (reading ‘_callChannel’)
at startExecuting (/Users/xxx/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/xctest.js:199:39)
at Timeout._onTimeout (/Users/xxx/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/xctest.js:205:34)
at listOnTimeout (node:internal/timers:569:17)
at processTimers (node:internal/timers:512:7)
[ios-device] SignerIdentifier: Apple Development: xxx@163.com (86YG2ZHKY8)
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Comments: 30 (15 by maintainers)
Maybe I figured out. Only when the preinstalled app’s
Frameworks/XC**
files are removed case, so like https://github.com/appium/WebDriverAgent/releases 's available packages with proper sign, the launch method below succeeded in launching the process. It must not be Xcode installed since Xcode build usually includes frameworks as well.The install method can be via appium-ios-device with sugned
.app
. So, we may be able to add a new cap or add some kind of combination for https://appium.github.io/appium-xcuitest-driver/latest/guides/run-prebuilt-wda/ . Theapp
is different from vanillabootstrapPath
so we may need to add a new cap? ->appium:prebuiltWDAPath
should help.We have no method to check the preinstalled app does not have the frameworks bundled, so probably we need to add explanation about it, but it can do.
Tried command:
Let me add this method
Have you checked my previous comment’s command behavior?