Skip to content

Sentry don't show code source for nuxt app #18622

@AlekseyPn

Description

@AlekseyPn

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/nuxt

SDK Version

9.47.1

Framework Version

Nuxt 3.12.4

Link to Sentry event

No response

Reproduction Example/SDK Setup

      Sentry.init({
        enabled: config.value?.sentry?.enabled || false,
        dsn: config.value?.sentry?.dsn || '',
        tracesSampleRate: config.value?.environment === DeployTypes.Production ? 0.1 : 1.0,
        environment: config.value?.environment as DeployTypes,
        release: config.value?.sentry?.releaseVersion,
        ignoreErrors: ['Unable to preload CSS for', 'Failed to fetch dynamically imported module'],
        integrations: [
          (Sentry as any).replayIntegration({
            maskAllText: false,
            blockAllMedia: false,
            mask: ['[data-private]'],
            networkDetailAllowUrls: [/.*/],
            networkCaptureBodies: true,
            networkRequestHeaders: ['X-Custom-Header'],
            networkResponseHeaders: ['X-Custom-Header'],
          }),
        ],
        replaysSessionSampleRate: 1.0,
        replaysOnErrorSampleRate: 1.0,        
      });


// nuxt.config.ts part
sentry: {
    debug: true,
    sourceMapsUploadOptions: {
      enabled: (SENTRY_PUBLISH_RELEASE && JSON.parse(SENTRY_PUBLISH_RELEASE)) || false,
      sourcemaps: {
        assets: ['.output/public/_nuxt/**/*.js', '.output/public/_nuxt/**/*.map'],
      },
    },    
  },

Steps to Reproduce

Expected Result

Sentry shows source of code in event

Actual Result

Image

Additional Context

I tried different configuration for nuxt.config.ts for upload sourcemaps to sentry, but in sentry I didn't see nothing. Help please debug this behavior.

Image

Source maps generated correctly, but sentry cant associated it in event

Image

I tried legacy upload, upload through @sentry/vite-plugin, and other ways for configuration this. But results always same, and I tried configure RewriteFrames, tried other sdk version.

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions