Skip to content

Sentry sourcemap not working with Remix + Vite #18942

@jiaxin-lin

Description

@jiaxin-lin

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/remix

SDK Version

10.36.0

Framework Version

@remix-run/* 2.17.4

Link to Sentry event

https://promi-d6.sentry.io/issues/7140816528/?project=4507483639316480&query=is%3Aunresolved&referrer=issue-stream

Reproduction Example/SDK Setup

vite.config.ts

export default defineConfig({
    ...
    sentryVitePlugin({
      authToken: process.env.SENTRY_AUTH_TOKEN,
      org: "promi-d6",
      project: "javascript-remix",
    }),
  ],
  ...
  build: {
    sourcemap: true, // Source map generation must be turned on
    ...
  },
}) satisfies UserConfig;

Sentry:

  Sentry.init({
    dsn: DSN,
    ...
    attachStacktrace: true,
    integrations: [
      Sentry.captureConsoleIntegration({
        levels: ["warn", "error"],
      }),
    ],
  });
}

Steps to Reproduce

We build the code using vite and sentry vite plugin, we were able to verify that
- Debug ID matches between event and upload
- Download the minified js and source maps, it works locally with source-map library

However, the code still shows as minified instead of the deminified version

Expected Result

Seeing the code with deminified version in sentry UI

Actual Result

We are seeing the stacktrace code in its raw (minified) form

Additional Context

No response

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

    Labels

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions