Closed as not planned
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Self-hosted/on-premise
Which SDK are you using?
@sentry/nextjs
SDK Version
8.30.0
Framework Version
Next 14.2.6
Link to Sentry event
No response
Reproduction Example/SDK Setup
// sentry.client.config.ts
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: '...',
debug: true,
enabled: true,
environment: process.env.NEXT_PUBLIC_APP_ENV,
});
// sentry.server.config.ts , sentry.edge.config.ts
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: '...',
debug: true,
});
Steps to Reproduce
- Throw an error from
sentry-example-page
generated withnpx @sentry/wizard@latest -i sourcemaps
- Source maps for this event not working:


- This is how the artifacts look like:


The way I see it: Sentry renames files, replacing their names with Debug ID and moving them to the root folder; then Sentry tries to find a file in _next/server/*
and fails because there's no such file.
My next.config.js
:
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
output: "standalone",
i18n: {
locales: ["en"],
defaultLocale: "en",
},
// fix 'fn' not found
webpack(config, { webpack }) {
config.resolve.fallback = {
fs: false,
dns: false,
child_process: false,
};
config.plugins.push(
new webpack.DefinePlugin({
__SENTRY_DEBUG__: false,
__SENTRY_TRACING__: false,
})
);
return config;
},
async redirects() {
return [];
},
async headers() {
return [
{
// Apply these headers to all routes in your application.
source: "/:any*",
headers: [
{
key: "X-Frame-Options",
value: "SAMEORIGIN",
},
],
},
];
},
experimental: {
forceSwcTransforms: true,
instrumentationHook: true,
},
};
const nextConfigWithSentry = withSentryConfig(nextConfig, {
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "sentry",
project: "...",
widenClientFileUpload: true,
transpileClientSDK: true,
disableLogger: false,
});
module.exports = nextConfigWithSentry;
Expected Result
Files uploaded to Sentry with their original names and paths. Source maps work.
Actual Result
Every file is renamed with format [debug_id].js
and [debug_id].js.map
and uploaded at root folder.
Metadata
Metadata
Assignees
Type
Projects
Status
No status