Repository navigation
test: ignore App Hang events in the iOS Crash Capture lookup - #2899
Draft
bitsandfoxes wants to merge 1 commit into
Draft
bitsandfoxes wants to merge 1 commit into
bitsandfoxes wants to merge 1 commit into
Conversation
bitsandfoxes
force-pushed
the
ci/crash-capture-filter
branch
from
October 25, 2026 08:07
fb38f48 to
c94361d
Compare
bitsandfoxes
force-pushed
the
chore/ci-fail-fast
branch
from
October 26, 2026 02:53
29d8750 to
aefa02c
Compare
bitsandfoxes
force-pushed
the
ci/crash-capture-filter
branch
from
October 26, 2026 03:26
c94361d to
848f8eb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The iOS Crash Capture integration test now ignores App Hang events when it looks up the crash event by its
test.crash_idtag.The test app enables app-hang tracking with a 2 s timeout. That applies to every scenario, so a crash run can produce a hang too. On a slow simulator, sentry-cocoa reports an
App Hang Non Fully Blockedevent (mechanism.type = AppHang, levelerror) about a second before the forced crash. By then the crash tag is already on the scope, so Sentry ends up with two events for the tag. The lookup expects exactly one: it polls for the full 300 s and fails with "Expected 1, but got 2", and the job has to be rerun on macOS. In the last 30 days, Sentry received 15 of these hang events tagged with a crash ID, all from iOS. This was the most common test flake in the CI analysis: 13 failed Run iOS jobs in the window that still has logs.How it works:
Get-SentryTestEventin app-runner takes a-Filterscriptblock (feat: Add Filter parameter to Get-SentryTestEvent app-runner#63). The filter runs on the tag lookup's results before the count check.mechanism.typeAppHang. It reads the fields throughGet-EventProperty/Get-EventList, so an event without an exception doesn't break the lookup under StrictMode. That event passes the filter and still counts.Get-EventPropertyreads dictionary keys now. The Sentry API client parses responses withConvertFrom-Json -AsHashtable, so everything below the top level of an event is a hashtable, andPSObject.Propertiesdoesn't list hashtable keys. Without this, the filter would have read$nullfor every event and dropped nothing. It also fixesWrite-EventDiagnostics, which has always reported "no exception stack trace frames" for the same reason.The
modules/app-runnerbump goes from 63d8c36 to the app-runner commit above. It also pulls in 24 commits from app-runner main: SauceLabs retries, device power reporting, no-op provider commands, and new Sentry API helpers for attachments, spans, replays and feedback. The power-reporting and no-op changes (getsentry/app-runner#60, #61) go through the command path thatConnect-Device,Install-DeviceApp,Invoke-DeviceAppandDisconnect-Deviceuse for every provider, so this PR's CI run is also the check for those.App-hang tracking stays on during the crash scenario. The App Hang tests only run on Desktop and Android, where the in-proc watchdog is driven by the C# heartbeat, and they need the 2 s timeout (the app blocks the main thread for 5 s). On Android the NDK app-hang settings get written into the manifest at build time, so turning tracking off for one action at runtime wouldn't apply evenly across platforms. Running the crash with hang tracking on also matches how users run the SDK.
CI:
Utils_CUSTOM_ForceCrash, andApp Hang Fully Blocked(mechanism: AppHang) 1–2 s before it, both tagged with the crash ID. All four Run iOS jobs passed, 57/57 each. Without the filter, that pair is the "Expected 1, but got 2" failure. The run's one red job was an unrelated editor kill in Build Linux 6000.6 (Killedduring assembly reload, in "Add Sentry to the project").Rebased onto #2907: run 40264124350 failed Run iOS 6000.6 runtime on a sentry.io 503 for the crash envelope (fixed in #2911) and Run Android 2021.3 buildtime on an app that never initialised (fixed in #2901), then passed on a rerun of the failed jobs.
🤖 Generated with Claude Code