Skip to content

[NextJS] [Source Maps] Unminify stacktrace is failing despite debugId for every relevant source map #14883

@digitalhank

Description

@digitalhank

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/nextjs

SDK Version

8.47.0

Framework Version

14.1.4

Link to Sentry event

No response

Reproduction Example/SDK Setup

Despite each row showing that source maps and debugId have been properly implemented, the stack trace is still minified.

Image

Steps to Reproduce

const nextConfig = {
  nx: {
    svgr: true,
  },
  reactStrictMode: true,
  productionBrowserSourceMaps: true,
  output: 'standalone',
  outputFileTracing: true,
  compiler: {
    emotion: {
      autoLabel: 'always',
      labelFormat: '[local]-host',
    },
  },
  experimental: {
    outputFileTracingRoot: path.join(__dirname, '../../'),
    instrumentationHook: true,
  },
  webpack(config, options) {
    if (process.env.NODE_ENV !== 'development') config.cache = false

    config.output.sourceMapFilename =
      process.env.NODE_ENV === 'development' ? '[name].js.map' : '[file].map'

    return config
  },
}


  return withSentryConfig(await nxConfig(phase), {
    excludeServerRoutes: [/\/api\/proxy.*$/],
    autoInstrumentMiddleware: false,
    unstable_sentryWebpackPluginOptions: {
      sourcemaps: {
        disable: true,
      },
    },
  })
  1. Turn off source map in sentry but activate "productionBrowserSourceMaps" in nextjs
  2. use "sentry cli sourcemaps inject" to inject debugId into source files.
  3. Deploy image and upload source files to sentry using "sentry cli sourcemaps upload"
  4. Trigger error
  5. Result?

Result?

Expected Result

See unminified stack trace

Actual Result

Nothing

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions