Title: `Sentry.sentryHandle()` raises `TypeError: Body is unusable: Body has already been read` when node >= 20 (20.x, 22.x) · Issue #14583 · getsentry/sentry-javascript · GitHub
Open Graph Title: `Sentry.sentryHandle()` raises `TypeError: Body is unusable: Body has already been read` when node >= 20 (20.x, 22.x) · Issue #14583 · getsentry/sentry-javascript
X Title: `Sentry.sentryHandle()` raises `TypeError: Body is unusable: Body has already been read` when node >= 20 (20.x, 22.x) · Issue #14583 · 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/14583
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`Sentry.sentryHandle()` raises `TypeError: Body is unusable: Body has already been read` when node >= 20 (20.x, 22.x)","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 SDK are you using?\n\n@sentry/sveltekit\n\n### SDK Version\n\n8.42.0\n\n### Framework Version\n\n\"@sveltejs/kit\": \"^2.6.2\", \"svelte\": \"^4.1.2\", \"@sveltejs/adapter-vercel\": \"^5.5.0\"\n\n### Link to Sentry event\n\nhttps://learnie-ai.sentry.io/issues/6106002320/events/32c06c33715a481caeabbb2569eb7853/?project=4505632768262144\n\n### Reproduction Example/SDK Setup\n\nOn `hooks.server.ts`:\n\n```\nSentry.init({\n dsn: \"xxx\",\n tracesSampleRate: 1.0,\n integrations: [Sentry.consoleIntegration(), Sentry.captureConsoleIntegration({ levels: [\"error\"] })],\n enabled: import.meta.env.MODE === \"production\",\n});\n\nexport const handle = sequence(Sentry.sentryHandle(), mySelfHandle);\n```\n\n### Steps to Reproduce\n\n1. Use node 20.x or node 22.x (btw, no bugs on Node 18.x)\n2. Enable Sentry\n3. Send multiple requests to an interface at the same time\n\n### Expected Result\n\nAll requests are received and returned normally\n\n### Actual Result\n\nA small number (one or two) of them return results normally, but the rest all have errors:\n\n```\nTypeError: Body is unusable: Body has already been read\n at consumeBody (node:internal/deps/undici/undici:5463:15)\n at _Request.json (node:internal/deps/undici/undici:5416:18)\n at POST (file:///var/task/vercel/path0/.svelte-kit/output/server/entries/endpoints/api/v1/quiz/freeform/_server.ts.js:20:32)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async render_endpoint (file:///var/task/vercel/path0/.svelte-kit/output/server/index.js:184:20)\n at async resolve2 (file:///var/task/vercel/path0/.svelte-kit/output/server/index.js:2721:22)\n at async sessionCookieInvalidationHandle (file:///var/task/vercel/path0/.svelte-kit/output/server/chunks/hooks.server.js:68:20)\n at async /var/task/vercel/path0/node_modules/@sentry/sveltekit/build/cjs/server/handle.js:140:21\n at async instrumentHandle (/var/task/vercel/path0/node_modules/@sentry/sveltekit/build/cjs/server/handle.js:128:27)\n at async respond (file:///var/task/vercel/path0/.svelte-kit/output/server/index.js:2615:22)\n```","author":{"url":"https://github.com/chenqianhe","@type":"Person","name":"chenqianhe"},"datePublished":"2024-12-05T05:25:45Z","url":"https://github.com/getsentry/sentry-javascript/issues/14583"}
| 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:0f083ad6-5b59-ad08-70e1-841daed82429 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B602:2A9AF6:895FC4:C10289:6B0429D5 |
| html-safe-nonce | 7c6e6c0bb87b46bc40d7b8b87f443153d241332c46cd221f64fd8f02363c0300 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjAyOjJBOUFGNjo4OTVGQzQ6QzEwMjg5OjZCMDQyOUQ1IiwidmlzaXRvcl9pZCI6IjU2MjAzNzQyOTM4NzI2NTA3MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b10eec4767c37c6fa4a5cb8aa8979fa69a5bc3292066f6a3091fe971cc7a6c29 |
| hovercard-subject-tag | issue:2719375009 |
| 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/14583/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9757f76b04bb9eebc8e6701ff501420918ffb16f99a2464e861c33fdcf9e974d/getsentry/sentry-javascript/issues/14583 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9757f76b04bb9eebc8e6701ff501420918ffb16f99a2464e861c33fdcf9e974d/getsentry/sentry-javascript/issues/14583 |
| 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 | chenqianhe |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| 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 | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| 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