WebDriverAgent shuts down when trying to use appium-xcuitest-driver

I am trying to use the new appium-xcuitest-driver because I am having a lot of issues with an app that is iOS 9.0+ and we believe the issues are a result of UIAutomator. We are hoping this new driver will fix those issues. However, I cannot get the driver setup to the point where I can use it. I have installed the xcuitest driver through npm and have successfully launched it and seen the blue screen that is supposed to come up stating that the driver is ready for commands.

The issue is that this blue screen minimizes and my Java code crashes on the line where it tries to create the iOS driver:
driver = new IOSDriver(urlAddress, capabilities);

There is something weird going on with the current version of the WebDriverAgent in the appium-xcuitest-driver. I downloaded appium-xcuitest-driver version 1.0.1 and could not get the WebDriverAgent to even launch. However, if I used 1.0.0 I was able to get it to launch with the error below. Also, taking the WebDriverAgent from 1.0.0 and using it in 1.0.1, I observed the same behavior. This leads me to believe the 1.0.1 web driver is faulty, and that means there could be issues with the 1.0.0 version as well.

I’m using java, Xcode 7.2, version 3.4 of the java client. I appreciate any help in trying to resolve this. It has been a major blocker for me, to the point I may have to change automation tools if this cannot be resolved.

This is the stacktrace I get when it crashes. Notice it says the WebDriverAgent actually starts and then gets a response with 200, the value “interrupting test”, a null session id, and status of 13.

info WebDriverAgent-driver detected that WebDriverAgent is running at url http://XX.XX.XX.XXX:8100
info WebDriverAgent Mar 16 10:56:51 Ford-Arnett XCTStubAppsinfo WebDriverAgent
info WebDriverAgent-driver WebDriverAgent started at url http://XX.XX.XX.XXX:8100
info JSONWP Proxy Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“app”:“XX/XXXXX/XXXXX/XXXXXXX/MyApp.app”,“bundleId”:“com.XXXXXX.XXXXXX”}}
info JSONWP Proxy Got response with status 200: {“value”:“Interrupting test”,“sessionId”:null,“status”:13}
ERR! WebDriverAgent-driver Error: An unknown server-side error occurred while processing the command.
ERR! WebDriverAgent-driver at JWProxy.command$ (lib/proxy.js:139:15)
ERR! WebDriverAgent-driver at tryCatch (/Users/ford.arnett/npm/testing_node_modules/node_modules/babel-runtime/regenerator/runtime.js:67:40)
ERR! WebDriverAgent-driver at GeneratorFunctionPrototype.invoke as _invoke
ERR! WebDriverAgent-driver at GeneratorFunctionPrototype.prototype.(anonymous function) as next
ERR! WebDriverAgent-driver at GeneratorFunctionPrototype.invoke (/Users/ford.arnett/npm/testing_node_modules/node_modules/babel-runtime/regenerator/runtime.js:136:37)
ERR! WebDriverAgent-driver at run (/Users/ford.arnett/npm/testing_node_modules/node_modules/core-js/library/modules/es6.promise.js:104:47)
ERR! WebDriverAgent-driver at /Users/ford.arnett/npm/testing_node_modules/node_modules/core-js/library/modules/es6.promise.js:115:28
ERR! WebDriverAgent-driver at flush (/Users/ford.arnett/npm/testing_node_modules/node_modules/core-js/library/modules/$.microtask.js:19:5)
ERR! WebDriverAgent-driver at _combinedTickCallback (node.js:370:9)
ERR! WebDriverAgent-driver at process._tickCallback (node.js:401:11)
ERR! WebDriverAgent-driver { [Error: An unknown server-side error occurred while processing the command.] status: 13, value: ‘Interrupting test’, httpCode: 200 }
info WebDriverAgent-driver Shutting down WebDriverAgent
info WebDriverAgent-driver xcodebuild exited with code null and signal SIGTERM
info WebDriverAgent-driver Shutting down WebDriverAgent
ERR! MJSONWP Encountered internal error running command: Error: An unknown server-side error occurred while processing the command.
ERR! MJSONWP at JWProxy.command$ (lib/proxy.js:139:15)

I have discussed my issue at length here:

but have ceased to get any more responses.

appium-xcuitest-driver is still being worked on. It’s definitely working for a bunch of advanced users who are actively contributing to it.

Since we haven’t officially released it as part of appium, the package on npm doesn’t get updated with the changes being made. Installing from npm is getting you a much older version.

I suggest visiting the github page for the project and building it from source. If you need help building it, either reply here or create github issues on the repository.

Thanks for the reply. I have been able to run the project I downloaded from github. It appears to have a similar issue with the WebDriverAgent. I ran everything just the way it was downloaded and was stopped before ever loading the XCTStubApps and seeing the blue screen. That error looks like this

However, if I take the WebDriverAgent from the appium-xcuitest-driver 1.0.0 I downloaded on npm, it does launch the blue screen and then appears to try and launch the app. When trying to launch the app it throws and error and the simulator gets stuck on a black screen. You can tell in the logs that it gets further with this webdriveragent

1 Like