Xcode is unable to correctly run WebDriverAgent on iOS due to error: Too many instances of this service are already running..

Xcode is consistently failing to launch WebDriverAgent on an ipad 3 correctly causing it to launch several times and fail.

Error: Xcode encountered an error. Too many instances of this service are already running.



Troubleshooting tried:

Restart Xcode
Restart Appium
Restart Device
Restart mac
Clear device ram
Change appium ip/port
Changed project targets for webdriver agent runner

Debugging steps taken:
Completed all steps in guide: https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md
showXcodeLog caps added
Change platform versions
Change app builds
Verified signing for both app and webdriver project

Threads referenced without resolution:
Exact issue:
https://github.com/appium/appium/issues/13116
https://github.com/facebookarchive/WebDriverAgent/issues/355
https://github.com/appium/appium/issues/9801
openradar.appspot.com/31117325

Similar problems:
https://stackoverflow.com/questions/45956196/too-many-instances-of-this-service-are-already-running

https://stackoverflow.com/questions/39464682/dtdevicekit-could-not-start-house-arrest-service-for-app-identifier-***
https://github.com/facebookarchive/WebDriverAgent/issues/458
https://stackoverflow.com/questions/43133276/how-to-remove-xcode-plugin
https://stackoverflow.com/questions/20732327/xcode-5-required-plug-in-not-present-in-dvtplugincompatibilityuuids
https://developer.apple.com/documentation/xcode-release-notes/xcode-11-release-notes
https://github.com/appium/appium/issues/11688
https://stackoverflow.com/questions/53369647/testing-failed-when-build-using-xcode-build-command-or-appium
(site had to be removed by developer.apple.com)/article/14135205/The+file+“WebDriverAgentRunner-Runner.app”+couldn’t+be+opened+because+there+is+no+such+file
https://stackoverflow.com/questions/35110910/xcode-7-pluginloading-required-plug-in-compatibility-uuid
https://gist.github.com/tcurdt/a0b2aae40f4f444600935563397da36d

Full log: see attached




Hello

Did you tryied this command. Supposing you are using Appium on port 4723, running this command and trying again solved it for me.

Code Block  
kill $(lsof -t -i:4723)

I hope it solves your problem

Xcode is unable to correctly run WebDriverAgent on iOS due to error: Too many instances of this service are already running..
 
 
Q