Forum Xamarin Test Cloud (Read Only)

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Calabash.XDB.Core.Exceptions.DeviceAgentException : Failed to launch simulator

When trying to run a test locally on an iOS simulator, the simulator is not launched and I get this error. Even if the simulator is open at the time of running the test, the simulator is closed and the test is failed.

SetUp : Calabash.XDB.Core.Exceptions.DeviceAgentException : Failed to launch simulator

ExitCode: 134
2016-12-20 16:46:45.523 iOSDeviceManager[1794:30565] CoreSimulator: Loading from /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework 
2016-12-20 16:46:45.527 iOSDeviceManager[1794:30565] CoreSimulator: Successfully loaded
2016-12-20 16:46:45.527 iOSDeviceManager[1794:30565] CoreSimulator: SimDevice has correct path of /Applications/Xcode.app
2016-12-20 16:46:45.527 iOSDeviceManager[1794:30565] SimulatorKit: Loading from /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework 
2016-12-20 16:46:45.534 iOSDeviceManager[1794:30565] SimulatorKit: Successfully loaded
2016-12-20 16:46:45.534 iOSDeviceManager[1794:30565] SimulatorKit: SimDeviceFramebufferService has correct path of /Applications/Xcode.app
2016-12-20 16:46:45.534 iOSDeviceManager[1794:30565] Loaded All Private Frameworks [CoreSimulator, SimulatorKit]
2016-12-20 16:46:45.568 iOSDeviceManager[1794:30565] Completed Pool Preconditons
2016-12-20 16:46:45.577 iOSDeviceManager[1794:30565] *** Assertion failure in -[FBSimulatorConfiguration initWithNamedDevice:os:auxillaryDirectory:], /Users/chrisf/FBSimulatorControl/FBSimulatorControl/Configuration/FBSimulatorConfiguration.m:32
2016-12-20 16:46:45.577 iOSDeviceManager[1794:30565] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: os'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff9e39648b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fffb2af8cad objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff9e39b192 +[NSException raise:format:arguments:] + 98
    3   Foundation                          0x00007fff9fdce390 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
    4   FBSimulatorControl                  0x0000000109ac8f3f -[FBSimulatorConfiguration initWithNamedDevice:os:auxillaryDirectory:] + 444
    5   FBSimulatorControl                  0x0000000109ac90a3 __48+[FBSimulatorConfiguration defaultConfiguration]_block_invoke + 108
    6   libdispatch.dylib                   0x00007fffb33a1128 _dispatch_client_callout + 8
    7   libdispatch.dylib                   0x00007fffb33a10e5 dispatch_once_f + 38
    8   FBSimulatorControl                  0x0000000109ac9034 +[FBSimulatorConfiguration defaultConfiguration] + 45
    9   FBSimulatorControl                  0x0000000109af6253 +[FBSimulatorConfiguration(CoreSimulator) inferSimulatorConfigurationFromDevice:error:] + 347
    10  FBSimulatorControl                  0x0000000109af057f +[FBSimulator fromSimDevice:configuration:launchdSimProcess:containerApplicationProcess:set:] + 178
    11  FBSimulatorControl                  0x0000000109af2157 -[FBSimulatorInflationStrategy inflateSimulators:availableDevices:previouslyIdentifiedContainerApplications:] + 810
    12  FBSimulatorControl                  0x0000000109af1db8 -[FBSimulatorInflationStrategy inflateFromDevices:exitingSimulators:] + 891
    13  FBSimulatorControl                  0x0000000109ad015d -[FBSimulatorSet allSimulators] + 129
    14  FBSimulatorControl                  0x0000000109ace5d5 -[FBSimulatorSet query:] + 108
    15  iOSDeviceManager                    0x00000001099589c1 +[Simulator simulatorWithDeviceID:] + 238
    16  iOSDeviceManager                    0x00000001099594f5 +[Simulator launchSimulator:] + 88
    17  iOSDeviceManager                    0x0000000109959ec7 +[LaunchSimulatorCommand execute:] + 74
    18  iOSDeviceManager                    0x0000000109954d4a +[CLI process:] + 1171
    19  iOSDeviceManager                    0x0000000109919504 main + 104
    20  libdyld.dylib                       0x00007fffb33d7255 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Answers

  • wackrowackro USUniversity

    Hi Chris - did you get anywhere with this? I've come up against the exact same error and have tried the following:

    Installing Xamarin test cloud agent in the iOS project
    Adding Xamarin.Calabash.Start() into AppDelegate.cs

    ... but no luck so far.

  • c.lamontc.lamont USUniversity ✭✭

    Hi Joe,

    I have been having a back and forward conversation with someone at Xamarin. I think he might still be on holiday at the moment so we have not resolved the issue.

    Using a simulator with iOS 9.0 does work for me, but only because it seems to restart quicker and is ready before the UI Test notices.

  • 15mgm1515mgm15 USMember ✭✭✭✭

    @wackro :open_mouth: I owe you a beer, thanks for this solution.

Sign In or Register to comment.