Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Appium - iOS - Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4

Tags:

xcode

ios

appium

I'm trying to connect Appium 1.12.1 to a physical iOS device with Automatic Server. These are the capabilities I am trying:

{
  "browserName": "Safari",
  "platformName": "iOS",
  "platformVersion": "12.1",
  "deviceName": "iPhone 6",
  "automationName": "XCUITest",
  "startIWDP": true,
  "udid": "auto"
}

I am getting a lengthy error that starts with:

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: 2019-04-09 10:14:08.626 xcodebuild[22198:212737] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 "The folder “WebDriverAgentRunner_iphoneos12.2-arm64.xctestrun” doesn’t exist." 
like image 903
John Hazlitt Avatar asked Apr 09 '19 16:04

John Hazlitt


1 Answers

I had the same problem. In "/Users/YOUR_NAME/Library/Developer/Xcode/DerivedData/" I have two folders: WebDriverAgent-akxhdiizyykdxefsthlnfyomlaiz WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu

And Appium tried take the folder from WebDriverAgent-akxhdiizyykdxefsthlnfyomlaiz but need WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu. I copied from WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu to WebDriverAgent-akxhdiizyykdxefsthlnfyomlaiz and now all work good.

like image 162
Sergey Kozhevnikov Avatar answered Oct 04 '22 02:10

Sergey Kozhevnikov