-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Description
Reproduction/Setup
Used SDK: @sentry/nuxt
Reproduction Repo: https://github.com/dervondenbergen/sentry-sourcemap-reproduction
Steps to Reproduce
First, enable Nitro source map mapping in Nuxt options: nitro.experimental.sourcemapMinify: false
When throwing an error on the server-side (on page load), Sentry shows the wrong line in the stack trace. This is because the minified file which is uploaded to Sentry does not match the one that is actually deployed. The lines at the top of the file differ (this could also be a problem in Nitro).
- Mapping on client-side (navigation) shows correct line: https://dervondenbergen.sentry.io/issues/7106776775/?project=4510521872678912
- Mapping on server-side (page load) shows wrong line: https://dervondenbergen.sentry.io/issues/7106821775/?project=4510521872678912
Minified, raw stack trace shows line 357
TypeError: numbers.map is not a function Version 0.0.3
at arrayNumberTransformer (/.output/server/chunks/build/transformers-JL5SrVZo.mjs:357:26)
However, the line with the culprit is actually 369, but Sentry shows the } in the stack preview
Expected Result
Minified files uploaded to Sentry have lines matching the actual application.
Actual Result
Another image (from actual app, not the reproduction) with source map uploaded to Sentry (left) vs remote source map (right) with the following minified line from the stack trace: .output/server/chunks/build/server.mjs:41275:24 (problem is .map):
Potential Problems
- Nitro might generate multiple builds, after the files were already uploaded to Sentry.
