Title: Errors with ky / globalThis.fetch when trying to upgrade @sentry/nextjs > 7.29.0: typeerror, cannot read properties of undefined (reading 'bind') · Issue #7070 · getsentry/sentry-javascript · GitHub
Open Graph Title: Errors with ky / globalThis.fetch when trying to upgrade @sentry/nextjs > 7.29.0: typeerror, cannot read properties of undefined (reading 'bind') · Issue #7070 · getsentry/sentry-javascript
X Title: Errors with ky / globalThis.fetch when trying to upgrade @sentry/nextjs > 7.29.0: typeerror, cannot read properties of undefined (reading 'bind') · Issue #7070 · 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/7070
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Errors with ky / globalThis.fetch when trying to upgrade @sentry/nextjs > 7.29.0: typeerror, cannot read properties of undefined (reading 'bind')","articleBody":"### Is there an existing issue for this?\n\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [X] I have reviewed the documentation https://docs.sentry.io/\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which package are you using?\n\n@sentry/nextjs\n\n### SDK Version\n\n7.36.0\n\n### Framework Version\n\nnextjs 13.1.6\n\n### Link to Sentry event\n\n_No response_\n\n### SDK Setup\n\n```javascript\r\nconst { withSentryConfig } = require(\"@sentry/nextjs\");\r\n\r\nconst nextConfig = () => {\r\n const IBE_ENV = readEnvironmentVariable(\"IBE_ENV\", \"production\");\r\n if (![\"development\", \"test\", \"staging\", \"production\"].includes(IBE_ENV)) {\r\n throw new Error(\r\n `The environment variable \"IBE_ENV\" should have one the value: \"development\", \"test\", \"staging\", \"production\". Current value: \"${IBE_ENV}\"`,\r\n );\r\n }\r\n\r\n return {\r\n compress: false,\r\n modularizeImports: {\r\n \"date-fns\": {\r\n transform: \"date-fns/{{member}}\",\r\n preventFullImport: true,\r\n },\r\n },\r\n reactStrictMode: true,\r\n experimental: {\r\n swcPlugins: [\r\n [\"next-superjson-plugin\", {}],\r\n [\"@lingui/swc-plugin\", {}],\r\n [\r\n \"@swc/plugin-styled-components\",\r\n {\r\n displayName: true,\r\n ssr: true,\r\n },\r\n ],\r\n ],\r\n },\r\n compiler: {\r\n styledComponents: {\r\n displayName: true,\r\n ssr: true,\r\n },\r\n },\r\n env: {\r\n APP_ENV,\r\n }\r\n i18n: {\r\n locales: locales,\r\n defaultLocale: \"fr\",\r\n },\r\n pageExtensions: [\"page.tsx\", \"page.ts\", \"page.jsx\", \"page.js\", \"api.ts\"],\r\n productionBrowserSourceMaps: APP_ENV !== \"production\",\r\n eslint: {\r\n ignoreDuringBuilds: true,\r\n },\r\n typescript: {\r\n ignoreBuildErrors: true,\r\n },\r\n sentry: {\r\n hideSourceMaps: APP_ENV === \"production\",\r\n widenClientFileUpload: true,\r\n },\r\n };\r\n};\r\n\r\n\r\nconst sentryWebpackPluginOptions = {\r\n silent: true, // Suppresses all logs\r\n // For all available options, see:\r\n // https://github.com/getsentry/sentry-webpack-plugin#options.\r\n};\r\n\r\nmodule.exports = withSentryConfig(nextConfig, sentryWebpackPluginOptions);\r\n```\n\n### Steps to Reproduce\n\nyarn run test\r\n\r\nProduces such errors when (using ky `0.33.2`):\r\n```\r\nTypeError: Cannot read properties of undefined (reading 'bind')\r\n at new bind (/home/sebastien/src/guest-journey.backup/internet-booking-engine/node_modules/ky/distribution/core/Ky.js:124:54)\r\n```\r\n\r\nWas working up to version `7.29.0` of `@sentry/nextjs`. Any upgrade generate such errors.\r\nUsing nodejs 16.x at the moment.\n\n### Expected Result\n\nNo errors, like with SDK \u003c= `7.29.0`\n\n### Actual Result\n\n```\r\n TypeError: Cannot read properties of undefined (reading 'bind')\r\n at new bind (/src/my-app/node_modules/ky/distribution/core/Ky.js:124:54)\r\n```","author":{"url":"https://github.com/shouze","@type":"Person","name":"shouze"},"datePublished":"2023-02-06T17:28:23Z","url":"https://github.com/getsentry/sentry-javascript/issues/7070"}
| 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:b2a0a2fc-6a9a-7157-8cd7-5010eff547e6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BFFC:2DC49E:2C33533:3983768:6B0415F2 |
| html-safe-nonce | 821aa6cb7264255f53e70fad49671f9fdaf803b8902f867d5b44c04403ec903e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkZDOjJEQzQ5RToyQzMzNTMzOjM5ODM3Njg6NkIwNDE1RjIiLCJ2aXNpdG9yX2lkIjoiNTg2ODEyNjg0OTUyNzQ1MzE3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9e5624c6bab52a271cbc85b8dafebf6b9c52905033a7b61a6e791efadc3576cc |
| hovercard-subject-tag | issue:1572981694 |
| 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/7070/issue_layout |
| twitter:image | https://opengraph.githubassets.com/194e63c77da63956d285650635d0363d1b6064ad77a4eb85a05ac5c3cec4b161/getsentry/sentry-javascript/issues/7070 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/194e63c77da63956d285650635d0363d1b6064ad77a4eb85a05ac5c3cec4b161/getsentry/sentry-javascript/issues/7070 |
| 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 | shouze |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| 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