locked
DeviceAgentException : Failed to launch simulator (Cannot find the specified file) RRS feed

  • Question

  • User117231 posted

    I had the setup working until today and started to get the following error.

    Xamarin.TestCloud.Agent (ver. 0.20.3) Xamarin.UITest (ver. 2.0.0-beta05)

    Error SetUp : Calabash.XDB.Core.Exceptions.DeviceAgentException : Failed to launch simulator: ApplicationName='/var/folders/jw/1q7j1mpd7ds666nw73b439900000gn/T/xdb/DeviceAgent.iOS.Dependencies/c161689390f54e0320a22e0cb18312d7/bin/iOSDeviceManager', CommandLine='launchsimulator -d DEA2148A-3C2F-4DB0-9063-228012A8031C', CurrentDirectory='', Native error= Cannot find the specified file ----> System.ComponentModel.Win32Exception : ApplicationName='/var/folders/jw/1q7j1mpd7ds666nw73b439900000gn/T/xdb/DeviceAgent.iOS.Dependencies/c161689390f54e0320a22e0cb18312d7/bin/iOSDeviceManager', CommandLine='launchsimulator -d DEA2148A-3C2F-4DB0-9063-228012A8031C', CurrentDirectory='', Native error= Cannot find the specified file

    Stack Trace at Calabash.XDB.Core.Services.iOSDeviceAgentService.WithErrorHandling (System.Int32 eventId, System.Func`1[TResult] action, System.String errorMessage) [0x00038] in :0 at Calabash.XDB.Core.Services.iOSDeviceAgentService.LaunchSimulatorIfRequired (System.String deviceId, System.Int32 eventId) [0x00038] in :0 at Calabash.XDB.Core.Services.iOSDeviceAgentService+d__16.MoveNext () [0x00184] in :0 --- End of stack trace from previous location where exception was thrown --- at Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x00210] in :0 at Xamarin.UITest.iOS.iOSAppLauncher.LaunchApp (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, Xamarin.UITest.TestCloud.TestCloudiOSAppConfiguration testCloudAppConfiguration, Xamarin.UITest.Shared.Http.HttpClient testCloudWsClient, Xamarin.UITest.Shared.Http.HttpClient xtcServicesClient, System.Boolean testCloudUseDeviceAgent) [0x0007a] in :0 at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00302] in :0 at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in :0 at Happen.UITests.Tests.BeforeEachTest () [0x00012] in /Users/phillipsuh/Happen/hybrid/Happen.UITests/Tests.cs:21 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.6.0-c8sr0/bockbuild-mono-4.6.0-branch-c8sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:305 --Win32Exception at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x0018b] in /private/tmp/source-mono-4.6.0-c8sr0/bockbuild-mono-4.6.0-branch-c8sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Diagnostics/Process.cs:737

    Tuesday, October 4, 2016 6:05 AM

All replies

  • User139314 posted

    @Soo-hongSuh Is this still happening?

    If it happens again, what are the contents of /var/folders/jw/1q7j1mpd7ds666nw73b439900000gn/T/xdb/DeviceAgent.iOS.Dependencies/c161689390f54e0320a22e0cb18312d7/bin/ (or the actual directory is referenced in the error when you run it)?

    And can you then delete the temporary folder $TMPDIR/xdb and try running again?

    Wednesday, October 5, 2016 3:52 PM
  • User117231 posted

    The file didn't exist on the referenced folder. I've deleted the xdv folder and it is working again. Thank you.

    Wednesday, October 5, 2016 10:42 PM
  • User120247 posted

    We also hit this issue on latest stable packages. (Agent v0.20.3, UITest 2.0.0)

    SetUp : Calabash.XDB.Core.Exceptions.DeviceAgentException : Failed to launch simulator: ApplicationName='/var/folders/bn/4tfs58bs25pgyd54c3zcs80000gr/T/xdb/DeviceAgent.iOS.Dependencies/93c12f73043a2d14eea9d417ab080eb4/bin/iOSDeviceManager', CommandLine='launchsimulator -d C60585B5-A403-42A7-949F-BD2A6A9FAED8', CurrentDirectory='', Native error= Cannot find the specified file ----> System.ComponentModel.Win32Exception : ApplicationName='/var/folders/bn/4tfs58bs25pgyd54c3zcs80000gr/T/xdb/DeviceAgent.iOS.Dependencies/93c12f73043a2d14eea9d417ab080eb4/bin/iOSDeviceManager', CommandLine='launchsimulator -d C60585B5-A403-42A7-949F-BD2A6A9FAED8', CurrentDirectory='', Native error= Cannot find the specified file

    The referenced bin directory: /var/folders/bn/4tfs58bs25pgyd54c3zcs80000gr/T/xdb/DeviceAgent.iOS.Dependencies/93c12f73043a2d14eea9d417ab080eb4/bin exists, but is completely empty.

    I deleted the suggested folder: $TMPDIR/xdb

    The simulator now launches successfully, and the test runs correctly.

    Thursday, October 20, 2016 5:46 PM
  • User162787 posted

    I also ran into this and tried what @Soo-hongSuh did and it worked! Thanks!

    Tuesday, October 25, 2016 2:27 PM
  • User120247 posted

    I got this again today. Once again the referenced bin directory was empty. Again, deleting $TMPDIR/xdb addressed the issue. Forgot to mention, I do NOT have the latest stable IDE yet, we're locked down for this release.

    Tuesday, November 1, 2016 8:22 PM
  • User124099 posted

    Same here, stable version of XS and Xcode 8.1

    Monday, November 7, 2016 7:21 PM