Skip to content

[Windows] TypeError when running Next.js app with middleware and latest @sentry/nextjs package #6858

@josh-

Description

@josh-

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/angular

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

  1. Running on Windows, clone this repository which is a reproduction of the issue
  2. Run yarn install
  3. Run yarn dev
  4. Browse to http://localhost:3000
  5. Observe an error on-screen and in your terminal

Expected Result

Page is rendered successfully.

Actual Result

image

This could be related to #6771? (cc @lforst)

Confirmed that it works as expected with v7.29.0

Metadata

Metadata

Assignees

Labels

Package: nextjsIssues related to the Sentry Nextjs SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions