Skip to content

[testing] Random failures on CI iOS device tests: app fails to start after install with xharness #30795

@rmarinho

Description

@rmarinho

Description

We're experiencing random failures on CI device tests for iOS. After installing the app on the simulator using xharness, the app fails to start.

Failed build log excerpt:

dbug: Xamarin.Hosting: Simulator device failed to launch com.microsoft.maui.essentials.devicetests.
dbug: Underlying error (domain=FBSOpenApplicationServiceErrorDomain, code=4):
dbug: The request to open "com.microsoft.maui.essentials.devicetests" failed.
dbug: error HE0042: Could not launch the app 'com.microsoft.maui.essentials.devicetests' on the device 'iOS 18.5 (22F77) - iPhone Xs': simctl returned exit code 4
dbug: Test run failed
dbug: Could not find pid in mtouch output.

This seems to be intermittent, as the same machine can have both good and bad runs. Please investigate possible causes for the simulator app launch failure after install, and if there are any known workarounds or fixes for this scenario.

Steps to Reproduce

  1. Run CI device tests for iOS with xharness.
  2. The app installs on simulator, but fails to launch.
  3. Observe failure on random runs; other runs on same machine succeed.
  4. See provided build links for detailed logs.

Is this a regression from previous behavior?

Not sure, did not test other versions

Affected platforms

iOS

Affected platform versions

iOS 18.5 (22F77) - iPhone Xs

Relevant log output

dbug: Xamarin.Hosting: Simulator device failed to launch com.microsoft.maui.essentials.devicetests.
dbug: Underlying error (domain=FBSOpenApplicationServiceErrorDomain, code=4):
dbug: The request to open "com.microsoft.maui.essentials.devicetests" failed.
dbug: error HE0042: Could not launch the app 'com.microsoft.maui.essentials.devicetests' on the device 'iOS 18.5 (22F77) - iPhone Xs': simctl returned exit code 4
dbug: Test run failed
dbug: Could not find pid in mtouch output.

More logs

CoreSimulator_2B700A95-6B62-415D-90DB-7B0BC510A9D9_2025-07-23-11-59-11.zip
DiagnosticReports_2B700A95-6B62-415D-90DB-7B0BC510A9D9_2025-07-23-11-59-11.zip

test-results.zip

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions