Title: Next.js middleware sourcemaps built to from .next/server/src missing · Issue #8646 · getsentry/sentry-javascript · GitHub
Open Graph Title: Next.js middleware sourcemaps built to from .next/server/src missing · Issue #8646 · getsentry/sentry-javascript
X Title: Next.js middleware sourcemaps built to from .next/server/src missing · Issue #8646 · getsentry/sentry-javascript
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/...
Open Graph 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 th...
X 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 th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/8646
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Next.js middleware sourcemaps built to from .next/server/src missing","articleBody":"### Is there an existing issue for this?\r\n\r\n- [X] I have reviewed the documentation https://docs.sentry.io/\r\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\r\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\r\n\r\n### How do you use Sentry?\r\n\r\nSentry Saas (sentry.io)\r\n\r\n### Which SDK are you using?\r\n\r\n@sentry/nextjs\r\n\r\n### SDK Version\r\n\r\n7.60.0\r\n\r\n### Framework Version\r\n\r\nNext.js 13.4.9\r\n\r\n### Link to Sentry event\r\n\r\nhttps://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\r\n\r\n### SDK Setup\r\n\r\n```javascript\r\n/**\r\n * @type {Partial\u003cimport(\"@sentry/nextjs\").SentryWebpackPluginOptions>}\r\n */\r\nconst SentryWebpackPluginOptions = {\r\n deploy: SENTRY_ENABLED\r\n ? {\r\n env: SENTRY_ENV,\r\n }\r\n : undefined,\r\n release: NEXT_PUBLIC_COMMIT_SHA,\r\n env: SENTRY_ENV,\r\n authToken: SENTRY_AUTH_TOKEN,\r\n finalize: !SENTRY_ENABLED,\r\n dryRun: !SENTRY_ENABLED,\r\n hideSourceMaps: true,\r\n silent: NODE_ENV !== 'production',\r\n}\r\n```\r\n\r\n### Steps to Reproduce\r\n\r\n1. Trigger an error in NextJS middleware.\r\n\r\n```\r\nError: this is a test error 2\r\n at Object.middleware$1 (file:///Users/work/development/app/.next/server/src/middleware.js:8544:15)\r\n at Object.\u003canonymous> (file:///Users/work/development/app/.next/server/src/middleware.js:8344:49)\r\n at Object.apply (file:///Users/work/development/app/.next/server/src/middleware.js:8424:16)\r\n at adapter (file:///Users/work/development/app/.next/server/src/middleware.js:1250:33)\r\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\r\n```\r\n\r\n2. Notice the stack trace in Sentry includes an error about absolute URLs\r\n\r\n\r\n### Expected Result\r\n\r\nSource map should shows up in Sentry.\r\n\r\n### Actual Result\r\n\r\n> 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.\r\n\r\nFrom this code: https://github.com/getsentry/sentry-javascript/blob/develop/packages/nextjs/src/config/webpack.ts#L627-L634\r\n\r\nIt seems like `.next/server/src` is not included.","author":{"url":"https://github.com/meyer9","@type":"Person","name":"meyer9"},"datePublished":"2023-07-26T01:27:55Z","url":"https://github.com/getsentry/sentry-javascript/issues/8646"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e9ea638a-373b-7e02-cb57-83e73ac912f2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 82F8:349FE8:433D91:5ECB03:6B0470A4 |
| html-safe-nonce | 2f0b9d25e6762b1ed3353f7f08f8e9f124a5262c887bbf976299e8e569f62d20 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkY4OjM0OUZFODo0MzNEOTE6NUVDQjAzOjZCMDQ3MEE0IiwidmlzaXRvcl9pZCI6IjM0MTYxODg2MjA3NzQ4NjMwMTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f1c13ce9daa9c1acc39ad5cbcb8cacee989687f7bfe3ef05f58cc764c1ed9bbc |
| hovercard-subject-tag | issue:1821419050 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/8646/issue_layout |
| twitter:image | https://opengraph.githubassets.com/03ab186970b6130506253008ba7ac9afec8558f9ceb21393dcef9e951c6cca08/getsentry/sentry-javascript/issues/8646 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/03ab186970b6130506253008ba7ac9afec8558f9ceb21393dcef9e951c6cca08/getsentry/sentry-javascript/issues/8646 |
| og:image:alt | 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 th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | meyer9 |
| hostname | github.com |
| expected-hostname | github.com |
| None | ae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cfb5f24c6e01d85f70804652a5107e5cac03a161 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width