Hi all.
When I start appium from code with AppiumDriverLocalService on Mac OS Jenkins node for iOS tests I see the following
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
xcodebuild error message:
. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
I donāt know the reason, because
if I start appium for android programmatically - everything ok
If I start appium for iOS programmatically from Intellij IDE - everything ok
Also AppiumDriverLocalService starting server, I see that appium works on correct port and url
Promblem only for iOS and when I starting run on MacOS node(slave) from Jenkins using maven command.
Iāve followed this tutorial. And as I mention before -
I donāt see problem if appium already started manually on jenkins node from terminal
Only when start appium from code on jenkins node
Are you logged in as same user Jenkins uses (like, ābuildā, or ājenkinsā)? Also, can you post the full log of failure as Git Gist?
Also, what if you run the Maven command from terminal? You should try to run it manually the same exact way your Jenkins job would run or you are not comparing the same procedure.
You are right - it āecho $PATHā returns nothing
But why (from your point of view) in this case, android part works without problems. I use the same configiration and starting appium with Runtime.getRuntime().exec() for android - and everything ok
Yes, thatās an āinteractiveā vs ānon-interactiveā shell. Iām sorry if I wasnāt clear. The link has those details. I believe that when Jenkins runs a scheduled job the shell is ānon-interactiveā.
Of course there are ways to set the $PATH from within the Jenkins pipeline, but then you have to do it for each job . Much better to set the appropriate shell scripts.
Edited to add: There is a handy way to check all environment variables on this webpage. May be really helpful:
Hm, I found out that environment variables in jenkins was already set. User from jenkins is the same as login user. Also as I use appiumdriverlocalservice - Iām setting āPATHā as parameter. But still no progress(