Skip to content

Using "Loader Script" create a lot eventos of TypeError: null is not an object (evaluating 'co.document.body.appendChild') #13707

@jwv

Description

@jwv

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

8.30.0

Framework Version

No response

Link to Sentry event

https://fptic.sentry.io/issues/5739481656/?project=4504650871209984
https://fptic.sentry.io/issues/5738977641/?project=4504650871209984
https://fptic.sentry.io/issues/5739065410/?project=4504650871209984
https://fptic.sentry.io/issues/5739243469/?project=4504650871209984

Reproduction Example/SDK Setup

<script>
    window.sentryOnLoad = function () {
        Sentry.init({
            release: "[email protected]",
            tracesSampleRate: 0.5,
            maxBreadcrumbs: 50,
            sendDefaultPii: true, // debug
            initialScope: {
                user: {"logged":false},
            },
            ignoreErrors: [
                'gCrWeb',
                'Non-Error exception captured',
                'Non-Error promise rejection captured',
                'Event `ErrorEvent` captured as exception with message `Script error.`',
                "Can't find variable: _0x",
                "chrome-extension",
            ],
            denyUrls: [
                /google-analytics\.com/i,
                /www\.googletagmanager\.com/i,
                /graph\.facebook\.com/i,
                // Chrome extensions
                /extension/i,
                /extensions\//i,
                /^chrome:\/\//i,
                // Safari
                /webkit-masked-url/i,
            ],
        });

        Sentry.lazyLoadIntegration("captureConsoleIntegration").then(
            (integration) => {
                Sentry.addIntegration(integration({
                    levels: ['warn', 'error', 'debug', 'assert']
                }));
            },
        );

        Sentry.lazyLoadIntegration("httpClientIntegration").then(
            (integration) => {
                Sentry.addIntegration(integration());
            },
        );

        Sentry.lazyLoadIntegration("contextLinesIntegration").then(
            (integration) => {
                Sentry.addIntegration(integration());
            },
        );
    };
</script>

Steps to Reproduce

Using "Loader Script" with only "Enable Performance Monitoring" enabled.

This configuration will create a lot of events on sentry about:
TypeError: null is not an object (evaluating 'co.document.body.appendChild')
File: https://browser.sentry-cdn.com/8.30.0/bundle.tracing.min.js

Expected Result

No events created.

Actual Result

TypeError: null is not an object (evaluating 'co.document.body.appendChild')

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPackage: browserIssues related to the Sentry Browser SDK

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions