You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
meyer9
changed the title
Sentry Webpack configuration on Next.js 13.4.9 does not handle absolute URLs correctly
Next.js middleware sourcemaps built to from .next/server/src missing
Jul 26, 2023
Hi @meyer9 thanks for writing in and for investigating! I believe your suspicion might be correct but I'm lacking context around NextJS middleware so I'm not sure if there are other things to consider. Since you've already come so far in debugging this, you could give adding the missing directory a try (for instance by directly modifying the file in your node modules or by cloning the repo) and see if it resolves the issue for you. Regardless though, we need to investigate this.
@lforst - when you're back, mind taking a look at this?
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
7.60.0
Framework Version
Next.js 13.4.9
Link to Sentry event
https://placepull.sentry.io/discover/mercury:343d9d59ead7441bb0f30872747d2b9a/?field=title&field=release&field=environment&field=user.display&field=timestamp&name=Error%3A+this+is+a+test+error+2&project=5662046&query=issue%3AMERCURY-8AN&sort=-timestamp&statsPeriod=90d&yAxis=count%28%29
SDK Setup
Steps to Reproduce
Expected Result
Source map should shows up in Sentry.
Actual Result
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.The text was updated successfully, but these errors were encountered: