## Summary
- Suppress "Object Not Found Matching Id" errors from CEFSharp bots
- Generalizes existing suppression for Id:2 to catch all Id values
- Analysis shows 100% of these 76,000+ errors come from Windows + Chrome
(CEFSharp signature)
## Background
We're seeing thousands of `Object Not Found Matching Id:1,
MethodName:update, ParamCount:4` errors in Sentry. Investigation
reveals:
1. **These are bot errors, not user errors** - The error format is
specific to CEFSharp (.NET Chromium wrapper) used by automated scanners
2. **100% come from Windows + Chrome** - Analysis of all events shows
this consistent pattern, confirming they're from CEFSharp bots
3. **Likely Microsoft Outlook SafeLink** - Based on similar reports from
other projects, these are URL security scanners
4. **We already suppress Id:2** - PR #7103 added suppression for the
same error with Id:2
## Changes
Updated the Sentry ignore pattern from `/Object Not Found Matching
Id:2/` to `/Object Not Found Matching Id:\d+/` to catch all variants.
## References
- Similar issue reported:
https://github.com/DataDog/browser-sdk/issues/2715
- TrackJS documentation:
https://trackjs.com/javascript-errors/object-not-found-matching-id-methodname-paramcount/
- Previous PR that added Id:2 suppression: #7103
## Test plan
- [x] TypeScript checks pass
- [x] Tests pass
- [x] Pre-commit hooks pass
cc @OfekShilon - could you review this since you added the original
suppression?
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
- latest biome, and fix its configuration
- fixes "static" content to be globally configured too (instead of
per-line)
- fixes issues:
- imports fixed up
- `Date.now()` vs `+new Date()`
- some unused things `_` prefixed
After discussion with the team, turned off the unused parameter warning.
Root cause: Source mapping happens AFTER beforeSend/ignoreErrors processing, so
frame.filename contains minified bundle paths, not readable source paths.
Changes:
- Add 'Canceled' to ignoreErrors array for clipboard cancellation errors
- Remove frame-based clipboard filtering (doesn't work with minified code)
- Add comprehensive comments explaining source mapping timing issue
- Keep hit testing filter using error message content (works with minified code)
- Document that frame-based filtering is unreliable for Monaco errors
This should finally stop the 20k+ COMPILER-EXPLORER-CGQ clipboard cancellation errors.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Adds Sentry debugging to capture actual runtime filter data including:
- Error value and type received by filter
- Frame filenames array
- Boolean results of hasClipboardFrame and isCancellationError checks
- Whether filter should have triggered
This will help identify why the filter isn't working despite appearing correct.
Will be removed once issue is identified.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Summary
Fixed the clipboard cancellation filter that was deployed but not
working due to `SentryCapture` context modification.
## Root Cause
The filter was checking for exact equality:
```typescript
event.exception.values[0].value === 'Canceled'
```
But `SentryCapture()` modifies error messages by adding context:
- Original: `"Canceled"`
- Modified: `"Canceled\nSentryCapture Context: Unhandled Promise
Rejection"`
## Solution
Changed to use `startsWith('Canceled')` which:
- ✅ Catches original error: `"Canceled"`
- ✅ Catches modified error: `"Canceled\nSentryCapture Context: ..."`
- ✅ More precise than `includes()` - reduces false positives
- ✅ Still combined with specific stack trace check for safety
## Test Plan
- [x] TypeScript type checking passes
- [x] Pre-commit hooks pass
- [ ] Deploy and verify clipboard cancellation errors are filtered
This should finally stop the 20k+ COMPILER-EXPLORER-CGQ occurrences.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
Fixed two Monaco Editor error filters that weren't working due to
misunderstanding the Sentry event structure:
• **COMPILER-EXPLORER-CGQ (Clipboard cancellation)**: Filter was
checking for `'Canceled: Canceled'` but actual error value is just
`'Canceled'`
• **COMPILER-EXPLORER-AXA (Hit testing)**: Filter was checking
`frames[0].function` but due to Sentry wrapping, the function name
appears in the error message instead
## Root Cause
The key insight was examining the actual JSON from Sentry UI rather than
making assumptions:
- Sentry UI displays "type: value" format but JSON has separate `type`
and `value` fields
- `frames[0]` is often Sentry's wrapper (`sentryWrapped`), not the
original error source
- Function names may appear in error messages rather than frame metadata
## Changes
1. **Fixed clipboard filter**: Changed error value check from
`'Canceled: Canceled'` to `'Canceled'`
2. **Fixed hit testing filter**: Changed from checking
`frames[0].function` to checking error message content
3. **Added debugging comments**: Comprehensive notes for future Sentry
filter debugging
## Test Plan
- [x] TypeScript type checking passes
- [x] Minimal test suite passes
- [x] Pre-commit hooks pass
- [ ] Deploy and verify errors are filtered in production
Both issues have 10k+ occurrences so this should significantly reduce
Sentry noise.
🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
- Adds `beforeSend` filter to suppress Monaco Editor clipboard
cancellation errors from Sentry
- Specifically targets "Canceled: Canceled" errors from
`monaco-editor/esm/vs/platform/clipboard/browser/clipboardService.js`
- Fixes Sentry issue COMPILER-EXPLORER-CGQ which has 20,139+ occurrences
but 0 user impact
## Problem
The Monaco Editor clipboard service generates cancellation errors when
clipboard operations are interrupted (e.g., user navigates away during
copy operation). These represent expected behavior rather than
actionable bugs, but were creating noise in Sentry with thousands of
error reports.
## Solution
Following the pattern established in PR #7830, this adds a `beforeSend`
filter that:
1. Checks if the error message is "Canceled: Canceled"
2. Verifies the stack trace contains the Monaco clipboard service file
3. Filters out the error if both conditions are met
## Test Plan
- [x] TypeScript compilation passes (`npm run ts-check`)
- [x] Linting passes (`npm run lint`)
- [x] Minimal test suite passes (`npm run test-min`)
- [x] Pre-commit hooks executed successfully
🤖 Generated with [Claude Code](https://claude.ai/code)
## Summary
- Fixes unhandled promise rejections being logged as "Non-Error capture"
in Sentry issue COMPILER-EXPLORER-BT9
- Converts all promise rejections to use proper Error objects instead of
plain objects/strings/undefined
- Adds defensive handling in Sentry's unhandled rejection listener
## Root Cause
The Sentry issue was caused by services rejecting promises with
non-Error objects:
- `CompilerService.handleRequestError()` rejected with `{request,
error}` plain objects
- Various other services rejected with strings or undefined values
- These triggered the global unhandled rejection handler, which logged
them as "Non-Error capture"
## Changes Made
1. **CompilerService**: Modified `handleRequestError()` to reject with
Error objects while preserving request context
2. **Sentry**: Enhanced unhandled rejection handler to defensively
convert non-Error reasons to Error objects
3. **MultifileService**: Changed string rejections to Error objects
4. **SharingService**: Added descriptive Error objects for link failures
5. **TreePane**: Used Error objects for user cancellation scenarios
6. **CfgView**: Used Error objects for canvas blob creation failures
## Test Plan
- [x] TypeScript compilation passes
- [x] All tests pass (npm run test-min)
- [x] Linter passes
- [x] Pre-commit hooks validated
## Impact
- Reduces Sentry noise from "Non-Error capture" events
- Provides better stack traces for debugging
- Maintains backwards compatibility (consuming code handles both Error
objects and other types)
- More robust error handling throughout the application
🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
- Replace broken regex filter with proper `beforeSend` handler for
Monaco Editor errors
- Fixes noise from Monaco Editor hit testing bug in Firefox (190K+
occurrences)
- Uses structured stack frame checking instead of string parsing
## Root Cause
COMPILER-EXPLORER-AXA was caused by a known Monaco Editor bug in Firefox
where hit testing fails with null reference errors during mouse
operations. The existing regex filter `/i is null
_doHitTestWithCaretPositionFromPoint/` was ineffective because Sentry's
`ignoreErrors` only matches error messages, not stack traces.
## Solution
Added a `beforeSend` callback that:
- Checks if the top stack frame function is
`_doHitTestWithCaretPositionFromPoint`
- Filters out any error thrown directly from this Monaco Editor function
- Uses Sentry's structured stack frames for reliable detection
## References
- Fixes Sentry issue: COMPILER-EXPLORER-AXA (190K+ occurrences)
- Related Monaco Editor bug:
https://github.com/microsoft/monaco-editor/issues/4527
## Test plan
- [x] TypeScript checks pass
- [x] Test suite passes
- [x] Pre-commit hooks pass
🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
New node sentry prefers some node.js "preload" nonsense. I use this
"hack" to avoid having to make a lock-step change to the runner: tested
locally and then deployed to staging and tested there with both
server-side and client-side errors.
This PR refactors some common utilities out of lib/ and into shared/ and
eliminates some use of underscore.js, as well as general type
improvements done along the way.