dotnet / dotnet/macios

[CI] iOS monotouch app launches but never connects to XHarness

Open
#26,439 2 comments 0 reactions 0 assignees View on GitHub
ci-failure ci-postmortem tests
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 13h
Merged PRs (30d)
96

Description

## Summary

The iOS simulator monotouch test app intermittently launches but never connects to the XHarness test server. XHarness cancels the launch after three minutes and reports `LaunchTimedOut` after 15 minutes.

- Stable signature: `ios27-monotouch-harness-startup-timeout`
- Classification: genuinely flaky test / simulator startup failure
- Distinct monitored PRs: 2
- Confirmed occurrences: 4
- First observed by the monitor: 2026-08-12 02:31 UTC
- Latest observed: 2026-08-12 05:09 UTC

## Confirmed occurrences

- #26432, head `266d164665536f387afbf8717eea43781e28fdaf`, [build 14944204](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=14944204)
- Attempt 1: `Debug (PrepareAssemblies)` in `T: monotouch_ios` launched the app but never established the harness connection.
- Attempt 2: the same signature moved to `Debug (interpreter)`.
- Attempt 3: the same signature moved to `Release (interpreter)`.
- Attempt 4 succeeded; final retry accounting was 3 lifetime / 3 head requests.
- #26438, head `1c46ed7045bad084f46a529392b8d6ccf1fdb64b`
- [Build 14946633, attempt 1, `T: monotouch_ios`](https://devdiv.visualstudio.com/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_build/results?buildId=14946633&view=logs&jobId=a70ed34c-97c9-5ebb-c5be-8e2604f5ffcc)
- `Debug (PrepareAssemblies)` launched `com.xamarin.monotouch-test`, but the app never connected; XHarness logged `Test failed to start in 3 minutes` and ultimately `LaunchTimedOut`.

## Impact and investigation

The failing variation changes between attempts, while other variations in the same job pass. The app process is created successfully, but the test harness never receives a connection. This is not the NSUrlSession test hang and is not a deterministic product assertion failure.

## Workaround

Rerun only the failed `T: monotouch_ios` job after confirming the PR is conflict-free and retry budgets permit it. Azure logs and artifacts are retention-limited.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked Azure build logs for #26432 and #26438 and the XHarness entries around `LaunchTimedOut`, then compare the failing attempts with the successful retry. Trace the iOS monotouch harness startup path and determine why the app process does not connect; done means the cause is isolated and a validated fix prevents the intermittent timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, ios
Domain
ci-cd, mobile, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.