John Hazlitt
John Hazlitt

Reputation: 449

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

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." 

Upvotes: 7

Views: 3751

Answers (1)

Sergey Kozhevnikov
Sergey Kozhevnikov

Reputation: 21

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.

Upvotes: 1

Related Questions