@@ -12,25 +12,54 @@ Sentry.init({
1212 integrations : [
1313 Sentry . replayIntegration ( ) ,
1414 ] ,
15+ // Suppress known-noisy error patterns that are not actionable app bugs.
16+ // These originate from browser extensions, React hydration with Replay,
17+ // and Chrome DevTools Protocol messages.
18+ ignoreErrors : [
19+ // pushState read-only — extensions (Vue/Redux DevTools) wrap history.pushState before our app loads.
20+ // Covers all variants: with/without object descriptor suffix, case differences.
21+ / C a n n o t a s s i g n t o r e a d o n l y p r o p e r t y [ ' " ] ? p u s h S t a t e [ ' " ] ? / i,
22+ // React hydration mismatches triggered by Sentry Replay injecting DOM attributes.
23+ "Text content does not match server-rendered HTML" ,
24+ "Hydration failed because the server rendered HTML didn't match the client" ,
25+ "There was an error while hydrating" ,
26+ "Minified React error #418" ,
27+ "Minified React error #423" ,
28+ "Minified React error #425" ,
29+ // Chrome DevTools Protocol messages from extensions interacting with CodeMirror/Monaco.
30+ / O b j e c t N o t F o u n d M a t c h i n g I d : \d + / ,
31+ ] ,
1532 beforeSend ( event ) {
1633 const msg = event . exception ?. values ?. [ 0 ] ?. value ?? "" ;
1734
18- // Drop known browser-extension noise that cannot be fixed in app code:
35+ // Belt-and-suspenders: also filter in beforeSend for events that bypass
36+ // ignoreErrors (e.g. unhandledrejection events, events with no exception value).
37+ //
38+ // 1. pushState read-only — extensions (Vue/Redux DevTools, privacy tools) wrap
39+ // history.pushState before our app loads, making it read-only. Not
40+ // reproducible without the extension. Covers all TypeError variants (#434).
1941 //
20- // 1. "Cannot assign to read only property 'pushState'" — extensions
21- // (Vue/Redux DevTools, privacy tools) wrap history.pushState before our
22- // app loads, making it read-only . Not reproducible without the extension .
42+ // 2. React hydration errors — triggered by Sentry Replay injecting data-*
43+ // attributes into the DOM. React compares server HTML (no attrs) with client
44+ // HTML (Sentry attrs) → mismatch . Not a real app bug (#437) .
2345 //
24- // 2. "Object Not Found Matching Id:N, MethodName:update" — Chrome DevTools
25- // Protocol messages from extensions interacting with CodeMirror/Monaco.
26- // The error originates outside our code and only affects a single session.
46+ // 3. "Object Not Found Matching Id:N" — Chrome DevTools Protocol messages from
47+ // extensions interacting with CodeMirror/Monaco. Outside our code.
2748 const isExtensionNoise =
28- msg . includes ( "Cannot assign to read only property 'pushState' " ) ||
49+ msg . toLowerCase ( ) . includes ( "pushstate " ) ||
2950 msg . includes ( "Object Not Found Matching Id:" ) ;
3051
31- if ( isExtensionNoise ) {
52+ const isHydrationNoise =
53+ msg . includes ( "Text content does not match" ) ||
54+ msg . includes ( "Hydration failed" ) ||
55+ msg . includes ( "There was an error while hydrating" ) ||
56+ msg . includes ( "Minified React error #418" ) ||
57+ msg . includes ( "Minified React error #423" ) ||
58+ msg . includes ( "Minified React error #425" ) ;
59+
60+ if ( isExtensionNoise || isHydrationNoise ) {
3261 if ( process . env . NODE_ENV === "development" ) {
33- console . debug ( "[Sentry] Suppressed extension noise:" , msg ) ;
62+ console . debug ( "[Sentry] Suppressed noise:" , msg ) ;
3463 }
3564 return null ;
3665 }
0 commit comments