sentry-javascript: [Windows] `TypeError` when running Next.js app with middleware and latest @sentry/nextjs package
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/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
SDK Version
7.31.1
Framework Version
@sentry/nextjs 7.31.1
Link to Sentry event
https://sentry.io/organizations/triton-digital-canada-inc/issues/3883394829/
SDK Setup
The sample repro repository uses the following values, where the error still occurs.
sentry.client.config.js:
Sentry.init({
dsn: null,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1.0,
// ...
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
// that it will also get attached to your source maps
});
sentry.client.edge.js:
Sentry.init({
dsn: null,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1.0,
// ...
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
// that it will also get attached to your source maps
});
sentry.client.server.js:
Sentry.init({
dsn: null,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1.0,
// ...
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
// that it will also get attached to your source maps
});
Steps to Reproduce
- Running on Windows, clone this repository which is a reproduction of the issue
- Run
yarn install - Run
yarn dev - Browse to http://localhost:3000
- Observe an error on-screen and in your terminal
Expected Result
Page is rendered successfully.
Actual Result
This could be related to https://github.com/getsentry/sentry-javascript/pull/6771? (cc @lforst)
Confirmed that it works as expected with v7.29.0
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 19 (8 by maintainers)
@lukevella Thanks for providing that repo! It helped identifying a regression in the last release. We are in the process of releasing a patch with a fix.
Side-note: Sorry about all these issues with the SDK. We’re doing some pretty ambitious stuff to support every feature and it’s gotten a little bit fragile. I hope it won’t take too long to mature!
I’m still seeing this error using
7.32.0on paths that match my middleware config. I’m using a Mac too so doesn’t seem to be specific to Windows.Here’s my repo: https://github.com/lukevella/rallly/tree/update-sentry
Thanks for confirming @memmen @josh-! We have a fix on its way. It will probably come with a new version on Monday. We avoid releasing on Fridays and Thursdays because we don’t like working on the Weekends and all in case there is something going wrong badly.
I recommend downgrading to 7.29.0 until then!
@lforst also confirm that the error I was experiencing is fixed in latest