Skip to content

Error from browser extension is captured by Sentry and depleting usage quota #69096

Closed

Description

@remorses

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

This is the stack trace of the error

TypeError: 'defineProperty' on proxy: trap returned falsish for property 'request'
  at Function.defineProperty(<anonymous>)
  at v(app:///js/inject.bundle.js:1:14842)
  at ? (app:///js/inject.bundle.js:1:15576)
  at ? (app:///js/inject.bundle.js:1:15731)

As you can see from the filename starting with app:/// this is from a chrome extension

Expected Result

Error should be filtered out because from an extension

Actual Result

Error is captured and depleting quota

Product Area

Ingestion and Filtering

Link

No response

DSN

No response

Version

No response

Activity

  1. getsantry commented on Apr 17, 2024

    @getsantry
    Contributor

    Assigning to @getsentry/support for routing ⏲️

  2. moved this to Waiting for: Support in GitHub Issues with 👀 2on Apr 17, 2024
  3. getsantry commented on Apr 17, 2024

    @getsantry
    Contributor

    Routing to @getsentry/product-owners-ingestion-and-filtering for triage ⏲️

  4. moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 2on Apr 17, 2024
  5. Dav1dde commented on Apr 18, 2024

    @Dav1dde
    Member

    We can't currently filter this error based purely on the message (it's generic enough that it doesn't always have to come from an extension) and all our filters after the SDK are currently based on the message. We'd have to filter on the stack trace as well, can you post a link to the issue in Sentry or an example error JSON payload so we can take a look and potentially come up with some better filtering?

    In the meantime you can start manually filtering out these errors, either in the SDK or via Inbound Filters in Sentry. We have a blog post summarizing all your options: https://blog.sentry.io/making-your-javascript-projects-less-noisy/

  6. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 2on Apr 18, 2024
  7. remorses commented on Apr 18, 2024

    @remorses
    Author

    this is part of the json

    "errors": [
            {
                "type": "js_no_source",
                "symbolicator_type": "missing_source",
                "url": "app:///js/inject.bundle.js"
            }
        ],
        "exception": {
            "values": [
                {
                    "type": "TypeError",
                    "value": "'defineProperty' on proxy: trap returned falsish for property 'request'",
                    "stacktrace": {
                        "frames": [
                            {
                                "module": "inject.bundle",
                                "filename": "app:///js/inject.bundle.js",
                                "abs_path": "app:///js/inject.bundle.js",
                                "lineno": 1,
                                "colno": 15731,
                                "in_app": true
                            },
                            {
                                "module": "inject.bundle",
                                "filename": "app:///js/inject.bundle.js",
                                "abs_path": "app:///js/inject.bundle.js",
                                "lineno": 1,
                                "colno": 15576,
                                "in_app": true
                            },
                            {
                                "function": "v",
                                "module": "inject.bundle",
                                "filename": "app:///js/inject.bundle.js",
                                "abs_path": "app:///js/inject.bundle.js",
                                "lineno": 1,
                                "colno": 14842,
                                "in_app": true
                            },
                            {
                                "function": "Function.defineProperty",
                                "filename": "<anonymous>",
                                "abs_path": "<anonymous>",
                                "in_app": true
                            }
                        ]
                    },
                    "raw_stacktrace": {
                        "frames": [
                            {
                                "filename": "app:///js/inject.bundle.js",
                                "abs_path": "app:///js/inject.bundle.js",
                                "lineno": 1,
                                "colno": 15731,
                                "in_app": true
                            },
                            {
                                "filename": "app:///js/inject.bundle.js",
                                "abs_path": "app:///js/inject.bundle.js",
                                "lineno": 1,
                                "colno": 15576,
                                "in_app": true
                            },
                            {
                                "function": "v",
                                "filename": "app:///js/inject.bundle.js",
                                "abs_path": "app:///js/inject.bundle.js",
                                "lineno": 1,
                                "colno": 14842,
                                "in_app": true
                            },
                            {
                                "function": "Function.defineProperty",
                                "filename": "<anonymous>",
                                "abs_path": "<anonymous>",
                                "in_app": true
                            }
                        ]
                    },
                    "mechanism": { "type": "onerror", "handled": false }
                }
            ]
        },
  8. moved this to Waiting for: Product Owner in GitHub Issues with 👀 2on Apr 18, 2024
  9. Dav1dde commented on Apr 18, 2024

    @Dav1dde
    Member

    I was talking to the SDK folk about this and it is unfortunate but we cannot detect that this stack trace is coming from an extension reliably.

    The SDK prepends app:/// to aid with source map resolution, the location app:///js/inject.bundle.js could be coming from a <script src="js/inject.bundle.js"> or <script src="https://some-domain-or-cdn/js/inject.bundle.js"> in either case a website could have included this JS on purpose.

    The idea came up that you can tell the SDK which JS sources are yours and it would automatically ignore errors coming from other sources, mentioned here: getsentry/sentry-javascript#10882 (comment)

    So unfortunately you have no other choice than ignoring the error directly in the SDK using one of the methods mentioned here or using an Inbound Filter.

    I'll be closing the issue since there is nothing we can do about it right now. We'll still track this is in the mentioned issue to improve the situation in the future.

  10. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 2on Apr 18, 2024
  11. locked and limited conversation to collaborators on May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions