Skip to content

NextJS tries to upload source maps when sourcemaps.disable is set to true #16810

Open
@rodolfoBee

Description

@rodolfoBee

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

9.34.0

Framework Version

15.3.2

Link to Sentry event

No response

Reproduction Example/SDK Setup

next.config.js file:

export default withSentryConfig(nextConfig, {
org: "...",
project: "...",
authToken:"...",

debug: true,
silent: false,

release:{
    create: false,
},

sourcemaps: {
    disable: true,
},
});

Steps to Reproduce

  1. Configure the SDK as above
  2. Build the app

Expected Result

The SDK does not attempt to upload source maps in any form: https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/build/#sourcemaps.disable

Actual Result

It still tries to upload source maps.

Log:

npm run build           

> 15nexttest@0.1.0 build
> next build

   ▲ Next.js 15.3.2
   - Experiments (use with caution):
     · clientTraceMetadata

   Creating an optimized production build ...
[@sentry/nextjs - Node.js] Info: Using environment variables configured in ".env.sentry-build-plugin".
[@sentry/nextjs - Node.js] Debug: Release injection disabled via `release.inject` option. Will not inject release.
[@sentry/nextjs - Node.js] Debug: The component name annotate plugin is currently disabled. Skipping component name annotations.
[@sentry/nextjs - Node.js] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[@sentry/nextjs - Node.js] Debug: Source map upload was disabled. Will not upload sourcemaps using debug ID process.
[@sentry/nextjs - Node.js] Debug: Could not determine debug ID from bundle. This can happen if you did not clean your output folder before installing the Sentry plugin. File will not be source mapped: ...
[same for other files]
> Adding source map references
> Nothing to upload
[@sentry/nextjs - Node.js] Info: Successfully uploaded source maps to Sentry
[@sentry/nextjs - Edge] Info: Using environment variables configured in ".env.sentry-build-plugin".
[@sentry/nextjs - Edge] Debug: Release injection disabled via `release.inject` option. Will not inject release.
[@sentry/nextjs - Edge] Debug: The component name annotate plugin is currently disabled. Skipping component name annotations.
[@sentry/nextjs - Edge] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[@sentry/nextjs - Edge] Debug: Source map upload was disabled. Will not upload sourcemaps using debug ID process.
[@sentry/nextjs - Edge] Debug: Could not determine debug ID from bundle. This can happen if you did not clean your output folder before installing the Sentry plugin. File will not be source mapped: ...
[same for other files]
> Found 0 files
> Adding source map references
> Nothing to upload
[@sentry/nextjs - Edge] Info: Successfully uploaded source maps to Sentry
[@sentry/nextjs - Client] Info: Using environment variables configured in ".env.sentry-build-plugin".
[@sentry/nextjs - Client] Debug: Release injection disabled via `release.inject` option. Will not inject release.
[@sentry/nextjs - Client] Debug: The component name annotate plugin is currently disabled. Skipping component name annotations.
[@sentry/nextjs - Client] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[@sentry/nextjs - Client] Debug: Source map upload was disabled. Will not upload sourcemaps using debug ID process.
[@sentry/nextjs - Client] Debug: Could not determine debug ID from bundle. This can happen if you did not clean your output folder before installing the Sentry plugin. File will not be source mapped: ...
[same for other files]
> Found 0 files
> Adding source map references
> Nothing to upload
[@sentry/nextjs - Client] Info: Successfully uploaded source maps to Sentry
 ✓ Compiled successfully in 15.0s

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Waiting for: Product Owner

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions