Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Inbound Filter: React Hydration Errors #45038

Closed
HazAT opened this issue Feb 23, 2023 · 0 comments · Fixed by #45188
Closed

New Inbound Filter: React Hydration Errors #45038

HazAT opened this issue Feb 23, 2023 · 0 comments · Fixed by #45188

Comments

@HazAT
Copy link
Member

HazAT commented Feb 23, 2023

Problem Statement

About this ticket: #44877

We re-evaluated our decision and decided for now that we are going to, by default, ignore hydration error as a new Inbound Filter.
The reason for this is, currently, those errors are not actionable, we can't reference the component that triggered it, therefore, it's hard to understand and you usually just want to ignore it.
Maybe in the future we revisit this if we are able to detect the root cause in the SDK to make this actionable but for now, ignoring them will result in a better user experience.

Solution Brainstorm

Add a new Inbound Filter:
Filter out hydration errors
React falls back to do a full re-render on a page, these errors are often not actionable.
image

We should make this, retroactively a default for all projects and when enabled, Relay filters those errors out.

Here are the error messages we want to filter:

  'https://reactjs.org/docs/error-decoder.html?invariant=419', // The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.
  'https://reactjs.org/docs/error-decoder.html?invariant=422', // There was an error while hydrating this Suspense boundary. Switched to client rendering.
  'https://reactjs.org/docs/error-decoder.html?invariant=423', // There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root...
  'https://reactjs.org/docs/error-decoder.html?invariant=425'  // Text content does not match server-rendered HTML...

ref: getsentry/sentry-javascript#6295 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant