Unable to run iOS tests with locally installed Appium server
See original GitHub issueThe problem
I’m unable to run iOS tests against locally
installed Appium server whereas globally
installed Appium server works fine. Appium server version is the same in both cases and app is prebuild.
Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
Environment
- Appium version (or git revision) that exhibits the issue: 1.6.4-beta
- Last Appium version that did not exhibit the issue (if applicable): 1.6.3
- Desktop OS/version used to run Appium: Mac OS 10.12.4
- Node.js version (unless using Appium.app|exe): v7.2.0
- Mobile platform/version under test: iOS 10.3, Xcode 8.3
- Real device or emulator/simulator: Simulator
- Appium CLI or Appium.app|exe: CLI
Details
Test run against locally installed Appium server fails with an error
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:369:15)
at tryCatch (/Users/janijegoroff/projects/mobile-ios-app/mobile-common/bdd/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/janijegoroff/projects/mobile-ios-app/mobile-common/bdd/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/janijegoroff/projects/mobile-ios-app/mobile-common/bdd/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/janijegoroff/projects/mobile-ios-app/mobile-common/bdd/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:369:15)
at tryCatch (/Users/janijegoroff/projects/mobile-ios-app/mobile-common/bdd/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/janijegoroff/projects/mobile-ios-app/mobile-common/bdd/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/janijegoroff/projects/mobile-ios-app/mobile-common/bdd/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/janijegoroff/projects/mobile-ios-app/mobile-common/bdd/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:369:15)
at tryCatch (/Users/janijegoroff/projects/mobile-ios-app/mobile-common/bdd/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/janijegoroff/projects/mobile-ios-app/mobile-common/bdd/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/janijegoroff/projects/mobile-ios-app/mobile-common/bdd/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/janijegoroff/projects/mobile-ios-app/mobile-common/bdd/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
Link to Appium logs
See logs for both success and failed cases https://gist.github.com/JaniJegoroff/9bffa4d87fcdb19d1b7ebb1b5acfa8de
Code To Reproduce Issue [ Good To Have ]
Common for both global and local test runs
- App is prebuild
- Appium server version is the same
Test run against globally installed Appium server
- Install Appium server globally:
npm install -g appium@beta
- Launch globally installed Appium server:
appium
- Launch the tests
Result: test is passed
Test run against locally installed Appium server
- Define
package.json
{
"name": "xxx-test-runner",
"version": "1.0.0",
"private": true,
"devDependencies": {
"appium": "1.6.4-beta"
}
}
- Install Appium server locally:
npm install
- Launch test where Appium server is started with command:
node node_modules/appium -a localhost -p 4723 --log-level error
Result: test fails with an error
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Troubleshooting - Appium
If you see iOS Simulator failed to install the application. and the paths are correct, try restarting the computer.
Read more >Using AppiumDriverLocalService to run tests on IOS failed
Hi all, I'm working with Appium for the past few months and everything worked really good. My next goal is to run Appium...
Read more >Appium IOS tests running when server started manually but ...
Attempting to run Appium automation scripts on iOS (simulator) on a Mac Mini (M1 chip, if that's relevant). When I run the tests, ......
Read more >I'm getting "The local appium server has not been started. The ...
I try to run AppiumParallelTests with iOS physical device and I'm getting ... System.out.println(“No devices are free to run test or Failed to...
Read more >Start appium server programmatically with iPhone is failing
When I start the appium server via terminal tests run successfully. So now I tried to run the appium programmatically with the below...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It fails because of WDA warning in Xcode 8.3/iOS 10.3. Try to apply this patch to local WDA source.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.