Skip to content

Enabling sendDefaultPii on server config triggers Next.js async parameter error #16717

Closed as duplicate of#16542
@daanvosdewael

Description

@daanvosdewael

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

9.31.0

Framework Version

Next 15.3.4

Link to Sentry event

No response

Reproduction Example/SDK Setup

In sentry.server.config.ts:

Sentry.init({
  debug: false,
  dsn: "",
  sendDefaultPii: true,
});

Steps to Reproduce

I probably copy / pasted too much when implementing the HttpClient integration on the client configuration and also added sendDefaultPii: true to the server configuration. So steps to reproduce:

  1. add sendDefaultPii: true to sentry.server.config.ts
  2. open any route in Next.js application in the browser

Expected Result

No error

Actual Result

The following Next.js error:

Error: Route "/" used `...params` or similar expression. `params` should be awaited before using its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis
    at Function.entries (<anonymous>)
    at Object.apply (webpack-internal:/(rsc)/src/app/sentry-wrapper-module:47:9)
  45 |         baggageHeader,
  46 |         headers,
> 47 |       }).apply(thisArg, args);
     |         ^
  48 |     },
  49 |   });
  50 | } else {

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions