Skip to content

Commit

Permalink
ref(browser-extensions): Add new regex for permission denied to inbou…
Browse files Browse the repository at this point in the history
…nd filter (#3442)

There are some errors in Sentry that throw this:


https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Property_access_denied

Often these errors are caused by extensions that do things that are not
allowed.
The samples we found in Sentry are thrown in minified React bundles.

ref:
getsentry/sentry-javascript#10882 (comment)
  • Loading branch information
HazAT authored Apr 18, 2024
1 parent 56c3eb8 commit c5cde46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
**Internal:**

- Emit negative outcomes in metric stats for metrics. ([#3436](https://github.com/getsentry/relay/pull/3436))
- Add new inbound filter: Permission denied to access property "x" ([#3442](https://github.com/getsentry/relay/pull/3442))

## 24.4.0

Expand Down
7 changes: 6 additions & 1 deletion relay-filter/src/browser_extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ static EXTENSION_EXC_VALUES: Lazy<Regex> = Lazy::new(|| {
# Googletag is also very similar, caused by adblockers
Cannot\sredefine\sproperty:\s(solana|ethereum|googletag)|
# Translation service errors in Chrome on iOS
undefined\sis\snot\san\sobject\s\(evaluating\s'a.L'\)
undefined\sis\snot\san\sobject\s\(evaluating\s'a.L'\)|
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Property_access_denied
# Usually caused by extensions that do stuff that isn't allowed
Permission\sdenied\sto\saccess\sproperty\s
"#,
)
.expect("Invalid browser extensions filter (Exec Vals) Regex")
Expand Down Expand Up @@ -269,6 +272,8 @@ mod tests {
"Cannot redefine property: ethereum",
"Cannot redefine property: googletag",
"undefined is not an object (evaluating 'a.L')",
"Permission denied to access property \"correspondingUseElement\"",
"Permission denied to access property \"document\"",
];

for exc_value in &exceptions {
Expand Down

0 comments on commit c5cde46

Please sign in to comment.