Repository navigation
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?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
9.22.0
Framework Version
Next 15.3.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
We recently migrated to the Webpack plugin and used to upload the sourcemaps using a GitHub Action - since the migration, we have many issues that throw "In App" but sourcemaps are only available up to a certain point. Previously, the same issues had 100% sourcemap coverage.
As seen here, main-*.js gets explicitly excluded from the sourcemap upload, even with widenClientFileUpload enabled:
sentry-javascript/packages/nextjs/src/config/webpackPluginOptions.ts
Lines 44 to 52 in 48f1a4f
| // TODO: We should think about uploading these when `widenClientFileUpload` is `true`. They may be useful in some situations. | |
| sourcemapUploadIgnore.push( | |
| path.posix.join(distDirAbsPath, 'static', 'chunks', 'framework-*'), | |
| path.posix.join(distDirAbsPath, 'static', 'chunks', 'framework.*'), | |
| path.posix.join(distDirAbsPath, 'static', 'chunks', 'main-*'), | |
| path.posix.join(distDirAbsPath, 'static', 'chunks', 'polyfills-*'), | |
| path.posix.join(distDirAbsPath, 'static', 'chunks', 'webpack-*'), | |
| ); | |
| } |
It seems some of our code is being bundled in the main bundle (my suspicion is that in this specific case it happens because the safeParse function is also used in instrumentation-client), which is now not available anymore to view.
Expected Result
Being able to see sourcemaps for the main bundle as well
Actual Result
See reproduction steps
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsNo status

Activity
chargome commentedon May 22, 2025
Hey @FabianKoder thanks for reaching out!
Assuming you already have set
widenClientFileUpload: truein yourwithSentryconfig, we can try to widen the scope of this flag. We'll look into it!kylemh commentedon May 26, 2025
Let me know if there's anything I can provide? I've just setup Sentry with the CLI on a relatively new Next.js App-dir app and had the same results as OP. I had
widenClientFileUpload: true(along w/ all the other defaults from the CLI)If it helps, this is the feedback I'm seeing Sentry Dashboard
andreiborza commentedon May 27, 2025
Hi @kylemh, thanks for writing in.
Just to make sure: Are you deploying the files that have been injected with debug ids, i.e. the files you built are also the files you deployed?
kylemh commentedon May 27, 2025
I follow the Docker template for self-hosting and run the next.js build command. I don't feel like I'm doing anything unique in regards to deploying files. Is that a good answer?
22 remaining items
cobyeastwood183 commentedon May 27, 2025
Hey, had customers writing in about this as well for main-* files. Using
sourcemaps: { ignore: [] }in the next.config sentryBuildOptions fixes it and adds the main-* files, without it the events debug ids will not map. Any way we can change those defaults to be just an empty array when widenClientFileUpload option is used?https://sentry.zendesk.com/agent/tickets/153478
https://sentry.zendesk.com/agent/tickets/153680
andreiborza commentedon May 28, 2025
We need to evaluate if everything should be included or if
main-*files are enough. @chargome is on it.FabianKoder commentedon May 28, 2025
Can confirm issue is resolved by overriding the ignores with the following values:
Personally, I guess, next internals aren't really needed so these settings could be sufficient.
kylemh commentedon May 28, 2025
Okay. That makes a bit more sense for my situation. I was just testing integration and purposefully throwing errors. The stack traces provided to me were primarily internal (which makes sense in those situations), so the stack trace seemed improper. I'll circle back once I actually see app-related exceptions and their stack traces.
github-actions commentedon May 28, 2025
A PR closing this issue has just been released 🚀
This issue was referenced by PR #16406, which was included in the 9.23.0 release.