Title: Crash on server side running on Vercel after upgrading to Next.js 12 · Issue #4103 · getsentry/sentry-javascript · GitHub
Open Graph Title: Crash on server side running on Vercel after upgrading to Next.js 12 · Issue #4103 · getsentry/sentry-javascript
X Title: Crash on server side running on Vercel after upgrading to Next.js 12 · Issue #4103 · getsentry/sentry-javascript
Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javascript/releases Provide a link to the aff...
Open Graph Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
X Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/4103
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash on server side running on Vercel after upgrading to Next.js 12","articleBody":"\u003c!-- Requirements: please go through this checklist before opening a new issue -->\r\n\r\n- [x] Review the documentation: https://docs.sentry.io/\r\n- [x] Search for existing issues: https://github.com/getsentry/sentry-javascript/issues\r\n- [x] Use the latest release: https://github.com/getsentry/sentry-javascript/releases\r\n- [ ] Provide a link to the affected event from your Sentry account\r\n\r\n## Package + Version\r\n\r\n- [ ] `@sentry/browser`\r\n- [ ] `@sentry/node`\r\n- [ ] `raven-js`\r\n- [ ] `raven-node` _(raven for node)_\r\n- [x] other: `@sentry/nextjs`\r\n\r\n### Version:\r\n\r\n```\r\n6.13.3\r\n```\r\n\r\n## Description\r\n\r\nAfter upgrading a project from Next 11.1.2 to 12.0.1, the Next.js-powered API endpoints start to crash, as in https://drafted-webapp-hmopbeh9f-davidguijarro.vercel.app/api/status.\r\n\r\nHere's a sample log of the error:\r\n\r\n```\r\n[GET] /api/status\r\n09:32:11:52\r\n2021-10-29T07:32:12.548Z\t1c5c0769-4fd8-4480-8b9a-08598598cd1f\tERROR\tError: Cannot find module './browser'\r\nRequire stack:\r\n- /var/task/node_modules/@sentry/tracing/dist/index.js\r\n- /var/task/node_modules/@sentry/node/dist/handlers.js\r\n- /var/task/node_modules/@sentry/node/dist/index.js\r\n- /var/task/node_modules/@sentry/nextjs/dist/index.server.js\r\n- /var/task/.next/server/pages/api/status.js\r\n- /var/task/node_modules/next/dist/server/next-server.js\r\n- /var/task/___next_launcher.js\r\n- /var/runtime/UserFunction.js\r\n- /var/runtime/index.js\r\n at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)\r\n at Function.Module._load (internal/modules/cjs/loader.js:745:27)\r\n at Module.require (internal/modules/cjs/loader.js:961:19)\r\n at require (internal/modules/cjs/helpers.js:92:18)\r\n at Object.\u003canonymous> (/var/task/node_modules/@sentry/tracing/dist/index.js:3:17)\r\n at Module._compile (internal/modules/cjs/loader.js:1072:14)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)\r\n at Module.load (internal/modules/cjs/loader.js:937:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:778:12)\r\n at Module.require (internal/modules/cjs/loader.js:961:19) {\r\n code: 'MODULE_NOT_FOUND',\r\n requireStack: [\r\n '/var/task/node_modules/@sentry/tracing/dist/index.js',\r\n '/var/task/node_modules/@sentry/node/dist/handlers.js',\r\n '/var/task/node_modules/@sentry/node/dist/index.js',\r\n '/var/task/node_modules/@sentry/nextjs/dist/index.server.js',\r\n '/var/task/.next/server/pages/api/status.js',\r\n '/var/task/node_modules/next/dist/server/next-server.js',\r\n '/var/task/___next_launcher.js',\r\n '/var/runtime/UserFunction.js',\r\n '/var/runtime/index.js'\r\n ]\r\n}\r\nRequestId: 1c5c0769-4fd8-4480-8b9a-08598598cd1f Error: Runtime exited with error: exit status 1\r\nRuntime.ExitError\r\n```\r\n\r\nWeird enough, this only happens when deployed to Vercel, not when running on local. \r\n\r\nI also confirmed that completely removing Sentry from the project solves the issue.","author":{"url":"https://github.com/davguij","@type":"Person","name":"davguij"},"datePublished":"2021-10-29T07:34:07Z","url":"https://github.com/getsentry/sentry-javascript/issues/4103"}
| 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:78c64bbc-fa7f-074d-19a2-cf5392fb82f2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A930:1C8FCC:1B30AD:249214:6B043844 |
| html-safe-nonce | e0ce4c0a55f7ef3d332b5e28b5da5141746adc21a0a3ef5f4c4c8e9a961b342b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTMwOjFDOEZDQzoxQjMwQUQ6MjQ5MjE0OjZCMDQzODQ0IiwidmlzaXRvcl9pZCI6IjI3NDczNjU0NTU3NjQ0MDQyOTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 018a1b5a8a39207229cd36e7a14786bca47368246e0d677465a8cf1fdd95aee5 |
| hovercard-subject-tag | issue:1039257192 |
| 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/4103/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b6226b289f43055b01e7fb8a27883604c64d3ee290a51319bda250d6fbf3aacc/getsentry/sentry-javascript/issues/4103 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b6226b289f43055b01e7fb8a27883604c64d3ee290a51319bda250d6fbf3aacc/getsentry/sentry-javascript/issues/4103 |
| og:image:alt | Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | davguij |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| 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 | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| 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