Skip to content

Permission denied to access object from browserMetrics.ts when using @sentry/nuxt on Firefox #16362

@MouradiSalah

Description

@MouradiSalah

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nuxt

SDK Version

9.19.0

Framework Version

Nuxt 3.17.2

Link to Sentry event

No response

Reproduction Example/SDK Setup

import * as Sentry from '@sentry/nuxt'

const config = useRuntimeConfig()
const env = process.env.NODE_ENV ?? 'development'

if (config.public.sentryDsn) {
  Sentry.init({
    dsn: config.public.sentryDsn,
    environment: env,
    sendDefaultPii: true,
    integrations: [Sentry.replayIntegration()],
    tracesSampleRate: env === 'production' ? 0.1 : 1.0,
    replaysSessionSampleRate: env === 'production' ? 0.1 : 1.0,
    replaysOnErrorSampleRate: 1.0,
  })
}

Steps to Reproduce

  1. Use @sentry/nuxt 9.19.0 in a Nuxt 3.17.2 project
  2. Add tracesSampleRate dynamically depending on environment
  3. Open the site in Firefox
  4. Observe the browser console

Expected Result

Sentry should correctly respect the tracesSampleRate setting and begin capturing performance traces accordingly.

Actual Result

On Firefox, the following error floods the console:


Uncaught Error: Permission denied to access object
    at browserMetrics.ts:458:43

This appears multiple times and only in Firefox.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions