Skip to content

fix(sentry): ignore NotFoundError from Replay SDK removeChild - #4121

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/ignore-sentry-replay-error
Open

sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/ignore-sentry-replay-error

Conversation

@sentry

@sentry sentry Bot commented Sep 11, 2026

Copy link
Copy Markdown

Description

This PR addresses the NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. error.

Root Cause:
This error is not caused by application code but by a conflict between the Sentry Replay SDK (rrweb) and React's DOM reconciler. Specifically, rrweb patches Element.removeChild for session recording. During its initialization, rrweb attempts to patch adoptedStyleSheets, which fails with a TypeError on certain browser/OS combinations (e.g., Chrome 145 on Windows), likely due to a conflict with another browser mechanism or extension. This partial failure leaves rrweb's DOM tracking in an inconsistent state. When React's commitDeletionEffects later calls rrweb's patched removeChild during component unmounting, rrweb's internal state does not match the actual DOM, leading to the NotFoundError.

Solution Implemented:
To prevent this third-party error from cluttering Sentry, this PR adds the specific error message "Failed to execute 'removeChild' on 'Node'" to the ignoreErrors array in src/sentry.ts.

Why this approach:
This error is already caught by an ErrorBoundary and tagged as third-party code, indicating it's not directly fixable within our application logic. Ignoring it reduces noise in Sentry while the underlying issue in the Sentry Replay SDK (rrweb) is addressed. Future steps will involve upgrading the @sentry/react package to a version that contains fixes for the adoptedStyleSheets redefinition failure and exploring additional replay configuration options to prevent this scenario.

Code Example

// src/sentry.ts
Sentry.init({
  // ... other config
  ignoreErrors: [
    // ... existing errors
    "Failed to execute 'removeChild' on 'Node'",
  ],
});

Notable Changes

  • Added the specific error message "Failed to execute 'removeChild' on 'Node'" to the ignoreErrors array in src/sentry.ts.
  • This change prevents a known third-party NotFoundError from cluttering Sentry logs.
  • The underlying issue is a conflict between the Sentry Replay SDK (rrweb) and React's DOM reconciler, which will be addressed in future @sentry/react package upgrades.

Screenshots

Link to Sample Entry

Legal Boilerplate

Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness is going to need some rights from me in order to utilize my contributions in this 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 Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.

Fixes GAZEBO-186Y

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

@sentry

sentry Bot commented Sep 11, 2026

Copy link
Copy Markdown
Author

⚠️ Seer needs additional GitHub permissions

Seer wants to keep iterating on this pull request to get CI passing, but the Sentry GitHub App installation is missing permissions it needs to read the failing checks and push a fix.

Review and accept the updated permissions to let Seer continue: https://github.com/organizations/codecov/settings/installations/86101127/permissions/update

@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 88 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 5.82MB 44 bytes (0.0%) ⬆️
gazebo-production-esm 5.89MB 44 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js 44 bytes 577.86kB 0.01%

Files in assets/index.*.js:

  • ./src/sentry.ts → Total Size: 5.29kB
view changes for bundle: gazebo-production-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js 44 bytes 657.86kB 0.01%

Files in assets/index-legacy.*.js:

  • ./src/sentry.ts → Total Size: 5.3kB

@codecov-notifications

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #4121   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         823      823           
  Lines       15147    15147           
  Branches     4387     4387           
=======================================
  Hits        14961    14961           
  Misses        179      179           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <ø> (ø)
Pages 98.43% <ø> (ø)
Services 99.32% <ø> (ø)
Shared 98.94% <ø> (ø)
UI 99.02% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8fbfc0...454a56d. Read the comment docs.

@codecov-public-qa

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.77%. Comparing base (b8fbfc0) to head (454a56d).

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #4121   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         823      823           
  Lines       15147    15147           
  Branches     4379     4387    +8     
=======================================
  Hits        14961    14961           
  Misses        179      179           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <ø> (ø)
Pages 98.43% <ø> (ø)
Services 99.32% <ø> (ø)
Shared 98.94% <ø> (ø)
UI 99.02% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8fbfc0...454a56d. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.77%. Comparing base (b8fbfc0) to head (454a56d).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4121   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         823      823           
  Lines       15147    15147           
  Branches     4387     4387           
=======================================
  Hits        14961    14961           
  Misses        179      179           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <ø> (ø)
Pages 98.43% <ø> (ø)
Services 99.32% <ø> (ø)
Shared 98.94% <ø> (ø)
UI 99.02% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8fbfc0...454a56d. Read the comment docs.

@codecov-releaser

Copy link
Copy Markdown
Collaborator

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
454a56d Fri, 11 Sep 2026 22:41:07 GMT Cloud Enterprise

@codecov-qa

codecov-qa Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.77%. Comparing base (b8fbfc0) to head (454a56d).

@@           Coverage Diff           @@
##             main    #4121   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         823      823           
  Lines       15147    15147           
  Branches     4387     4379    -8     
=======================================
  Hits        14961    14961           
  Misses        179      179           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <ø> (ø)
Pages 98.43% <ø> (ø)
Services 99.32% <ø> (ø)
Shared 98.94% <ø> (ø)
UI 99.02% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8fbfc0...454a56d. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant