xamarinxamarin.iosxamarin-test-cloudxamarin.uitest

Xamarin.UITest DeviceAgentException: Failed to install DeviceAgent


How do I solve this error that occurs when running Xamarin.UITest on an iOS Device?

It happens on both the iOS Simulator and a physical iOS device.

SetUp : Calabash.XDB.Core.Exceptions.DeviceAgentException : Failed to install DeviceAgent: ApplicationName='/var/folders/5m/3712cp7j2k928k6z3fgszfyw0000gp/T/xdb/DeviceAgent.iOS.Dependencies/93c12f73043a2d14eea9d417ab080eb4/bin/iOSDeviceManager', CommandLine='install -d fcbb5006c892e39f1f675a3f6804ce3688c3b8d1 -a /var/folders/5m/3712cp7j2k928k6z3fgszfyw0000gp/T/xdb/DeviceAgent.iOS.Dependencies/93c12f73043a2d14eea9d417ab080eb4/ipa/DeviceAgent-Runner.app', CurrentDirectory='', Native error= Cannot find the specified file

----> System.ComponentModel.Win32Exception : ApplicationName='/var/folders/5m/3712cp7j2k928k6z3fgszfyw0000gp/T/xdb/DeviceAgent.iOS.Dependencies/93c12f73043a2d14eea9d417ab080eb4/bin/iOSDeviceManager', CommandLine='install -d fcbb5006c892e39f1f675a3f6804ce3688c3b8d1 -a /var/folders/5m/3712cp7j2k928k6z3fgszfyw0000gp/T/xdb/DeviceAgent.iOS.Dependencies/93c12f73043a2d14eea9d417ab080eb4/ipa/DeviceAgent-Runner.app', CurrentDirectory='', Native error= Cannot find the specified file


Solution

  • I had this issue happen to me before as well, it was caused by a corrupt file in that folder. Navigate to that directory: '/var/folders/5m/3712cp7j2k928k6z3fgszfyw0000gp/T/' and delete the folder 'xdb'. This should resolve the issue.

    FYI: The UITest team is aware of this and they have a fix in version 2.0.1.