Appium version: 1.7.1
Xcode versions: 9.0 and 8.3.3
iOS Simulator version: iPhone 6, 10.3.1
A few months ago I was able to run my Appium tests through a local installation of Jenkins. I got sidetracked for a few months and am now coming back to it, but I’ve been unable to successfully run my tests. When I try to launch my application, my Jenkins build is called “Unstable” and I get the following error message:
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Command 'osascript -e 'tell application "System Events" to count processes whose bundle identifier is "com.apple.iphonesimulator"'' exited with code 1 (WARNING: The server did not provide any stacktrace information)
I came across and resolved many errors during my first attempt at running Appium tests on Jenkins, but this is a new one.
The gist for the entire Jenkins log can be found here:
The log says that tests failed because specific elements cannot be found, but that’s because the simulator is not being booted. If I attempt to run the test with the simulator up and running the app doesn’t open, so the Appium server is getting started. The tests work as expected if I run them locally without Jenkins.
My project resides in Jenkins/workspace/SampleAppiumProjectIOS and includes the following files and folders:
- app (folder)
- src (folder)
- target (folder)
Things I’ve tried so far:
- unlink and reinstall latest version of libimobiledevice
- downgrade from Xcode 9 to Xcode 8.3.3 (including simulator downgrade)
- updated my dependencies in my POM file to the most recent stable versions
- delete the Target folder before running the Jenkins build
sudo $(npm bin)/authorize-ios
DevToolsSecurity -status; confirmed that Developer mode is currently enabled
- started simulator with app installed before initiating Jenkins build
- checked this URL while the build was in progress: http://127.0.0.1:4723/wd/hub/status (result below; app is not loading, so this is expected)
The same issue (or at least a very similar issue) was very recently posted on Stack Overflow: https://stackoverflow.com/questions/46569413/jenkins-couldnt-open-ios-simulator
Any insight or suggestions would be greatly appreciated. Thank you for reading.