Skip to content

Sourcemaps not linked to error stack trace #15306

@mfillon

Description

@mfillon

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/vue

SDK Version

8.54.0

Framework Version

Vue 2.7.16

Link to Sentry event

No response

Reproduction Example/SDK Setup

Vite plugin config (vite.config.ts):

export default defineConfig(....
  plugins: [...,
    sentryVitePlugin({
        authToken: env.SENTRY_AUTH_TOKEN,
        org: "xxx",
        project: "xxx",
        url: "https://xxx.xxx.xxx", //self hosted URL
        disable: !env.SENTRY_AUTH_TOKEN,
        debug: true,
      }),
    ],...

Sentry initialisation code (main.ts):

Sentry.init({
    Vue,
    dsn: "...<dsnKey>...",
    environment: "local",
    integrations: [
      Sentry.browserTracingIntegration({ router }),
      Sentry.replayIntegration(),
    ],

    tracesSampleRate: 1.0,
    tracePropagationTargets: [],

    replaysSessionSampleRate: 0.1,
    replaysOnErrorSampleRate: 1.0,
  });

Steps to Reproduce

After configuration of a Vue2/Vite app to integrate Sentry, errors are reported correctly in Sentry but unminification of code using sourcemaps won't work.

Using Vite plugin configured as follows:

export default defineConfig(....
  plugins: [...,
    sentryVitePlugin({
        authToken: env.SENTRY_AUTH_TOKEN,
        org: "xxx",
        project: "xxx",
        url: "https://xxx.xxx.xxx", //self hosted URL
        disable: !env.SENTRY_AUTH_TOKEN,
        debug: true,
      }),
    ],...

On project building (yarn build), the sourcemaps are uploaded correctly to Sentry and a release created with current commit hash.
Partial build output:

Image

In Sentry, I can see the release + artifacts bundle, containing 2 artifacts (minified JS + sourcemap), though JS name is not the original one but <debug ID>-0.js

Image

After triggering an error, it's catched correctly to Sentry, release ID seems correct, but stack trace is minified.

Image

Looking at "Unminify Code" modal, I see the Debug ID way should work

Image

For "Releases", I see a "Stack Frame Not Matching Artifact Name" warning, which I don't understand

Image

Expected Result

I should see the original source files name/functions/line numbers in the error stack trace.

Actual Result

I see the minified code in the error stack trace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPackage: vueIssues related to the Sentry Vue SDK

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions