Skip to content

test(nextjs): Tolerate aborted navigation in streaming RSC error E2E test - #21847

Merged
mydea merged 1 commit into
developfrom
fix/flaky-streaming-rsc-error-navigation
Jul 1, 2026
Merged

test(nextjs): Tolerate aborted navigation in streaming RSC error E2E test#21847
mydea merged 1 commit into
developfrom
fix/flaky-streaming-rsc-error-navigation

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

The streaming-rsc-error E2E test navigates to a page that intentionally crashes a streaming promise inside a Suspense boundary. When the streaming error interrupts the HTTP response, the browser navigation can reject (e.g. net::ERR_ABORTED / incomplete chunked encoding) after Sentry has already captured the error and the server transaction. In that case the bare await page.goto(...) throws and fails the test even though the SDK behaved correctly — producing the intermittent failure tracked in #21836.

This mirrors the long-standing pattern already used for other error-page navigations across the E2E suite (e.g. nextjs-13/tests/server/server-component-error.test.ts, the astro-* and remix apps): attach .catch(() => {}) to the navigation so an aborted response no longer fails the test. All assertions on the captured error and transaction events are unchanged, so no coverage is dropped.

Applied to all four streaming-rsc-error.test.ts occurrences (nextjs-15, nextjs-16, nextjs-16-bun, nextjs-16-cf-workers) since they share the identical race.

Root cause: the test asserted on captured Sentry events but also implicitly required the navigation to complete successfully; a streaming RSC error can abort the response, making page.goto reject non-deterministically.

Fixes#21836

…test
Fixes#21836
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mydea
mydea enabled auto-merge (squash) July 1, 2026 06:44
@github-actions

Copy link
Copy Markdown
ContributorAuthor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser27.48 kB-0.52%-142 B 🔽
@sentry/browser - with treeshaking flags25.91 kB-0.56%-145 B 🔽
@sentry/browser (incl. Tracing)46.01 kB-0.15%-67 B 🔽
@sentry/browser (incl. Tracing + Span Streaming)47.76 kB-0.12%-55 B 🔽
@sentry/browser (incl. Tracing, Profiling)50.8 kB-0.09%-43 B 🔽
@sentry/browser (incl. Tracing, Replay)85.26 kB-0.06%-45 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags74.85 kB-0.09%-62 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas)89.95 kB-0.05%-37 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback)102.61 kB-0.05%-51 B 🔽
@sentry/browser (incl. Feedback)44.66 kB-0.31%-137 B 🔽
@sentry/browser (incl. sendFeedback)32.26 kB-0.49%-157 B 🔽
@sentry/browser (incl. FeedbackAsync)37.4 kB-0.4%-147 B 🔽
@sentry/browser (incl. Metrics)28.54 kB-0.5%-141 B 🔽
@sentry/browser (incl. Logs)28.78 kB-0.52%-149 B 🔽
@sentry/browser (incl. Metrics & Logs)29.47 kB-0.49%-145 B 🔽
@sentry/react29.27 kB-0.48%-139 B 🔽
@sentry/react (incl. Tracing)48.32 kB-0.12%-58 B 🔽
@sentry/vue32.66 kB-0.57%-186 B 🔽
@sentry/vue (incl. Tracing)47.87 kB-0.13%-59 B 🔽
@sentry/svelte27.5 kB-0.53%-145 B 🔽
CDN Bundle29.89 kB-0.46%-138 B 🔽
CDN Bundle (incl. Tracing)47.95 kB-0.15%-68 B 🔽
CDN Bundle (incl. Logs, Metrics)31.44 kB-0.45%-142 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics)49.3 kB-0.1%-49 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics)70.77 kB-0.03%-15 B 🔽
CDN Bundle (incl. Tracing, Replay)85.45 kB-0.07%-57 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)86.72 kB-0.08%-65 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback)91.25 kB-0.08%-71 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)92.5 kB-0.07%-63 B 🔽
CDN Bundle - uncompressed88.95 kB-0.53%-470 B 🔽
CDN Bundle (incl. Tracing) - uncompressed145.18 kB-0.12%-168 B 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed93.65 kB-0.5%-470 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed149.15 kB-0.12%-168 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed218.63 kB-0.02%-37 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed264.19 kB-0.07%-168 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed268.15 kB-0.07%-168 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed277.89 kB-0.07%-168 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed281.84 kB-0.06%-168 B 🔽
@sentry/nextjs (client)50.71 kB-0.11%-51 B 🔽
@sentry/sveltekit (client)46.41 kB-0.11%-50 B 🔽
@sentry/core/server77.67 kB-0.1%-77 B 🔽
@sentry/core/browser63.97 kB-0.14%-86 B 🔽
@sentry/node-core61.41 kB-0.09%-55 B 🔽
@sentry/node122.66 kB+0.49%+590 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection)69.95 kB--
@sentry/node/light50.39 kB-0.12%-57 B 🔽
@sentry/node - without tracing73.13 kB-0.1%-69 B 🔽
@sentry/aws-serverless84.02 kB-0.09%-73 B 🔽
@sentry/cloudflare (withSentry) - minified180.46 kB-0.09%-162 B 🔽
@sentry/cloudflare (withSentry)446.48 kB-0.11%-457 B 🔽

View base workflow run

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

Labels

None yet

Projects

None yet

1 participant

@mydea