Reporting bugs on Xamarin.UITest - Unable to determine simulator version for simulator on iOS 12

MichaelFinkMichaelFink DEMember ✭✭

Hello,
I'm not sure where to report a bug on the Xamarin.UITest framework. The sub-forum for Xamarin Test Cloud is already closed, so I try here. I didn't find an open source project for Xamarin.UITest, so I suppose it's a closed source project.

I recently upgraded the Xamarin.UITest NuGet package to 2.2.6 in order to support iOS 12 and Xcode 10. When running UI tests using the nunit console and specifying an App Bundle, the following error appears:

System.Exception : Unable to determine simulator version for 54CC78A3-B480-4A87-A545-56D1F6578ABD
at Xamarin.UITest.iOS.Instruments.GetMajorVersionForSimulator (System.String deviceIdentifier) [0x0008c] in <5715f3ee90a14a2f80dc9b243ed6375e>:0
at Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x0011a] in <5715f3ee90a14a2f80dc9b243ed6375e>: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 <5715f3ee90a14a2f80dc9b243ed6375e>:0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x002af] in <5715f3ee90a14a2f80dc9b243ed6375e>:0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <5715f3ee90a14a2f80dc9b243ed6375e>:0
at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <5715f3ee90a14a2f80dc9b243ed6375e>:0

54CC78A3-B480-4A87-A545-56D1F6578ABD is the iPhone XR simulator using iOS 12. My startup code looks like this:

        iOSApp app = ConfigureApp
            .iOS
            .Debug()
            .PreferIdeSettings() // when in VS, use selected device
            .DeviceIdentifier("54CC78A3-B480-4A87-A545-56D1F6578ABD") // else use device ID...
            .AppBundle(appBundlePath) // ...and use app bundle
            .EnableLocalScreenshots()
            .StartApp(Xamarin.UITest.Configuration.AppDataMode.Clear);

Apparently something changed between Xcode 9 and 10.

Where can I report this bug? Maybe someone can open an internal bug?

Thanks!
Michael``````````

Best Answer

  • MichaelFinkMichaelFink DE ✭✭
    Accepted Answer

    For anyone also getting this message: It turned out that the device identifiers for simulators are per-user, not per-machine. In my case I used device identifiers from "xcrun instruments -s devices" from one user, and I let the UI tests run in a user tied to my Jenkins build node.

Answers

  • MichaelFinkMichaelFink DEMember ✭✭
    Accepted Answer

    For anyone also getting this message: It turned out that the device identifiers for simulators are per-user, not per-machine. In my case I used device identifiers from "xcrun instruments -s devices" from one user, and I let the UI tests run in a user tied to my Jenkins build node.

  • sudhirvsudhirv University

    Hello, I am facing the same issue while running the test from teamcity agent with my machine as the build machine. But when I run the test in my machine without directly, it's working.

    "It turned out that the device identifiers for simulators are per-user, not per-machine. In my case I used device identifiers from "xcrun instruments -s devices" from one user, and I let the UI tests run in a user tied to my Jenkins build node."
    Not getting the above statement.

    What did you do to come out of the error ? Could you please explain ?

  • sudhirvsudhirv University

    Hello All, Ok. I got the issue. Let me describe this clearly for others benefit.

    1. I was passing the one of the device ids I got by running 'xcrun simctl list devices --json'
    2. But I realised that teamcity was running commands with admin privileges in the agent.
    3. So I ran the command 'sudo My team city runs with admin privileges on the build agent'
    4. The results from #1 and #3 mentioned above were fully different.
    5. So from teamcity I passed one of the device ids I got by running 'sudo xcrun simctl list devices --json' and this issue got solved.

    This is what MichaelFink mentioned in his comment "It turned out that the device identifiers for simulators are per-user, not per-machine"

Sign In or Register to comment.