Skip to content

Sourcemaps are uploaded but not used #655

@poskadesign

Description

@poskadesign

Environment

Running a self-hosted version of Sentry. Deploying a static React app (Vite builder, Vercel for deployment)

"@sentry/tracing": "^7.114.0",
"@sentry/vite-plugin": "^2.22.6",
...
"vite": "^5.4.10"

vite.config.ts

defineConfig({
        plugins: [sentryVitePlugin({
            org: 'myproject',
            project: 'internal',
            telemetry: false,
            sourcemaps: {
                assets: './dist/**',
                filesToDeleteAfterUpload: ['./**/*.js.map'],
            },
            release: {
                name: process.env.PUB_RELEASE,
            },
            authToken: '...',
        })],
        build: { sourcemap: true }
}
  1. I've made sure the build is a production build.
  2. The release has a defined name.
  3. I've made sure the files (both minified .js and .js,map) are uploaded by going to the admin panel.
  4. The source maps work in the browser.5. I have completed this checklist to no avail https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js

Steps to Reproduce

After a deployment, if the sourcemaps are exposed on the server, Sentry picks them up and uses them in Issues. But once I use filesToDeleteAfterUpload to remove them, it stops resolving even though they are successfully uploaded.

Expected Result

Sourcemaps are used to resolve stack traces in the Issues tab.

Actual Result

Issues tab still shows the minified version.

Can you please help me debug this? I've sat for several days on this and can't sort it out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions