XCUITest driver not found
See original GitHub issueThe problem
When trying to run ios tests on simulator i am getting a failed to create session as it thinks xcuitest driver isn’t installed
Environment
- Appium version (or git revision) that exhibits the issue: 2.0.0-beta.44
- Desktop OS/version used to run Appium: Mac M1
- Node.js version (unless using Appium.app|exe): v14.15.4
- Npm or Yarn package manager: 8.19.2
- Mobile platform/version under test: iOS
- Real device or emulator/simulator: Simulator
- Appium CLI or Appium.app|exe: Appium 2 cli
Details
Using these capabilities
{
"platformName": "iOS",
"appium:deviceName": "iPhone 8",
"appium:platformVersion": "15.0",
"appium:noReset": true,
"appium:automationName": "xcuitest"
}
Link to Appium logs
Failed to create session. An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName 'xcuitest' and platformName iOS'. Have you installed a driver that supports those capabilities? Run 'appium driver list --installed' to see. (Lower-level error: ENOENT: no such file or directory, open '/Users/user/.appium/node_modules/appium-xcuitest-driver/build/index.js')
2022-09-21 19:48:28:039 - [debug] [AppiumDriver@adfa] Event 'newSessionRequested' logged at 1663789708039 (20:48:28 GMT+0100 (British Summer Time))
2022-09-21 19:48:28:040 - [Appium] Attempting to find matching driver for automationName 'xcuitest' and platformName 'iOS'
2022-09-21 19:48:28:040 - [Appium] The 'xcuitest' driver was installed and matched caps.
2022-09-21 19:48:28:040 - [Appium] Will require it at /Users/user/.appium/node_modules/appium-xcuitest-driver
2022-09-21 19:48:28:040 - [debug] [Appium] Requiring driver at /Users/user/.appium/node_modules/appium-xcuitest-driver
2022-09-21 19:48:28:046 - [debug] [AppiumDriver@adfa] Event 'newSessionStarted' logged at 1663789708046 (20:48:28 GMT+0100 (British Summer Time))
2022-09-21 19:48:28:047 - [debug] [AppiumDriver@adfa] Encountered internal error running command: Error: Could not find a driver for automationName 'xcuitest' and platformName iOS'. Have you installed a driver that supports those capabilities? Run 'appium driver list --installed' to see. (Lower-level error: ENOENT: no such file or directory, open '/Users/user/.appium/node_modules/appium-xcuitest-driver/node_modules/appium/driver.js')
2022-09-21 19:48:28:048 - [debug] [AppiumDriver@adfa] at DriverConfig.findMatchingDriver (/usr/local/lib/node_modules/appium/lib/extension/driver-config.js:174:13)
2022-09-21 19:48:28:048 - [debug] [AppiumDriver@adfa] at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:264:29)
2022-09-21 19:48:28:048 - [debug] [AppiumDriver@adfa] at commandExecutor (/usr/local/lib/node_modules/appium/node_modules/@appium/base-driver/lib/basedriver/driver.js:73:9)
2022-09-21 19:48:28:048 - [debug] [AppiumDriver@adfa] at AppiumDriver.executeCommand (/usr/local/lib/node_modules/appium/node_modules/@appium/base-driver/lib/basedriver/driver.js:90:15)
2022-09-21 19:48:28:048 - [debug] [AppiumDriver@adfa] at runMicrotasks (<anonymous>)
2022-09-21 19:48:28:048 - [debug] [AppiumDriver@adfa] at processTicksAndRejections (internal/process/task_queues.js:93:5)
2022-09-21 19:48:28:048 - [debug] [AppiumDriver@adfa] at defaultBehavior (/usr/local/lib/node_modules/appium/lib/appium.js:669:16)
2022-09-21 19:48:28:048 - [debug] [AppiumDriver@adfa] at ImageElementPlugin.handle (/Users/user/.appium/node_modules/@appium/images-plugin/lib/plugin.js:77:12)
2022-09-21 19:48:28:048 - [debug] [AppiumDriver@adfa] at /usr/local/lib/node_modules/appium/lib/appium.js:726:16
2022-09-21 19:48:28:049 - [debug] [AppiumDriver@adfa] at AppiumDriver.executeWrappedCommand (/usr/local/lib/node_modules/appium/lib/appium.js:763:16)
2022-09-21 19:48:28:049 - [debug] [AppiumDriver@adfa] at AppiumDriver.executeCommand (/usr/local/lib/node_modules/appium/lib/appium.js:685:17)
2022-09-21 19:48:28:049 - [debug] [AppiumDriver@adfa] at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:346:19)
Code To Reproduce Issue [ Good To Have ]
No installed drivers, then appium driver install xcuitest , then Attempt to run test, get the above output.
/Users/user/.appium/node_modules/appium-xcuitest-driver/node_modules DOES NOT have the expected within /appium/driver.js
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
do you have an old appium home structure? try to
rm -rf ~/.appium
then try the whole thing again. otherwise, do you have anAPPIUM_HOME
variable set? and otherwise, paste the full set of logsyeah i think the way appium home is used changed between beta 37 and 40. glad it worked!