Skip to content

[PROOF · DO NOT MERGE] sentry-cocoa 9.26.0 breaks iOS Replay network-detail requests (Spaceflight E2E) - #6605

Closed
antonis wants to merge 1 commit into
mainfrom
test/harden-spaceflight-e2e-flow
Closed

[PROOF · DO NOT MERGE] sentry-cocoa 9.26.0 breaks iOS Replay network-detail requests (Spaceflight E2E)#6605
antonis wants to merge 1 commit into
mainfrom
test/harden-spaceflight-e2e-flow

Conversation

@antonis

@antonis antonis commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Proof-of-issue PR — NOT for merge. This PR exists to demonstrate, via CI, that sentry-cocoa 9.26.0 breaks iOS URLSession requests to Session Replay network-detail allow-listed URLs. The real fix belongs in sentry-cocoa. Close once the upstream issue is resolved.

🔍 What this proves

The iOS E2E captureSpaceflightNewsScreenTransaction.test.ios.auto flow began failing deterministically on main and every PR immediately after the sentry-cocoa 9.24.0 → 9.26.0 bump (#6409). It is the only iOS flow making a real external HTTP request, and it was the only one failing (No visible element found: "Load More Articles" — the article fetch never completes, so the list never renders).

A three-way E2E bisect (one variable changed at a time) isolates the cause:

sentry-cocoa Replay network-detail capture Spaceflight flow
9.26.0 on ❌ red (4/4 deterministic)
9.24.0 on ✅ green
9.26.0 off ✅ green

Two independent single-variable flips each turn it green → the trigger is sentry-cocoa 9.26.0's Session Replay network-detail path. This branch demonstrates the third row: it removes networkDetailAllowUrls + networkCaptureBodies from the sample's mobileReplayIntegration, and iOS E2E goes green while cocoa stays at 9.26.0.

🎯 Suspected upstream cause

getsentry/sentry-cocoa#8497"Prevent Session Replay network-detail breadcrumbs from blocking URLSession cancellation on the task monitor" — the only 9.26.0 change touching both the network-detail path and URLSession lifecycle. #8650 (trace-header setter) is ruled out: it is not gated on replay network-detail, so disabling network-detail would not have fixed it. Last-known-good is 9.24.0 (9.25.0 shipped no networking changes).

🔧 Proposed cocoa fix — getsentry/sentry-cocoa#8852

getsentry/sentry-cocoa#8852 reorders the URLSession completion-handler wrappers so the app receives the response before Replay network-detail enrichment reads properties on the URLSessionTask (which contend on the task's internal monitor).

Important

This is expected to be necessary but not sufficient for React Native. #8852, by its author's own scope note, only fixes the completion-handler swizzle path (captureResponseDetails). React Native's iOS networking uses delegate-based RCTHTTPRequestHandler (dataTaskWithRequest: with no completion handler), which flows through the delegate path (urlSessionTaskResume / swizzled setState:captureRequestDetails) — explicitly called out as not covered by #8852. So this PR is not expected to go green from #8852 alone; it will be re-run to verify once cocoa ships a fix covering the delegate path and cuts a release the RN build can download.

💚 Evidence (CI runs, sample-application.ymlTest ios)

  • Red — cocoa 9.26.0, capture on: run 32713642451
  • Green — cocoa 9.24.0, capture on: run 32722276675
  • Green — cocoa 9.26.0, capture off (this branch): run 32725506585[Passed] captureSpaceflightNewsScreenTransaction.test.ios.auto (24s)

⚠️ Impact

Any app on sentry-cocoa 9.26.0 using Session Replay with networkDetailAllowUrls + body capture will have its requests to those hosts broken — a functional networking regression, not just telemetry loss. Bounded to allow-listed network-detail URLs; other traffic is unaffected.

🔮 Next steps (not in this PR)

  • Upstream tracking: sentry-cocoa#8852 (completion-handler path). Delegate-path fix still needed for RN.
  • Once cocoa ships a fix covering the delegate path and cuts a release, restore networkDetailAllowUrls + networkCaptureBodies here, bump the cocoa pin, and re-run iOS E2E to confirm green.
  • This PR is intentionally not mergeable — it is a reproduction. Do not restore the removed options here as a "fix"; that is only a workaround.

@antonis antonis added the ready-to-merge Triggers the full CI test suite label Aug 24, 2026
@github-actions

github-actions Bot commented Aug 24, 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).


  • [PROOF · DO NOT MERGE] sentry-cocoa 9.26.0 breaks iOS Replay network-detail requests (Spaceflight E2E) by antonis in #6605
  • chore(deps): update JavaScript SDK to v10.71.0 by github-actions in #6610
  • chore(deps): update Wizard to v7.0.3 by github-actions in #6611
  • fix(ios): Quote script paths so Expo iOS build works with spaces in the project path by antonis in #6604
  • fix(deps): Bump deepmerge-ts to ^8.0.0 (stack-exhaustion advisory) by antonis in #6603
  • fix(android): fragment memory leak in RNSentryReactFragmentLifecycleTracer by minhuwv in #6599
  • chore(deps): bump the codeql-action group with 3 updates by dependabot in #6602
  • chore(deps): update JavaScript SDK to v10.70.0 by github-actions in #6580
  • ci(e2e): remove obsolete CocoaPods sample build job by antonis in #6500
  • chore(deps): update Cocoa SDK to v9.26.0 by github-actions in #6409
  • feat(android): Add NDK app hang tracking options by antonis in #6548
  • chore(deps): bump the codeql-action group with 3 updates by dependabot in #6589
  • chore(deps): bump getsentry/craft from 2.30.0 to 2.30.1 by dependabot in #6591
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.30.0 to 2.30.1 by dependabot in #6590
  • chore(deps): update Sentry Android Gradle Plugin to v6.19.0 by github-actions in #6588
  • chore(deps): update Android SDK to v8.53.0 by github-actions in #6586
  • test(e2e): De-flake TurboModule span-attribute count assertion by antonis in #6596
  • chore(e2e): Bump Android binary size diff limit to 5.8 MiB by antonis in #6595
  • docs: update CONTRIBUTING paths for the monorepo layout by melbinjp in #6594

🤖 This preview updates automatically when you update the PR.

@sentry

sentry Bot commented Aug 24, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Sentry RN io.sentry.reactnative.sample 8.23.0 (103) Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 409.15 ms 432.58 ms 23.43 ms
Size 49.74 MiB 55.45 MiB 5.71 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5a010b7+dirty 425.62 ms 469.38 ms 43.76 ms
1a5721e+dirty 424.07 ms 482.32 ms 58.25 ms
7d8c8bd+dirty 417.45 ms 462.10 ms 44.65 ms
27d9693+dirty 419.08 ms 469.12 ms 50.04 ms
ef27341+dirty 412.94 ms 443.98 ms 31.04 ms
41d6254+dirty 424.45 ms 474.34 ms 49.89 ms
b9bebee+dirty 438.86 ms 452.21 ms 13.35 ms
3d536d1+dirty 524.34 ms 547.32 ms 22.98 ms
580fb5c+dirty 436.34 ms 471.63 ms 35.28 ms
4e0b819+dirty 420.56 ms 470.08 ms 49.52 ms

App size

Revision Plain With Sentry Diff
5a010b7+dirty 48.30 MiB 53.58 MiB 5.28 MiB
1a5721e+dirty 49.74 MiB 55.09 MiB 5.34 MiB
7d8c8bd+dirty 48.30 MiB 53.54 MiB 5.23 MiB
27d9693+dirty 49.74 MiB 55.09 MiB 5.34 MiB
ef27341+dirty 48.30 MiB 53.54 MiB 5.24 MiB
41d6254+dirty 48.30 MiB 53.60 MiB 5.30 MiB
b9bebee+dirty 48.30 MiB 53.58 MiB 5.28 MiB
3d536d1+dirty 49.74 MiB 55.26 MiB 5.52 MiB
580fb5c+dirty 49.74 MiB 54.79 MiB 5.05 MiB
4e0b819+dirty 49.74 MiB 54.81 MiB 5.07 MiB

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3855.40 ms 1227.47 ms -2627.93 ms
Size 5.08 MiB 6.73 MiB 1.65 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
ecf47a2+dirty 3835.20 ms 1222.43 ms -2612.77 ms
3817909+dirty 1183.90 ms 1187.50 ms 3.60 ms
5ee78d6+dirty 3847.52 ms 1224.27 ms -2623.25 ms
890d145+dirty 1223.59 ms 1231.37 ms 7.78 ms
e763471+dirty 3841.16 ms 1218.06 ms -2623.09 ms
3d31fcf+dirty 3838.09 ms 1223.46 ms -2614.63 ms
9210ae6+dirty 3815.93 ms 1214.14 ms -2601.79 ms
26843eb+dirty 3861.60 ms 1238.77 ms -2622.82 ms
7a89652+dirty 3861.46 ms 1229.61 ms -2631.85 ms
9ad4522+dirty 3850.40 ms 1222.40 ms -2628.00 ms

App size

Revision Plain With Sentry Diff
ecf47a2+dirty 4.98 MiB 6.46 MiB 1.49 MiB
3817909+dirty 3.38 MiB 4.73 MiB 1.35 MiB
5ee78d6+dirty 5.15 MiB 6.69 MiB 1.53 MiB
890d145+dirty 3.38 MiB 4.77 MiB 1.38 MiB
e763471+dirty 4.98 MiB 6.51 MiB 1.53 MiB
3d31fcf+dirty 4.98 MiB 6.56 MiB 1.58 MiB
9210ae6+dirty 5.15 MiB 6.68 MiB 1.53 MiB
26843eb+dirty 4.98 MiB 6.53 MiB 1.55 MiB
7a89652+dirty 5.15 MiB 6.70 MiB 1.55 MiB
9ad4522+dirty 4.98 MiB 6.56 MiB 1.58 MiB

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3839.40 ms 1215.57 ms -2623.83 ms
Size 5.08 MiB 6.73 MiB 1.65 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
9a44e47+dirty 3847.00 ms 1231.84 ms -2615.16 ms
3e3142c+dirty 3831.04 ms 1206.04 ms -2625.00 ms
df5d108+dirty 1207.34 ms 1210.50 ms 3.16 ms
2cac31b+dirty 3854.43 ms 1212.35 ms -2642.08 ms
ae37560+dirty 3840.10 ms 1217.89 ms -2622.21 ms
68672fc+dirty 3832.22 ms 1228.29 ms -2603.93 ms
f170ec3+dirty 3844.74 ms 1222.67 ms -2622.07 ms
ca9d079+dirty 3818.62 ms 1216.72 ms -2601.90 ms
b0d3373+dirty 3842.49 ms 1218.49 ms -2624.00 ms
71abba0+dirty 3852.70 ms 1224.53 ms -2628.16 ms

App size

Revision Plain With Sentry Diff
9a44e47+dirty 5.08 MiB 6.75 MiB 1.67 MiB
3e3142c+dirty 5.08 MiB 6.56 MiB 1.48 MiB
df5d108+dirty 3.38 MiB 4.73 MiB 1.35 MiB
2cac31b+dirty 4.98 MiB 6.55 MiB 1.58 MiB
ae37560+dirty 5.15 MiB 6.70 MiB 1.54 MiB
68672fc+dirty 5.15 MiB 6.71 MiB 1.55 MiB
f170ec3+dirty 5.15 MiB 6.69 MiB 1.53 MiB
ca9d079+dirty 5.15 MiB 6.69 MiB 1.53 MiB
b0d3373+dirty 5.15 MiB 6.68 MiB 1.53 MiB
71abba0+dirty 5.15 MiB 6.67 MiB 1.52 MiB

@antonis
antonis force-pushed the test/harden-spaceflight-e2e-flow branch from 476abe8 to 73482b2 Compare August 24, 2026 12:43
@antonis antonis changed the title test(e2e): Harden Spaceflight News iOS flow against cold-start flakiness test(e2e): Disable Replay network-detail capture pending sentry-cocoa 9.26.0 fix Aug 24, 2026
@antonis antonis changed the title test(e2e): Disable Replay network-detail capture pending sentry-cocoa 9.26.0 fix [PROOF · DO NOT MERGE] sentry-cocoa 9.26.0 breaks iOS Replay network-detail requests (Spaceflight E2E) Aug 24, 2026
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor
Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- [PROOF · DO NOT MERGE] sentry-cocoa 9.26.0 breaks iOS Replay network-detail requests (Spaceflight E2E) ([#6605](https://github.com/getsentry/sentry-react-native/pull/6605))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 97d222c

Comment thread samples/react-native/src/App.tsx Outdated
@antonis

antonis commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Closing — this was a proof-of-issue reproduction, not a merge candidate. The investigation and repro now live in #6609 (which references the suspected upstream sentry-cocoa cause, #8497). Not restoring the removed options here; the real fix belongs in sentry-cocoa.

@antonis antonis closed this Aug 24, 2026
@antonis antonis reopened this Aug 25, 2026
@antonis antonis closed this Aug 25, 2026
@antonis antonis reopened this Aug 25, 2026
@antonis
antonis force-pushed the test/harden-spaceflight-e2e-flow branch from 73482b2 to 6d0771f Compare August 25, 2026 11:33
@github-actions

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 530.98 ms 573.92 ms 42.94 ms
Size 49.74 MiB 55.45 MiB 5.71 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5a010b7+dirty 475.15 ms 519.02 ms 43.88 ms
f9c1ed4+dirty 520.57 ms 594.84 ms 74.27 ms
c2e182c+dirty 468.50 ms 545.44 ms 76.94 ms
2c735cc+dirty 435.20 ms 459.48 ms 24.28 ms
af33f3b+dirty 417.68 ms 448.04 ms 30.37 ms
7d8c8bd+dirty 406.06 ms 460.88 ms 54.81 ms
890d145+dirty 486.42 ms 514.85 ms 28.43 ms
ef27341+dirty 519.02 ms 553.42 ms 34.40 ms
bf168a4+dirty 430.60 ms 459.31 ms 28.71 ms
41d6254+dirty 406.20 ms 445.52 ms 39.32 ms

App size

Revision Plain With Sentry Diff
5a010b7+dirty 48.30 MiB 53.58 MiB 5.28 MiB
f9c1ed4+dirty 49.74 MiB 54.86 MiB 5.12 MiB
c2e182c+dirty 49.74 MiB 54.85 MiB 5.11 MiB
2c735cc+dirty 43.94 MiB 48.94 MiB 5.00 MiB
af33f3b+dirty 49.74 MiB 55.09 MiB 5.35 MiB
7d8c8bd+dirty 48.30 MiB 53.54 MiB 5.23 MiB
890d145+dirty 43.94 MiB 49.00 MiB 5.06 MiB
ef27341+dirty 48.30 MiB 53.54 MiB 5.24 MiB
bf168a4+dirty 49.74 MiB 55.09 MiB 5.35 MiB
41d6254+dirty 48.30 MiB 53.60 MiB 5.30 MiB

@antonis antonis closed this Aug 25, 2026
…ssion

Re-verify the 9.24.0 baseline (Spaceflight network-detail flow) under the
current CI conditions. PROOF ONLY — DO NOT MERGE.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@antonis antonis reopened this Aug 25, 2026
@antonis
antonis force-pushed the test/harden-spaceflight-e2e-flow branch from 6d0771f to 97d222c Compare August 25, 2026 13:51
@antonis antonis closed this Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant