Appium version:17.1.1-1
Xcode version: 11.3
Real device OS:14.1
I am trying to install the WebDriverAgentRunner
on my iPhone which is at OS 14.1 by running the command
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=<device id>' test
Getting the below error
Error Domain=com.apple.dt.xctest.error Code=9 "Unable to connect to test manager on <deviceID>"
UserInfo={NSLocalizedDescription=Unable to connect to test manager on <deviceID>, NSUnderlyingError=0x7fcf78ef6030
{Error Domain=XCTMobileDeviceFramework Code=34 "The service is invalid."
UserInfo={NSLocalizedDescription=The service is invalid.}}}
2020-11-04 15:01:13.362 xcodebuild[32197:349433] [MT] DTDKRemoteDeviceConnection:
Failed to start Instruments daemon on device “<deviceID>”:
Error Domain=com.apple.dtdevicekit Code=-402653150
"An error was encountered while attempting to communicate with this device. (The service is invalid.)
I tried to restart my device, Xcode, Appium but nothing worked. I had recently updated my phone from 14.0.1 to 14.1 and since then I am facing this issue.
2
Answers
Appium started official support for iOS 14 only since release 1.18, but based on release notes I would install the latest 1.18.3 to include recent fixes. Usually new iOS release requires fixes on Appium side, so I suggest checking release notes for Appium release.
You also better update XCode to v12, since Appium is usually tested with the combination XCode 12 + iOS 14.
While looking into the stacktrace, it might be device issue and you need to do a hard reset
I was having the same issue with xcode 11.6 and iOS 14.2.
Finally was able to resolve it by upgrading xcode to 12.1 and including the device support files for iOS 14.2