-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK
Description
Is there an existing issue for this?
- I have reviewed the documentation https://docs.sentry.io/
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- 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
7.60.0
Framework Version
Next.js 13.4.9
Link to Sentry event
SDK Setup
/**
* @type {Partial<import("@sentry/nextjs").SentryWebpackPluginOptions>}
*/
const SentryWebpackPluginOptions = {
deploy: SENTRY_ENABLED
? {
env: SENTRY_ENV,
}
: undefined,
release: NEXT_PUBLIC_COMMIT_SHA,
env: SENTRY_ENV,
authToken: SENTRY_AUTH_TOKEN,
finalize: !SENTRY_ENABLED,
dryRun: !SENTRY_ENABLED,
hideSourceMaps: true,
silent: NODE_ENV !== 'production',
}
Steps to Reproduce
- Trigger an error in NextJS middleware.
Error: this is a test error 2
at Object.middleware$1 (file:///Users/work/development/app/.next/server/src/middleware.js:8544:15)
at Object.<anonymous> (file:///Users/work/development/app/.next/server/src/middleware.js:8344:49)
at Object.apply (file:///Users/work/development/app/.next/server/src/middleware.js:8424:16)
at adapter (file:///Users/work/development/app/.next/server/src/middleware.js:1250:33)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
- Notice the stack trace in Sentry includes an error about absolute URLs
Expected Result
Source map should shows up in Sentry.
Actual Result
The abs_path of the stack frame is /Users/work/development/app/.next/server/src/middleware.js which is not a valid URL. Read our docs for troubleshooting help.
From this code: https://github.com/getsentry/sentry-javascript/blob/develop/packages/nextjs/src/config/webpack.ts#L627-L634
It seems like .next/server/src
is not included.
Metadata
Metadata
Assignees
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK