Skip to content

Sourcemaps not working for Vercel + Sveltekit (paths for stack trace frames are absolute from the root filesystem rather than relative) #10089

Description

@fnimick

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/sveltekit

SDK Version

7.92.0

Framework Version

Sveltekit 2.0.6

Link to Sentry event

https://million-marker.sentry.io/issues/4829645193/

SDK Setup

  Sentry.init({
    dsn: "https://7f6570917828021f8dea53dc2b778775@o1098001.ingest.sentry.io/4505744165699584",
    tracesSampleRate: 1,
    environment: PUBLIC_DEPLOY_ENV,
  });

Steps to Reproduce

At some point (not clear when), errors are being captured with the absolute path of the running file in the stack track frame (e.g. /var/task/vercel/path0/.svelte-kit/output/server/entries/endpoints/sentry-example/_server.js) rather than the expected relative stack track frame. This means that the sourcemaps are not matching, since the source map path being searched for is ~/var/task/vercel/path0/.svelte-kit/output/server/entries/endpoints/sentry-example/_server.js and the actual source map path from my uploaded artifact is ~/entries/endpoints/sentry-example/_server.js.

Expected Result

The stack trace should contain a relative frame which corresponds to generated source maps.

Actual Result

The stack trace frame is the full path, from the root /, of the running file in the Vercel VM.

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