Skip to content

wrapFetchWithSentry quote scan breaks across chunks #23468

Description

@sentry-junior

wrapFetchWithSentry rewrites the HTML response stream chunk-by-chunk to inject trace meta tags. The quote-scanning path in addMetaTagToHead is not sound across chunk boundaries, and a partner integration hit a build-breaking TanStack prerender failure that is separate from the already-fixed React #418 newline issue.

Reported by a Cloudflare + TanStack Start partner integration. Observed on @sentry/cloudflare / related stack at 10.56.0. The reporter confirmed the React hydration #418 half matches #21915 (fixed in 10.64.0); this tracks the remaining stream-transform failure.

Verified

Reported symptoms

  • TanStack SSR stream transform threw SSR stream tail exceeded maximum buffer during prerender and failed the build
  • Failure was timing/chunk-boundary dependent: passed locally, failed in CI
  • Partner hypothesis (medium confidence): a chunk boundary inside a quoted attribute value can desynchronize the per-chunk quote scan and misparse markup, independent of the newline fix

Workaround

Unknown

  • Exact TanStack Start / React versions in the failing app
  • Minimal public reproduction
  • Whether the buffer error is caused only by quote-scan desync, by <head> split across chunks, by interaction with TanStack prerender buffering, or a combination

Requested by Nicolas Hrubec.

--

View Junior Session[Sentry]

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions