Skip to content

Browser lib contains variable "chrome" that conflicts with the global "chrome" variable #6880

Closed
@wesleyyee

Description

@wesleyyee

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/browser

SDK Version

7.31.1

Framework Version

No response

Link to Sentry event

No response

SDK Setup

import * as Sentry from '@sentry/browser';
import { BrowserTracing } from '@sentry/tracing';

Sentry.init({
dsn: SENTRY_DSN,
integrations: [new BrowserTracing()],

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: isProduction ? 0.5 : 1.0,
});

Steps to Reproduce

  • Import sentry into script
  • Load script in browser

Expected Result

No conflicting variable

Actual Result

Uncaught SyntaxError: Identifier 'chrome' has already been declared

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: browserIssues related to the Sentry Browser SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions