Skip to content

fix(sentry): ignore browser extension adoptedStyleSheets errors - #4157

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

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

Conversation

@sentry

@sentry sentry Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Description

Browser extensions (such as Dark Reader and other theming tools) inject an inline script that proxies document.adoptedStyleSheets. In modern Firefox (e.g. Firefox 159), the property is non-configurable, causing the extension's cleanup routine to throw TypeError: can't redefine non-configurable property "adoptedStyleSheets".

Because the script is injected directly into the host page, the stack frames reference page URLs rather than extension protocols, so standard denyUrls does not catch it. Gazebo never accesses or redefines adoptedStyleSheets, making this third-party noise.

Notable Changes

  • Added a regex pattern to customIgnoredErrors in src/sentry.ts covering both Firefox (can't redefine non-configurable property "adoptedStyleSheets") and Chromium (Cannot redefine property: adoptedStyleSheets) variants.
  • Updated customIgnoredErrors type signature to Array<string | RegExp>.
  • Added unit tests in src/sentry.test.ts verifying Sentry initialization includes and matches the ignore rule.

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-18BP

@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.


Note

Low Risk
Changes are limited to Sentry error filtering and new unit tests; no auth, API, or runtime app behavior changes.

Overview
Filters third-party browser extension noise out of Sentry by adding a regex to customIgnoredErrors that matches Firefox and Chromium adoptedStyleSheets redefine errors, and widening that list to allow RegExp entries alongside strings.

Adds src/sentry.test.ts to assert setupSentry passes those patterns through ignoreErrors and does not ignore unrelated errors.

public/mockServiceWorker.js only picks up trailing commas on a few postMessage calls (formatting).

Reviewed by Cursor Bugbot for commit f961e3c. Bugbot is set up for automated code reviews on this repo. Configure here.

@sentry

sentry Bot commented Nov 7, 2026

Copy link
Copy Markdown
Author

⚠️ Sentry needs additional GitHub App permissions

The Sentry GitHub App installation for this repository is missing permissions it needs to keep iterating on this pull request to get CI passing.

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

@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-production-system 5.82MB 64 bytes (0.0%) ⬆️
gazebo-production-esm 5.89MB 63 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 63 bytes 577.88kB 0.01%

Files in assets/index.*.js:

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

Assets Changed:

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

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

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

@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 (8633d95) to head (f961e3c).

@@           Coverage Diff           @@
##             main    #4157   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         823      823           
  Lines       15147    15147           
  Branches     4387     4387           
=======================================
  Hits        14962    14962           
  Misses        178      178           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <ø> (ø)
Pages 98.44% <ø> (ø)
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 8633d95...f961e3c. 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-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    #4157   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         823      823           
  Lines       15147    15147           
  Branches     4379     4379           
=======================================
  Hits        14962    14962           
  Misses        178      178           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <ø> (ø)
Pages 98.44% <ø> (ø)
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 8633d95...f961e3c. Read the comment docs.

@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4157   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         823      823           
  Lines       15147    15147           
  Branches     4387     4387           
=======================================
  Hits        14962    14962           
  Misses        178      178           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <ø> (ø)
Pages 98.44% <ø> (ø)
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 8633d95...f961e3c. Read the comment docs.

@codecov-qa

codecov-qa Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.77%. Comparing base (8633d95) to head (f961e3c).

@@           Coverage Diff           @@
##             main    #4157   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         823      823           
  Lines       15147    15147           
  Branches     4379     4379           
=======================================
  Hits        14962    14962           
  Misses        178      178           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <ø> (ø)
Pages 98.44% <ø> (ø)
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 8633d95...f961e3c. 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.

This branch has not been deployed

No deployments
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.

0 participants