Skip to content

Conflict between Error boundary and capture console integration #8689

@rodolfoBee

Description

@rodolfoBee

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react

SDK Version

7.61.0

Framework Version

No response

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

When Sentry error boundary and capture console are both enable in the SDK and an error happens in the wrapped component, the capture console integration will capture the error before the Error boundary.

As a result the event in Sentry is missing the component stack (added by Sentry error boundary) and all actions performed in beforeCapture (in this case, adding a tag).

Repro as provided my affected user:
sentry-errorboundary-consoleintegration.zip

  1. Add DSN to app.js
  2. Run npm install
  3. Run npm build
  4. Run server -s build
  5. Open localhost:3000

Expected Result

Capture console does not affect the error boundary configuration and the resulting event in sentry has the information added by the error boundary.

Removing the capture console integration "solves" the issue.

Actual Result

The event is captured by the integration, without additional information. And the event captures by the error boundary is dropped:

Not capturing exception because it's already been captured.

Metadata

Metadata

Assignees

Labels

Package: reactIssues related to the Sentry React SDK

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions