Skip to content

fix(replays): Prevent React crash by stringifying plain objects in frame descriptions - #128721

Open
sentry[bot] wants to merge 3 commits into
masterfrom
seer/fix/replay-breadcrumb-object-child
Open

sentry[bot] wants to merge 3 commits into
masterfrom
seer/fix/replay-breadcrumb-object-child

Conversation

@sentry

@sentry sentry Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes an issue where a breadcrumb frame with a non-string message caused a runtime React crash (Objects are not valid as a React child).

Changes

  • In defaultMapper (static/app/utils/replays/getFrameDetails.tsx), guard frame.message with typeof frame.message === 'string' so malformed non-string message fields don't bypass the fallback.
  • Keep frame.data flowing through unmodified so that BreadcrumbStructuredData continues to render plain objects via StructuredEventData as expandable inspectors.
  • Add unit tests covering defaultMapper behavior for string messages, non-string messages, and absent values.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes JAVASCRIPT-3FN6

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@sentry
sentry Bot requested a review from a team as a code owner October 23, 2026 23:10
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 23, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6b8a606. Configure here.

Comment thread static/app/utils/replays/getFrameDetails.tsx Outdated
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

✅ no issues found

This branch was successfully deployed

1 active deployment
Preview — b844b09e Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants