Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 486
Brandon Minnick Avatar asked Mar 10 '23 16:03

Brandon Minnick


1 Answers

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.

like image 141
Mahdi Alirezaie Avatar answered May 08 '23 02:05

Mahdi Alirezaie