Title: Collecting page data ...TypeError: Cannot read property 'getInitialProps' of undefined · Issue #5978 · getsentry/sentry-javascript · GitHub
Open Graph Title: Collecting page data ...TypeError: Cannot read property 'getInitialProps' of undefined · Issue #5978 · getsentry/sentry-javascript
X Title: Collecting page data ...TypeError: Cannot read property 'getInitialProps' of undefined · Issue #5978 · getsentry/sentry-javascript
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/...
Open Graph 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 th...
X 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 th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/5978
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Collecting page data ...TypeError: Cannot read property 'getInitialProps' of undefined","articleBody":"### Is there an existing issue for this?\r\n\r\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\r\n- [X] I have reviewed the documentation https://docs.sentry.io/\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 package are you using?\r\n\r\n@sentry/nextjs\r\n\r\n### SDK Version\r\n\r\n7.15\r\n\r\n### Framework Version\r\n\r\n_No response_\r\n\r\n### Link to Sentry event\r\n\r\n_No response_\r\n\r\n### Steps to Reproduce\r\n\r\nclone https://github.com/a-ursino/nextjs-sentry-bug\r\n`yarn`\r\n`yarn build`\r\n\r\nVerify errors in the build output.\r\n\r\nHowever if I don't import the content of the homepage from `src/pages/Homepage` and just inline it in `pages/index.ts` everything works fine.\r\nIf I disable sentry from `next.config.js`, I can still import the content from `src/pages/Homepage` and the build works fine.\r\n\r\nNOTE:\r\nI've created the example website with\r\n`npx create-next-app@latest`\r\n`npx @sentry/wizard -i nextjs`\r\n\r\n\r\n### Expected Result\r\n\r\nbuild to succeed \r\n\r\n### Actual Result\r\n\r\n```\r\ninfo - Linting and checking validity of types\r\ninfo - Creating an optimized production build\r\ninfo - Compiled successfully\r\ninfo - Collecting page data ...TypeError: Cannot read property 'getInitialProps' of undefined\r\n at Object.355 (/Users/xyz/dev/-personal/my-app/.next/server/pages/index.js:180:41)\r\n```","author":{"url":"https://github.com/a-ursino","@type":"Person","name":"a-ursino"},"datePublished":"2022-10-17T20:40:20Z","url":"https://github.com/getsentry/sentry-javascript/issues/5978"}
| 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:e81e37d6-83c8-f108-aaa6-29b79b9201f1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C6F8:2BA76E:F1286:152CD8:6B046E51 |
| html-safe-nonce | 059706744fbd34b3e2d7f12277b8655b607252f15b56a3a8c1bf24e9cec18498 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNkY4OjJCQTc2RTpGMTI4NjoxNTJDRDg6NkIwNDZFNTEiLCJ2aXNpdG9yX2lkIjoiMjQyODIyNzMzNTMwOTUyMDQ2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4fd1a744c9e62dbaae226e298c993a7b0ffa6841aaa99aaf90c2c8d1ccf30d08 |
| hovercard-subject-tag | issue:1412198147 |
| 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/5978/issue_layout |
| twitter:image | https://opengraph.githubassets.com/905f472c0d04e54f55e9cd0911b19d74069bc5d2294cd61d868fe12f34c01097/getsentry/sentry-javascript/issues/5978 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/905f472c0d04e54f55e9cd0911b19d74069bc5d2294cd61d868fe12f34c01097/getsentry/sentry-javascript/issues/5978 |
| og:image:alt | 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 th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | a-ursino |
| 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