Vercel shows the Sentry request.headers.split build error
Is there an existing issue for this?
- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [X] I have reviewed the documentation https://docs.sentry.io/
- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Self-hosted/on-premise
Which SDK are you using?
@sentry/nextjs
SDK Version
7.77.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
import * as Sentry from '@sentry/nextjs'
Sentry.init({ dsn: '', tracesSampleRate: 1.0, debug: false, })
Steps to Reproduce
Works locally but this errors shows up on the vercel logs, so production doesnt work Uncaught Exception: TypeError: request.headers.split is not a function at setHeadersOnRequest (/var/task/node_modules/@sentry/nextjs/node_modules/@sentry/node/cjs/integrations/undici/index.js:247:39) at _onRequestCreate (/var/task/node_modules/@sentry/nextjs/node_modules/@sentry/node/cjs/integrations/undici/index.js:151:9) at Channel.publish (node:diagnostics_channel:143:9) at new Request (node:internal/deps/undici/undici:6295:27) at [dispatch] (node:internal/deps/undici/undici:9077:25) at Intercept (node:internal/deps/undici/undici:8812:20) at [Intercepted Dispatch] (node:internal/deps/undici/undici:5673:16) at Client.dispatch (node:internal/deps/undici/undici:5689:44) at [dispatch] (node:internal/deps/undici/undici:5920:32) at [Intercepted Dispatch] (node:internal/deps/undici/undici:5666:33) Node.js process exited with exit status: 129. The logs above can help with debugging the issue.
Expected Result
Sentry shouldnt break the app
Actual Result
Uncaught Exception: TypeError: request.headers.split is not a function at setHeadersOnRequest (/var/task/node_modules/@sentry/nextjs/node_modules/@sentry/node/cjs/integrations/undici/index.js:247:39) at _onRequestCreate (/var/task/node_modules/@sentry/nextjs/node_modules/@sentry/node/cjs/integrations/undici/index.js:151:9) at Channel.publish (node:diagnostics_channel:143:9) at new Request (node:internal/deps/undici/undici:6295:27) at [dispatch] (node:internal/deps/undici/undici:9077:25) at Intercept (node:internal/deps/undici/undici:8812:20) at [Intercepted Dispatch] (node:internal/deps/undici/undici:5673:16) at Client.dispatch (node:internal/deps/undici/undici:5689:44) at [dispatch] (node:internal/deps/undici/undici:5920:32) at [Intercepted Dispatch] (node:internal/deps/undici/undici:5666:33) Node.js process exited with exit status: 129. The logs above can help with debugging the issue.
@Damola18 please upgrade your SDK version! This was fixed as part of 7.106.0
@Damola18 please upgrade your SDK version! This was fixed as part of
7.106.0
@sentry/nextjs to 7.106 ?
@sentry/nextjs to 7.106 ?
Yes! Though I recommend upgrading completely to 7.117.0 to take advantage of all bug fixes and performance improvements.
@sentry/nextjs to 7.106 ?
Yes! Though I recommend upgrading completely to
7.117.0to take advantage of all bug fixes and performance improvements.
It worked for us as well, thank you :)