Skip to content

[DRAFT] test(e2e): iOS crash-handler screenshot no-freeze regression check - #6839

Draft
antonis wants to merge 3 commits into
mainfrom
test/ios-crash-screenshot-freeze-check
Draft

antonis wants to merge 3 commits into
mainfrom
test/ios-crash-screenshot-freeze-check

Conversation

@antonis

@antonis antonis commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Enhancement

📜 Description

Adds a CI regression check that reproduces the sentry-cocoa crash-handler freeze from getsentry/sentry-cocoa#9281 in the Expo sample and asserts the crash-time screenshot path does not hang the crash handler.

  • samples/expo/plugins/withIosSceneLifecycle.js — makes the sample adopt the iOS UIScene lifecycle with Expo's own EXExpoAppSceneDelegate (a Swift, MainActor-isolated UIWindowSceneDelegate) and injects an off-main abort() test hook gated by SENTRY_TEST_ABORT=1 (inert otherwise).
  • scripts/verify-ios-crash-screenshot-no-freeze.sh — builds the sample, crashes it off the main thread, and asserts a clean terminate + a captured screenshot.png with no dispatch_assert_queue_fail re-entry. Needs Xcode 27 / iOS 26+.
  • .github/workflows/ios-crash-screenshot-no-freeze.yml — runs the check on a bundled-cocoa version bump and on manual dispatch.

Important

This check is expected to be RED while the bundled sentry-cocoa is an unfixed release (currently 9.30.0): the sample freezes during crash handling, and the job fails with the re-entrant trap in its log. Once the bundled cocoa is bumped to a release containing the #9281 fix (on main), merge main into this branch and the check goes green.

Stacked on #6838 (Expo 57.0.26 bump), which EXExpoAppSceneDelegate requires.

💡 Motivation and Context

Guards against regressions of the crash-handler freeze and validates the sentry-cocoa fix once it is bundled into the SDK. Fixes/tracks getsentry/sentry-cocoa#9281 from the React Native side.

💚 How did you test it?

Ran scripts/verify-ios-crash-screenshot-no-freeze.sh locally on Xcode 27 / iOS 26.5 sim:

  • Against released 9.30.0 (unfixed): app froze; sample of the hung process showed collectWindowsOnCurrentThread → ExpoAppSceneDelegate.window.getter → dispatch_assert_queue_fail → handleSignal → … looping — the check fails as intended.
  • Against a locally-built fixed cocoa (SENTRY_XCFRAMEWORK_CACHE_DIR): app terminated cleanly, wrote a crash report + a 1206×2622 screenshot.png, zero dispatch_assert_queue_fail — the check passes.

📝 Checklist

  • I added tests to verify changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing.
  • No breaking changes.

🔮 Next steps

Keep as draft until the bundled sentry-cocoa carries the #9281 fix; then merge #6838, rebase/merge main here, confirm the check is green, and merge.

🤖 Generated with Claude Code

@antonis
antonis force-pushed the chore/bump-expo-sample-57.0.26 branch from 148f2ef to 00c47ba Compare October 5, 2026 09:23
@antonis
antonis force-pushed the test/ios-crash-screenshot-freeze-check branch from 468e51e to b42ea3f Compare October 5, 2026 09:23
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

⚪ None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • [DRAFT] test(e2e): iOS crash-handler screenshot no-freeze regression check by antonis in #6839
  • chore(expo): bump sample to Expo 57.0.26 by antonis in #6838
  • chore(deps): Bump basic-ftp to 6.2.2 by alwx in #6837
  • fix(core): Mark package as side-effect free by devclaimjuimperai in #6829
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.31.0 to 2.33.1 by dependabot in #6833
  • chore(deps): bump gradle/actions/setup-gradle from 6.3.0 to 6.4.0 by dependabot in #6834
  • chore(deps): bump getsentry/craft from 2.31.2 to 2.33.1 by dependabot in #6835
  • chore(deps): bump getsentry/github-workflows/validate-pr from 4013fc6e1aeb1be1f9d3b4d232624f0ec1afa613 to 36c729264d2edc29ebae61950c50e1e9f043ad7e by dependabot in #6832
  • fix(android): Settle initNativeReactNavigationNewFrameTracking promise by antonis in #6823
  • fix(spotlight): Forward image attachments to Spotlight by antonis in #6818
  • fix(ios): Prevent crash when initialized with an invalid DSN by antonis in #6825
  • chore(core): Resolve non-actionable TODOs by antonis in #6826
  • chore(core): resolve stale TODO comments by antonis in #6819
  • fix(profiling): Populate Hermes runtime version on JS profiles by antonis in #6817

🤖 This preview updates automatically when you update the PR.

antonis and others added 2 commits October 5, 2026 11:26
Raise the range floor from `^57.0.0` to `^57.0.26` (the latest 57.x patch) and
advance the lockfile accordingly. 57.0.26 is the first SDK 57 release bundled in
the sample that ships Expo's `ExpoAppSceneDelegate`, so the floor now reflects
the real minimum while keeping the caret for future 57.x patches.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reproduces getsentry/sentry-cocoa#9281 in the Expo sample and asserts the
crash-time screenshot path does not hang the crash handler:

- `samples/expo/plugins/withIosSceneLifecycle.js` makes the sample adopt the
  iOS UIScene lifecycle with Expo's `EXExpoAppSceneDelegate` (a Swift,
  MainActor-isolated `UIWindowSceneDelegate`) and injects an off-main
  `abort()` test hook gated by `SENTRY_TEST_ABORT=1`.
- `scripts/verify-ios-crash-screenshot-no-freeze.sh` builds the sample, crashes
  it off the main thread, and asserts a clean terminate + captured screenshot
  with no `dispatch_assert_queue_fail` re-entry.
- `.github/workflows/ios-crash-screenshot-no-freeze.yml` runs it on a bundled
  cocoa version bump and on manual dispatch.

This check is RED until the bundled sentry-cocoa carries the #9281 fix; the
cocoa-bump PR turns it green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@antonis
antonis force-pushed the chore/bump-expo-sample-57.0.26 branch from 00c47ba to 5182390 Compare October 5, 2026 09:26
@antonis
antonis force-pushed the test/ios-crash-screenshot-freeze-check branch from b42ea3f to 5f49f59 Compare October 5, 2026 09:26
@antonis antonis changed the title test(e2e): iOS crash-handler screenshot no-freeze regression check (sentry-cocoa#9281) [DRAFT] test(e2e): iOS crash-handler screenshot no-freeze regression check Oct 5, 2026
Base automatically changed from chore/bump-expo-sample-57.0.26 to main October 5, 2026 09:51
@antonis antonis added Blocked skip-changelog ready-to-merge Triggers the full CI test suite labels Oct 5, 2026

@antonis antonis left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking as blocked on a new Cocoa version that includes a fix for getsentry/sentry-cocoa#9281

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 460.64 ms 454.70 ms -5.94 ms
Size 50.56 MiB 56.59 MiB 6.03 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
3a829f0+dirty 474.65 ms 518.24 ms 43.59 ms
4953e94+dirty 442.02 ms 456.52 ms 14.50 ms
3e3142c+dirty 441.26 ms 496.06 ms 54.80 ms
7ff4d0f+dirty 413.81 ms 450.64 ms 36.83 ms
7ac3378+dirty 404.78 ms 439.84 ms 35.06 ms
083e3ef+dirty 446.67 ms 491.68 ms 45.01 ms
a858ac3+dirty 426.50 ms 484.82 ms 58.32 ms
44c8b3f+dirty 414.20 ms 457.28 ms 43.08 ms
61cc206+dirty 522.33 ms 553.98 ms 31.65 ms
5a010b7+dirty 425.62 ms 469.38 ms 43.76 ms

App size

Revision Plain With Sentry Diff
3a829f0+dirty 48.30 MiB 53.58 MiB 5.28 MiB
4953e94+dirty 43.75 MiB 48.08 MiB 4.33 MiB
3e3142c+dirty 49.74 MiB 55.44 MiB 5.70 MiB
7ff4d0f+dirty 48.30 MiB 53.60 MiB 5.30 MiB
7ac3378+dirty 43.75 MiB 48.13 MiB 4.37 MiB
083e3ef+dirty 49.74 MiB 55.36 MiB 5.61 MiB
a858ac3+dirty 49.74 MiB 55.08 MiB 5.34 MiB
44c8b3f+dirty 48.30 MiB 53.46 MiB 5.15 MiB
61cc206+dirty 49.74 MiB 55.36 MiB 5.62 MiB
5a010b7+dirty 48.30 MiB 53.58 MiB 5.28 MiB

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3856.10 ms 1227.20 ms -2628.90 ms
Size 5.15 MiB 6.94 MiB 1.79 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
7a89652+dirty 3861.46 ms 1229.61 ms -2631.85 ms
0b1b5e3+dirty 3823.96 ms 1220.12 ms -2603.84 ms
3e3142c+dirty 3867.38 ms 1232.48 ms -2634.90 ms
9210ae6+dirty 3815.93 ms 1214.14 ms -2601.79 ms
6177334+dirty 3834.85 ms 1217.58 ms -2617.28 ms
3a829f0+dirty 3839.76 ms 1214.69 ms -2625.06 ms
2cac31b+dirty 3886.27 ms 1230.85 ms -2655.42 ms
a5d243c+dirty 3842.35 ms 1214.29 ms -2628.06 ms
244f6e8+dirty 3833.36 ms 1212.96 ms -2620.41 ms
a3265b6+dirty 3826.31 ms 1207.87 ms -2618.44 ms

App size

Revision Plain With Sentry Diff
7a89652+dirty 5.15 MiB 6.70 MiB 1.55 MiB
0b1b5e3+dirty 5.15 MiB 6.70 MiB 1.54 MiB
3e3142c+dirty 4.98 MiB 6.56 MiB 1.58 MiB
9210ae6+dirty 5.15 MiB 6.68 MiB 1.53 MiB
6177334+dirty 5.15 MiB 6.68 MiB 1.53 MiB
3a829f0+dirty 5.15 MiB 6.70 MiB 1.54 MiB
2cac31b+dirty 4.98 MiB 6.55 MiB 1.58 MiB
a5d243c+dirty 5.15 MiB 6.68 MiB 1.53 MiB
244f6e8+dirty 4.98 MiB 6.56 MiB 1.58 MiB
a3265b6+dirty 5.15 MiB 6.68 MiB 1.53 MiB

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3859.60 ms 1216.61 ms -2642.98 ms
Size 5.15 MiB 6.94 MiB 1.79 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
64630e5+dirty 3845.49 ms 1215.19 ms -2630.30 ms
b0d3373+dirty 3842.49 ms 1218.49 ms -2624.00 ms
b04af96+dirty 3830.54 ms 1206.11 ms -2624.44 ms
f9c1ed4+dirty 3842.09 ms 1220.70 ms -2621.40 ms
09a902f+dirty 3847.65 ms 1221.31 ms -2626.34 ms
44abcc2+dirty 3841.42 ms 1214.77 ms -2626.65 ms
acd838e+dirty 3835.94 ms 1215.87 ms -2620.07 ms
bfba737+dirty 3834.18 ms 1222.80 ms -2611.38 ms
ce7b368+dirty 3851.41 ms 1222.37 ms -2629.04 ms
4e0ba9c+dirty 3856.39 ms 1234.44 ms -2621.95 ms

App size

Revision Plain With Sentry Diff
64630e5+dirty 4.98 MiB 6.46 MiB 1.49 MiB
b0d3373+dirty 5.15 MiB 6.68 MiB 1.53 MiB
b04af96+dirty 4.98 MiB 6.54 MiB 1.56 MiB
f9c1ed4+dirty 4.98 MiB 6.50 MiB 1.53 MiB
09a902f+dirty 4.98 MiB 6.46 MiB 1.49 MiB
44abcc2+dirty 4.98 MiB 6.55 MiB 1.57 MiB
acd838e+dirty 5.15 MiB 6.70 MiB 1.55 MiB
bfba737+dirty 4.98 MiB 6.51 MiB 1.53 MiB
ce7b368+dirty 4.98 MiB 6.51 MiB 1.53 MiB
4e0ba9c+dirty 5.15 MiB 6.67 MiB 1.51 MiB

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 444.02 ms 481.57 ms 37.55 ms
Size 50.56 MiB 56.59 MiB 6.03 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
7436d0f+dirty 429.58 ms 452.52 ms 22.94 ms
b0d3373+dirty 412.17 ms 452.84 ms 40.67 ms
7ac3378+dirty 410.67 ms 442.60 ms 31.92 ms
53a3f8e+dirty 422.00 ms 436.96 ms 14.96 ms
e763471+dirty 538.31 ms 574.44 ms 36.13 ms
c004dae+dirty 404.60 ms 430.67 ms 26.07 ms
bfba737+dirty 425.19 ms 465.98 ms 40.79 ms
f3215d3+dirty 396.53 ms 436.66 ms 40.13 ms
23598c3+dirty 371.92 ms 420.65 ms 48.74 ms
ad66da3+dirty 411.49 ms 449.38 ms 37.89 ms

App size

Revision Plain With Sentry Diff
7436d0f+dirty 48.30 MiB 53.60 MiB 5.30 MiB
b0d3373+dirty 48.30 MiB 53.58 MiB 5.28 MiB
7ac3378+dirty 43.94 MiB 48.99 MiB 5.05 MiB
53a3f8e+dirty 50.56 MiB 56.46 MiB 5.90 MiB
e763471+dirty 49.74 MiB 54.85 MiB 5.11 MiB
c004dae+dirty 48.30 MiB 53.49 MiB 5.19 MiB
bfba737+dirty 49.74 MiB 55.09 MiB 5.34 MiB
f3215d3+dirty 48.30 MiB 53.49 MiB 5.19 MiB
23598c3+dirty 43.94 MiB 49.02 MiB 5.08 MiB
ad66da3+dirty 48.30 MiB 53.49 MiB 5.19 MiB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked ready-to-merge Triggers the full CI test suite skip-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant