Skip to content

Sourcemap not working on pinia stores in nuxt #17685

@SebbeJohansson

Description

@SebbeJohansson

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

10.11.0

Framework Version

3.17.6

Link to Sentry event

https://revolutionrace-ab.sentry.io/issues/64525602/?environment=production&project=4509626362429520&query=is%3Aunresolved&referrer=issue-stream

Reproduction Example/SDK Setup

sentry.client.config.ts

import * as Sentry from '@sentry/nuxt';
Sentry.init({
  environment: useRuntimeConfig().public.Environment,
  release: useRuntimeConfig().public.BuildId,
  dsn: useRuntimeConfig().public.SentryDsn,
  // We recommend adjusting this value in production, or using tracesSampler
  // for finer control
  tracesSampleRate: 1.0,
  // This sets the sample rate to be 10%. You may want this to be 100% while
  // in development and sample at a lower rate in production
  replaysSessionSampleRate: useRuntimeConfig().public.Environment === 'production' ? 0.1 : 1.0,
  // If the entire session is not sampled, use the below sample rate to sample
  // sessions when an error occurs.
  replaysOnErrorSampleRate: 1.0,
  // If you don't want to use Session Replay, just remove the line below:
  integrations: [Sentry.replayIntegration()],
  // Setting this option to true will print useful information to the console while you're setting up Sentry.
  debug: false,
});

sentry.server.config.ts

import * as Sentry from '@sentry/nuxt';
Sentry.init({
  environment: useRuntimeConfig().public.Environment,
  release: useRuntimeConfig().public.BuildId,
  dsn: useRuntimeConfig().public.SentryDsn,
  // We recommend adjusting this value in production, or using tracesSampler
  // for finer control
  tracesSampleRate: 1.0,
  // Setting this option to true will print useful information to the console while you're setting up Sentry.
  debug: false,
});

nuxt.config.ts

-- Truncated --
  sentry: {
    org: 'revolutionrace-ab',
    project: 'storefront-nuxt',
    authToken: process.env.SentryAuthToken,
    release: {
      name: buildId,
    },
  },
  sourcemap: { client: 'hidden' },
-- Truncated --

Steps to Reproduce

  1. Create a nuxt project.
  2. Add pinia according to the documentation.
  3. Add @sentry/nuxt
  4. Make sure sourcemaps are uploaded
  5. Trigger an error within the pini store code.
  6. Check it in the Sentry ui.
  7. Notice that the code is minified in the ui.

Expected Result

I expect all ts, js and vue code to be visible non minified within the Sentry UI.

Actual Result

Image Image

Additional Context

Maybe we are missunderstanding what parts work for sourcemap info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions