Appcenter: Unable to start UI Test on ios simulator

Created on 3 Apr 2019  Â·  47Comments  Â·  Source: microsoft/appcenter

What App Center service does this affect?
iOS Simulators

Describe the bug
I have a Xamarin UI test project with tests apps on iOS and Android simulators.
Recently I had to update xCode (to 10.2) and since the update I can no longer start the iOS app on the simulator from my UI Test project. I just get the error TestFixtureSetUp failed in "myTestProject”.

To Reproduce
The app is started as follows:

public override IApp StartApp(AppDataMode ClearAppData)
{
  return ConfigureApp
   .iOS
   .InstalledApp("myAppNAme")
   .DeviceIdentifier(123456-123456) 
   .PreferIdeSettings()
   .EnableLocalScreenshots()
   .WaitTimes(new WaitTimes())
   .Debug()
   .StartApp(ClearAppData);
}

And this command returns the following error/exception: Unable to determine simulator version for 123456-123456

Expected behavior
I expect the iOS simulator to be started. The simulator ID is good. I can see it listed when I list my iOS simulators. And it says that the simulator is Booted. This all worked fine before the xCode update.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS 10.14.4
  • Xamarin: 7.8.3
bug test

Most helpful comment

Same issue. I have performed a clean installation of the entire local development environment:
Visual Studio: v8.0 (build 3001)
xcode 10.2

App is created using default xamarin forms template.

All 47 comments

Having this same issue. Able to launch the simulator manually with no issues in VS for Mac but when launching a UITest VS displays the following:
SetUp : System.Exception : Unable to determine simulator version for 'X'

Visual Studio Enterprise 2019 for Mac
Version 8.0 (build 3001)
Xamarin.iOS
Version: 12.6.0.25 (Visual Studio Enterprise)
Operating System
Mac OS X 10.14.4
Xcode
Version 10.2 (10E125)

Same issue. I have performed a clean installation of the entire local development environment:
Visual Studio: v8.0 (build 3001)
xcode 10.2

App is created using default xamarin forms template.

We're experiencing the same issue. Attempting to run UITest locally results in the 'Unable to determine simulator version...' error for all iOS tests.

Hi @jpc1963, I am assuming this is an issue related to Visual Studio for Mac? We're in the Visual Studio family, but App Center is a different service that just so happens to support Xamarin. :-)

@pierceboggan can you help?

Yes, running Xamarin.UITest locally on a Mac, testing iOS builds. All of
the MS threads on this issue say to contact appcenter. No comments from
anyone at MS on the github issue either. Any help would be appreciated.
Thanks,

-Eli

On Fri, Apr 5, 2019, 4:45 PM Patrick Nikoletich notifications@github.com
wrote:

Hi @jpc1963 https://github.com/jpc1963, I am assuming this is an issue
related to Visual Studio for Mac? We're in the Visual Studio family, but
App Center is a different service that just so happens to support Xamarin.
:-)

@pierceboggan https://github.com/pierceboggan can you help?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/appcenter/issues/274#issuecomment-480453427,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADDAnk8JscMpxUCtKZtXswdTZ5aKRfTRks5vd-ApgaJpZM4cZzco
.

Hi @patniko can you elaborate why are you assuming that this is related to Visual Studio for Mac?

Isn't this more case of an issue with Xcode 10.2 as suggested in this thread -> https://stackoverflow.com/questions/55567333/ui-test-not-able-to-run-ios-ui-tests-unable-to-determine-simulator-version-fo

Here is the stacktrace:

at Xamarin.UITest.iOS.Instruments.GetMajorVersionForSimulator (System.String deviceIdentifier) [0x0008c] in <2a16c16730a54859bda72c6bc1c728f7>:0 
  at Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x0011a] in <2a16c16730a54859bda72c6bc1c728f7>: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) [0x00068] in <2a16c16730a54859bda72c6bc1c728f7>:0 
  at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x002af] in <2a16c16730a54859bda72c6bc1c728f7>:0 
  at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <2a16c16730a54859bda72c6bc1c728f7>:0 
  at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <2a16c16730a54859bda72c6bc1c728f7>:0 

@Oddj0b has Xamarin.UITest been updated to support XCode 10.2?

I've seen this problem using both Xcode 10.1 and Xcode 10.2.
It appears to be a problem with Xamarin.UITest incorrectly parsing the JSON output of xcrun simctl list devices --json.

I think Xamarin.UITest.iOS.Instruments.GetSimctlSimulators is expecting the "devices" keys to contains spaces, which it splits them on. This may have been a previous behavior. However, simctl seems to be returning keys that use dashes instead. Thus, the simulator version cannot be determined.

For instance,

> xcrun simctl list devices --json

{
  "devices" : {
    "com.apple.CoreSimulator.SimRuntime.watchOS-5-1" : [
      ...
    ],
    "com.apple.CoreSimulator.SimRuntime.tvOS-11-4" : [
      ...
    ],
    "com.apple.CoreSimulator.SimRuntime.watchOS-5-2" : [
      ...
    ],
    "com.apple.CoreSimulator.SimRuntime.iOS-11-4" : [
      ...
    ],
    "com.apple.CoreSimulator.SimRuntime.iOS-12-0" : [
      ...
    ],
    "com.apple.CoreSimulator.SimRuntime.watchOS-4-3" : [
      ...
    ],
    "com.apple.CoreSimulator.SimRuntime.iOS-12-1" : [
      ...
    ],
    "com.apple.CoreSimulator.SimRuntime.tvOS-12-0" : [
      ...
    ],
    "com.apple.CoreSimulator.SimRuntime.iOS-12-2" : [
      ...
    ],
    "com.apple.CoreSimulator.SimRuntime.watchOS-5-0" : [
      ...
    ],
    "com.apple.CoreSimulator.SimRuntime.tvOS-12-1" : [
      ...
    ],
    "com.apple.CoreSimulator.SimRuntime.tvOS-12-2" : [
      ...
    ]
  }
}

Hi @agaluzzi ,

Thanks to pointing at this direction. I can confirm that the json is in different format:

After Xcode10.2 installed:
"devices" : {
"com.apple.CoreSimulator.SimRuntime.iOS-12-1" : [
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone 5s",
"udid" : "9AC9332D-7DB0-4F2E-8615-61EE86E363CA",
"availabilityError" : ""
},

On machine with Xcode 10.1 installed:
"devices" : {
"iOS 12.1" : [
{
"state" : "Shutdown",
"isAvailable" : "YES",
"name" : "iPhone 5s",
"udid" : "2647F251-04A3-4DB8-8684-D66189869B42",
"availabilityError" : ""
},

So this seems to be intended change with Xcode 10.2 (inside the simctl):
https://openradar.appspot.com/radar?id=5058478808760320

I was able to get it back working like this:

  1. Downgrading to Xcode 10.1 - at this point it was still the wrong json format.
  2. Forcing simctl to reinstall by deleting the /Library/Developer directory. Important : This also deleted all of my simulators runtimes, so you ca try just deleting the subfolder that is related to the simctl (not tested).

@Oddj0b
When can we expect support for Xcode 10.2? Shouldn't you guys add the support when the Xcode becomes official or at least test with betas to make sure issues like this does not occur?

@Oddj0b and @patniko

Just to clarify why this is important:

Visual Studio 2019 (for Windows) requires Xcode 10.2 and therefore I should chose between VS 2019 or be able to run tests. Not been able to run and create tests is not an option for me and sadly I had to downgrade to Visual Studio 2017.
It's a shame that I am not able to use all of the goodies and Xamarin development improvements done in VS 2019 due to this issue.

VisualStudio_Xcode10 2

The newest Xamarin.UITest dev releases have added Xcode 10.2 support, from this version or newer: https://www.nuget.org/packages/Xamarin.UITest/2.2.7.2002-dev

Thank you Kent for letting me know about this. I should be back on that app project later today or tomorrow, will test the dev release then.

-Eli
On Apr 17 2019, at 8:38 am, Kent Green notifications@github.com wrote:

The newest Xamarin.UITest dev releases have added Xcode 10.2 support, from this version or newer: https://www.nuget.org/packages/Xamarin.UITest/2.2.7.2002-dev (https://link.getmailspring.com/link/[email protected]/0?redirect=https%3A%2F%2Fwww.nuget.org%2Fpackages%2FXamarin.UITest%2F2.2.7.2002-dev&recipient=cmVwbHkrMDAzMGMwOWVlNDEzODc3OWZjMWY1MWU4NGQ5OGZkYzIxNzJjZGQ2MTI3ZmVlMWNhOTJjZWJhYzQ3YWZiOTJhMTY5Y2UxOThjMDhkZkByZXBseS5naXRodWIuY29t)

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub (https://link.getmailspring.com/link/[email protected]/1?redirect=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fappcenter%2Fissues%2F274%23issuecomment-484142559&recipient=cmVwbHkrMDAzMGMwOWVlNDEzODc3OWZjMWY1MWU4NGQ5OGZkYzIxNzJjZGQ2MTI3ZmVlMWNhOTJjZWJhYzQ3YWZiOTJhMTY5Y2UxOThjMDhkZkByZXBseS5naXRodWIuY29t), or mute the thread (https://link.getmailspring.com/link/[email protected]/2?redirect=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADDAns6tLau7olvNqJvYI_uSfjCWk09Zks5vhz_7gaJpZM4cZzco&recipient=cmVwbHkrMDAzMGMwOWVlNDEzODc3OWZjMWY1MWU4NGQ5OGZkYzIxNzJjZGQ2MTI3ZmVlMWNhOTJjZWJhYzQ3YWZiOTJhMTY5Y2UxOThjMDhkZkByZXBseS5naXRodWIuY29t).

@zanycadence Did it work?

Yep, after I updated to the pre-release 3.0.0-dev23 package, it works on iOS now

I installed 3.0.0-dev23 and its working ok now. I can start my ios tests ok.

As a closing remark version 3.0.0 the final version have been released.

This seems to be an issue again with the release of xcode 11. The format looks the same as the new json format above, so I'm not sure what the cause is.

@Oddj0b

I can confirm! After upgrading to Xcode 11 the Simulator cannot be started and I am getting the following exception:
Xamarin.UITest.XDB.Exceptions.DeviceAgentException has been thrown

Failed to launch simulator

ExitCode: 134
0 CoreFoundation 0x00007fff336ebc23 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff69cb2883 objc_exception_throw + 48
10 FBSimulatorControl 0x0000000102916576 +[FBSimulator fromSimDevice:configuration:launchdSimProcess:containerApplicationProcess:set:] + 598
11 FBSimulatorControl 0x0000000102919aad -[FBSimulatorInflationStrategy inflateSimulators:availableDevices:previouslyIdentifiedContainerApplications:] + 1085
12 FBSimulatorControl 0x0000000102919588 -[FBSimulatorInflationStrategy inflateFromDevices:exitingSimulators:] + 1208
13 FBSimulatorControl 0x00000001028de7f1 -[FBSimulatorSet allSimulators] + 145
14 FBSimulatorControl 0x00000001028dc08d -[FBSimulatorSet query:] + 173
15 iOSDeviceManager 0x00000001026b915f +[Simulator withID:] + 246
16 iOSDeviceManager 0x00000001026b162e +[Device withID:] + 118
17 iOSDeviceManager 0x00000001026b4a59 +[Command simulatorFromArgs:] + 163
18 iOSDeviceManager 0x00000001026c0d37 +[LaunchSimulatorCommand execute:] + 20
19 iOSDeviceManager 0x00000001026b7478 +[CLI process:] + 1110
2 CoreFoundation 0x00007fff33775865 -[NSObject(NSObject) __retain_OA] + 0
20 iOSDeviceManager 0x00000001026a28f1 main + 121
21 libdyld.dylib 0x00007fff6affd2f5 start + 1
22 ??? 0x0000000000000004 0x0 + 4
3 CoreFoundation 0x00007fff3369200e ___forwarding___ + 1427
4 CoreFoundation 0x00007fff336919e8 _CF_forwarding_prep_0 + 120
5 FBSimulatorControl 0x0000000102903ad9 -[FBCoreSimulatorNotifier initWithNotifier:queue:block:] + 377
6 FBSimulatorControl 0x00000001029037cc +[FBCoreSimulatorNotifier notifierForSimDevice:queue:block:] + 188
7 FBSimulatorControl 0x00000001029123fb -[FBSimulatorEventRelay createNotifierForSimDevice:] + 251
8 FBSimulatorControl 0x0000000102910902 -[FBSimulatorEventRelay initWithSimDevice:launchdProcess:containerApplication:processFetcher:queue:sink:] + 594
9 FBSimulatorControl 0x0000000102916ba2 -[FBSimulator attachEventSinkCompositionWithLaunchdSimProcess:containerApplicationProcess:] + 754
(
)
* First throw call stack:
2019-10-03 10:00:28.279 iOSDeviceManager[42655:20062056] -[SimDeviceNotificationManager registerNotificationHandler:]: unrecognized selector sent to instance 0x7faf4042dcc0
2019-10-03 10:00:28.594 iOSDeviceManager[42655:20062056] *
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SimDeviceNotificationManager registerNotificationHandler:]: unrecognized selector sent to instance 0x7faf4042dcc0'
libc++abi.dylib: terminating with uncaught exception of type NSException

@KthProg & @GeorgeDarakchiev Xamarin.UITest 3.0.4-dev2, released 4 days ago, notes:

Adds fix for simulator selection when Xcode 11 tooling has been installed

I recommend trying that version to see if it addresses the issue.

Source: https://www.nuget.org/packages/Xamarin.UITest/3.0.4-dev2

@King-of-Spades

It seems that after upgrading to Xcode 11.1 this is broken again, I am using the 3.0.4-dev2 version, and I get this strange error. Notice the absolute file path for a developer named Ivan, and the mention of the iPhone 6 simulator which isn't even available for iOS 13.

Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to launch simulator

ExitCode: 134
    0   CoreFoundation                      0x00007fff4237e2fd __exceptionPreprocess + 256
    1   libobjc.A.dylib                     0x00007fff6ca78a17 objc_exception_throw + 48
    10  FBSimulatorControl                  0x0000000109505457 +[FBSimulator fromSimDevice:configuration:launchdSimProcess:containerApplicationProcess:set:] + 311
    11  FBSimulatorControl                  0x0000000109508aad -[FBSimulatorInflationStrategy inflateSimulators:availableDevices:previouslyIdentifiedContainerApplications:] + 1085
    12  FBSimulatorControl                  0x0000000109508588 -[FBSimulatorInflationStrategy inflateFromDevices:exitingSimulators:] + 1208
    13  FBSimulatorControl                  0x00000001094cd6f1 -[FBSimulatorSet allSimulators] + 145
    14  FBSimulatorControl                  0x00000001094caf8d -[FBSimulatorSet query:] + 173
    15  iOSDeviceManager                    0x00000001092a5e8b +[Simulator withID:] + 246
    16  iOSDeviceManager                    0x000000010929e300 +[Device withID:] + 118
    17  iOSDeviceManager                    0x00000001092a172b +[Command simulatorFromArgs:] + 163
    18  iOSDeviceManager                    0x00000001092adacc +[LaunchSimulatorCommand execute:] + 20
    19  iOSDeviceManager                    0x00000001092a4171 +[CLI process:] + 1111
    2   CoreFoundation                      0x00007fff42399016 +[NSException raise:format:arguments:] + 98
    20  iOSDeviceManager                    0x000000010928f539 main + 121
    21  libdyld.dylib                       0x00007fff6e2463d5 start + 1
    3   Foundation                          0x00007fff44638791 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
    4   FBSimulatorControl                  0x00000001094c561e +[FBSimulatorConfiguration makeDefaultConfiguration] + 558
    5   FBSimulatorControl                  0x00000001094c53a4 __48+[FBSimulatorConfiguration defaultConfiguration]_block_invoke + 36
    6   libdispatch.dylib                   0x00007fff6e1f963d _dispatch_client_callout + 8
    7   libdispatch.dylib                   0x00007fff6e1fad4b _dispatch_once_callout + 20
    8   FBSimulatorControl                  0x00000001094c5358 +[FBSimulatorConfiguration defaultConfiguration] + 136
    9   FBSimulatorControl                  0x000000010950beb0 +[FBSimulatorConfiguration(CoreSimulator) inferSimulatorConfigurationFromDevice:error:] + 704
(
)
*** First throw call stack:
2019-10-09 12:01:54.629 iOSDeviceManager[16737:439713] *** Assertion failure in +[FBSimulatorConfiguration makeDefaultConfiguration], /Users/Ivan/Documents/repos/Xamarin.UITest/FBSimulatorControl/FBSimulatorControl/Configuration/FBSimulatorConfiguration.m:65
2019-10-09 12:01:54.630 iOSDeviceManager[16737:439713] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not obtain OS for Default Device 'Model 'iPhone 6''. Available OS Versions []'
libc++abi.dylib: terminating with uncaught exception of type NSException

hmm...unfortunately even Xcode minor updates have tended to break the simulator connection sometimes, so probably it will need _another_ update for 11.0 -> 11.1

At the time of my original comment I was only thinking about the first release of Xcode 11, not minor versions afterwards.

I am facing the same issue although I have updated my package Xamarin UITest to 3.0.4 dev2

I am using VS 2017 8.3.4
Xcode 11.1OneTimeSetUp: Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to launch simulator

ExitCode: 134
0 CoreFoundation 0x00007fff35634d63 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff6b523bd4 objc_exception_throw + 48
10 FBSimulatorControl 0x000000010b9ed457 +[FBSimulator fromSimDevice:configuration:launchdSimProcess:containerApplicationProcess:set:] + 311
11 FBSimulatorControl 0x000000010b9f0aad -[FBSimulatorInflationStrategy inflateSimulators:availableDevices:previouslyIdentifiedContainerApplications:] + 1085
12 FBSimulatorControl 0x000000010b9f0588 -[FBSimulatorInflationStrategy inflateFromDevices:exitingSimulators:] + 1208
13 FBSimulatorControl 0x000000010b9b56f1 -[FBSimulatorSet allSimulators] + 145
14 FBSimulatorControl 0x000000010b9b2f8d -[FBSimulatorSet query:] + 173
15 iOSDeviceManager 0x000000010b791e8b +[Simulator withID:] + 246
16 iOSDeviceManager 0x000000010b78a300 +[Device withID:] + 118
17 iOSDeviceManager 0x000000010b78d72b +[Command simulatorFromArgs:] + 163
18 iOSDeviceManager 0x000000010b799acc +[LaunchSimulatorCommand execute:] + 20
19 iOSDeviceManager 0x000000010b790171 +[CLI process:] + 1111
2 CoreFoundation 0x00007fff356505f0 +[NSException raise:format:arguments:] + 88
20 iOSDeviceManager 0x000000010b77b539 main + 121
21 libdyld.dylib 0x00007fff6c882405 start + 1
3 Foundation 0x00007fff37d28bc1 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 FBSimulatorControl 0x000000010b9ad61e +[FBSimulatorConfiguration makeDefaultConfiguration] + 558
5 FBSimulatorControl 0x000000010b9ad3a4 __48+[FBSimulatorConfiguration defaultConfiguration]_block_invoke + 36
6 libdispatch.dylib 0x00007fff6c8324de _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff6c833656 _dispatch_once_callout + 20
8 FBSimulatorControl 0x000000010b9ad358 +[FBSimulatorConfiguration defaultConfiguration] + 136
9 FBSimulatorControl 0x000000010b9f3eb0 +[FBSimulatorConfiguration(CoreSimulator) inferSimulatorConfigurationFromDevice:error:] + 704

@KthProg & @GeorgeDarakchiev Xamarin.UITest 3.0.4-dev2, released 4 days ago, notes:

Adds fix for simulator selection when Xcode 11 tooling has been installed

I recommend trying that version to see if it addresses the issue.

Source: https://www.nuget.org/packages/Xamarin.UITest/3.0.4-dev2

Get a different failure with Xamarin.UITest 3.0.3 and 3.0.4-dev2, some weird path with Ivan in it and hard-coded to an iOS 6 simulator.

@KthProg & @GeorgeDarakchiev Xamarin.UITest 3.0.4-dev2, released 4 days ago, notes:

Adds fix for simulator selection when Xcode 11 tooling has been installed

I recommend trying that version to see if it addresses the issue.
Source: https://www.nuget.org/packages/Xamarin.UITest/3.0.4-dev2

Get a different failure with Xamarin.UITest 3.0.3 and 3.0.4-dev2, some weird path with Ivan in it and hard-coded to an iOS 6 simulator.

same for me as well

Can you share that failure output?

It looked exactly like what you posted above, @King-of-Spades, when using Xamarin.UITest 3.0.4-dev2 w/ Visual Studio for Mac, Community Edition.

With Xamarin.UITest up to v3.0.0 I get the same error output as posted by @GeorgeDarakchiev above, right down to the address (?) string "0x7faf4042dcc0".

This is all when launching an already compiled Xamarin.UITest on an iOS device simulator target.

@King-of-Spades

It seems that after upgrading to Xcode 11.1 this is broken again, I am using the 3.0.4-dev2 version, and I get this strange error. Notice the absolute file path for a developer named Ivan, and the mention of the iPhone 6 simulator which isn't even available for iOS 13.

Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to launch simulator

ExitCode: 134
  0   CoreFoundation                      0x00007fff4237e2fd __exceptionPreprocess + 256
  1   libobjc.A.dylib                     0x00007fff6ca78a17 objc_exception_throw + 48
  10  FBSimulatorControl                  0x0000000109505457 +[FBSimulator fromSimDevice:configuration:launchdSimProcess:containerApplicationProcess:set:] + 311
  11  FBSimulatorControl                  0x0000000109508aad -[FBSimulatorInflationStrategy inflateSimulators:availableDevices:previouslyIdentifiedContainerApplications:] + 1085
  12  FBSimulatorControl                  0x0000000109508588 -[FBSimulatorInflationStrategy inflateFromDevices:exitingSimulators:] + 1208
  13  FBSimulatorControl                  0x00000001094cd6f1 -[FBSimulatorSet allSimulators] + 145
  14  FBSimulatorControl                  0x00000001094caf8d -[FBSimulatorSet query:] + 173
  15  iOSDeviceManager                    0x00000001092a5e8b +[Simulator withID:] + 246
  16  iOSDeviceManager                    0x000000010929e300 +[Device withID:] + 118
  17  iOSDeviceManager                    0x00000001092a172b +[Command simulatorFromArgs:] + 163
  18  iOSDeviceManager                    0x00000001092adacc +[LaunchSimulatorCommand execute:] + 20
  19  iOSDeviceManager                    0x00000001092a4171 +[CLI process:] + 1111
  2   CoreFoundation                      0x00007fff42399016 +[NSException raise:format:arguments:] + 98
  20  iOSDeviceManager                    0x000000010928f539 main + 121
  21  libdyld.dylib                       0x00007fff6e2463d5 start + 1
  3   Foundation                          0x00007fff44638791 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
  4   FBSimulatorControl                  0x00000001094c561e +[FBSimulatorConfiguration makeDefaultConfiguration] + 558
  5   FBSimulatorControl                  0x00000001094c53a4 __48+[FBSimulatorConfiguration defaultConfiguration]_block_invoke + 36
  6   libdispatch.dylib                   0x00007fff6e1f963d _dispatch_client_callout + 8
  7   libdispatch.dylib                   0x00007fff6e1fad4b _dispatch_once_callout + 20
  8   FBSimulatorControl                  0x00000001094c5358 +[FBSimulatorConfiguration defaultConfiguration] + 136
  9   FBSimulatorControl                  0x000000010950beb0 +[FBSimulatorConfiguration(CoreSimulator) inferSimulatorConfigurationFromDevice:error:] + 704
(
)
*** First throw call stack:
2019-10-09 12:01:54.629 iOSDeviceManager[16737:439713] *** Assertion failure in +[FBSimulatorConfiguration makeDefaultConfiguration], /Users/Ivan/Documents/repos/Xamarin.UITest/FBSimulatorControl/FBSimulatorControl/Configuration/FBSimulatorConfiguration.m:65
2019-10-09 12:01:54.630 iOSDeviceManager[16737:439713] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not obtain OS for Default Device 'Model 'iPhone 6''. Available OS Versions []'
libc++abi.dylib: terminating with uncaught exception of type NSException

exactly the same @King-of-Spades

Notice the absolute file path for a developer named Ivan

That is a red herring. This path does not affect the runtime.

It seems that after upgrading to Xcode 11.1 this is broken again

We are working on a fix.

That is great news, thank you! Looking forward to the fix. Uninstalling
Xcode is a PITA, and the side-by-side install seems to always use the
simulator stuff from whatever the latest version Xcode is, regardless of
install order.

Stuart

On Tue, Oct 22, 2019 at 8:47 AM Joshua Moody notifications@github.com
wrote:

Notice the absolute file path for a developer named Ivan

That is a red herring. This path does not affect the runtime.

It seems that after upgrading to Xcode 11.1 this is broken again

We are working on a fix.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/appcenter/issues/274?email_source=notifications&email_token=AARORV2PST2VQG7EIVOZPYTQP3Y5JA5CNFSM4HDHG4UKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB5S6MQ#issuecomment-544943922,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARORV3FUKRVIS7W3PEN6ZLQP3Y5JANCNFSM4HDHG4UA
.

Hello, I'm also experiencing the same issue @j-hat posted. Is this still currently being worked on? I am on 3.0.4-dev2 version

@nathanjhill1 In the meantime, downgrade XCode to 11.0 and use 3.0.4-dev2 to continue using UI tests.

I downgraded XCode to 10.3, it works fine with Xamrin UI Test 3.0.3 version.

The latest Xamarin.UITest dev release fixes this problem (released over the weekend).

It works for me, thanks!

I'm getting a "failed to start simulator" error now

Hi,
Although the latest release resolved the problem on iOS, it's creating problems on Android. it's throwing error
Message: System.ObjectDisposedException : Cannot access a disposed object.
Object name: 'System.Net.Http.StringContent'.

This doesn't appear on 3.0,3 on Android but it doesn't support iOS

Hi @vk-s78
I am having the same issue and I have reported it here, but so far no news about it.
@Oddj0b Should we log this as a separate issue?

@GeorgeDarakchiev I'm talking with the engineering team about it right now.

@vk-s78 and @GeorgeDarakchiev - I have a fix locally and a PR ready for review (it'll probably get reviewed tomorrow). As soon as it's ready I'll push out another dev release.

3.0.4-dev6 has been released and includes the ObjectDisposedException fix

3.0.4-dev6 has been released and includes the ObjectDisposedException fix

Thank you.It's working as expected both on iOS and Android

Android works as expected but I can't make it work on iOS.

System.Exception : /usr/bin/xcrun simctl list devices --json
Exit Code: 72
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH

Stack Trace
  at Xamarin.UITest.iOS.Instruments.GetSimctlSimulators () [0x00082] in <860ca75af2c340b2b83917a80a0392bf>:0 
  at Xamarin.UITest.iOS.Instruments.EnsureNoOthersRunning (System.String deviceIdentifier) [0x00000] in <860ca75af2c340b2b83917a80a0392bf>:0 
  at Xamarin.UITest.iOS.iOSAppLauncher.GetOrValidateSimId (Xamarin.UITest.iOS.Instruments instruments, System.String deviceIdentifier) [0x00071] in <860ca75af2c340b2b83917a80a0392bf>:0 
  at Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x00113] in <860ca75af2c340b2b83917a80a0392bf>: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) [0x00068] in <860ca75af2c340b2b83917a80a0392bf>:0 
  at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x0026f] in <860ca75af2c340b2b83917a80a0392bf>:0 
  at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <860ca75af2c340b2b83917a80a0392bf>:0 
  at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <860ca75af2c340b2b83917a80a0392bf>:0 
  at pos.UITests.AppInitializer.StartApp (Xamarin.UITest.Platform platform) [0x00022] in /Users/developer/Documents/Side Hustle/pos/pos.UITests/AppInitializer.cs:18 
  at pos.UITests.MainPageUITest.BeforeEachTest () [0x00001] in /Users/developer/Documents/Side Hustle/pos/pos.UITests/MainPageUITest.cs:23 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-06/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395 

Visual Studio for Mac 8.3.9 (build 2)
Xamarin.Forms 4.3.0.991211
Xamarin.UITest 3.0.4-dev6
Xcode 11.2.1 (11B500)

It's working fine on Xcode 11.1

On Fri, Nov 22, 2019 at 9:36 AM axearcenas notifications@github.com wrote:

Android works as expected but I can't make it work on iOS.

System.Exception : /usr/bin/xcrun simctl list devices --json
Exit Code: 72
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH

Stack Trace
at Xamarin.UITest.iOS.Instruments.GetSimctlSimulators () [0x00082] in <860ca75af2c340b2b83917a80a0392bf>:0
at Xamarin.UITest.iOS.Instruments.EnsureNoOthersRunning (System.String deviceIdentifier) [0x00000] in <860ca75af2c340b2b83917a80a0392bf>:0
at Xamarin.UITest.iOS.iOSAppLauncher.GetOrValidateSimId (Xamarin.UITest.iOS.Instruments instruments, System.String deviceIdentifier) [0x00071] in <860ca75af2c340b2b83917a80a0392bf>:0
at Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x00113] in <860ca75af2c340b2b83917a80a0392bf>: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) [0x00068] in <860ca75af2c340b2b83917a80a0392bf>:0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x0026f] in <860ca75af2c340b2b83917a80a0392bf>:0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <860ca75af2c340b2b83917a80a0392bf>:0
at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <860ca75af2c340b2b83917a80a0392bf>:0
at pos.UITests.AppInitializer.StartApp (Xamarin.UITest.Platform platform) [0x00022] in /Users/developer/Documents/Side Hustle/pos/pos.UITests/AppInitializer.cs:18
at pos.UITests.MainPageUITest.BeforeEachTest () [0x00001] in /Users/developer/Documents/Side Hustle/pos/pos.UITests/MainPageUITest.cs:23
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-06/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395

Visual Studio for Mac 8.3.9 (build 2)
Xamarin.Forms 4.3.0.991211
Xamarin.UITest 3.0.4-dev6
Xcode 11.2.1 (11B500)

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/appcenter/issues/274?email_source=notifications&email_token=ANQNPEBLWNZHBEK4MHRUUT3QU6R3XA5CNFSM4HDHG4UKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE5DDZI#issuecomment-557461989,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANQNPEGYXNJHWZU4G3NNHWTQU6R3XANCNFSM4HDHG4UA
.

Updated to Xamarin.UITest 3.0.4 and iOS is still not working. I will now try to downgrade Xcode to 11.1.

This fixed my issue without downgrading Xcode https://stackoverflow.com/questions/29108172/xcrun-unable-to-find-simctl

Unable to launch iOS simulator and run test cases.
Below are my system details.

=== Visual Studio Community 2019 for Mac ===

Version 8.6.4 (build 14)
Installation UUID: 205509e2-57ca-48b2-af5a-9b76eb394103
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

Package version: 610000104

=== Mono Framework MDK ===

Runtime:
Mono 6.10.0.104 (2019-12/5d03a6fe116) (64-bit)
Package version: 610000104

=== Roslyn (Language Service) ===

3.6.0-3.20210.9+4eafdcb1bcbd8d3573f2ba6065e56d9b9ce4f8a3

=== NuGet ===

Version: 5.6.0.6591

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/3.1.301/Sdks
SDK Versions:
3.1.301
3.1.200
2.1.503
2.1.302
2.1.301
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
3.1.5
3.1.2
2.1.19
2.1.16
2.1.7
2.1.2
2.1.1

=== Xamarin.Profiler ===

Version: 1.6.13.11
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 11.5 (16139)
Build 11E608c

=== Xamarin.Mac ===

Version: 6.18.2.1 (Visual Studio Community)
Hash: 29c4ea731
Branch: d16-6
Build date: 2020-05-26 17:03:04-0400

=== Xamarin.iOS ===

Version: 13.18.2.1 (Visual Studio Community)
Hash: 29c4ea731
Branch: d16-6
Build date: 2020-05-26 17:03:05-0400

=== Xamarin Designer ===

Version: 16.6.0.329
Hash: d4f8bcd13
Branch: remotes/origin/d16-6
Build date: 2020-04-24 02:16:02 UTC

=== Xamarin.Android ===

Version: 10.3.1.4 (Visual Studio Community)
Commit: xamarin-android/d16-6/3a10de9
Android SDK: /Users/MP-07/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
5.1 (API level 22)
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.5
SDK Build Tools Version: 29.0.2

Build Information:
Mono: 165f4b0
Java.Interop: xamarin/java.interop/d16-6@2cab35c
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.31.1@49232bc
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-6@bfb66f3

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/MP-07/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.6.0.50
Hash: 5901879
Branch: remotes/origin/d16-6
Build date: 2020-05-15 00:43:06 UTC

=== Android Device Manager ===

Version: 16.6.0.95
Hash: 45d17b5
Branch: remotes/origin/d16-6
Build date: 2020-05-15 00:43:26 UTC

=== Build Information ===

Release ID: 806040014
Git revision: b22fa17f4309e67d2f254d93f02d17613cf6ef6c
Build date: 2020-06-15 10:43:44-04
Build branch: release-8.6
Xamarin extensions: b22fa17f4309e67d2f254d93f02d17613cf6ef6c

=== Operating System ===

Mac OS X 10.15.5
Darwin 19.5.0 Darwin Kernel Version 19.5.0
Tue May 26 20:41:44 PDT 2020
root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64

I am using Xamarin.UITest 3.0.7.

Please give me any idea about this if anyone resolves that and able to work.

Was this page helpful?
0 / 5 - 0 ratings