-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as not planned
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/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
9.39.0
Framework Version
Next 15.4.2-canary.5
Link to Sentry event
No response
Reproduction Example/SDK Setup
sentry.server.config.ts
// This file configures the initialization of Sentry on the server.
// The config you add here will be used whenever the server handles a request.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from '@sentry/nextjs';
Sentry.init({
dsn: 'https://...',
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
tracesSampleRate: 1,
integrations: [
// Add the Vercel AI SDK integration
Sentry.vercelAIIntegration({
recordInputs: true,
recordOutputs: true,
}),
],
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
enabled: process.env.NODE_ENV === 'production',
_experiments: {
enableLogs: true,
},
});
Steps to Reproduce
npm run dev
Expected Result
no error :)
Actual Result
GET /en/ 200 in 4986ms
[browser] Server Error: Route "/[lang]" used `crypto.randomUUID()` outside of `"use cache"` and without explicitly calling `await connection()` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-crypto
at Module.uuid4 (node_modules/.pnpm/@[email protected]/node_modules/@sentry/core/src/utils/misc.ts:34:21)
at Module.generateTraceId (node_modules/.pnpm/@[email protected]/node_modules/@sentry/core/src/utils/propagationContext.ts:7:10)
at new Scope (node_modules/.pnpm/@[email protected]/node_modules/@sentry/core/src/scope.ts:162:16)
at Scope.clone (node_modules/.pnpm/@[email protected]/node_modules/@sentry/core/src/scope.ts:171:22)
at LogSafely (unknown)
32 | try {
33 | if (crypto?.randomUUID) {
> 34 | return crypto.randomUUID().replace(/-/g, '');
| ^
35 | }
36 | if (crypto?.getRandomValues) {
37 | getRandomByte = () => { (unknown)
See this doc https://nextjs.org/docs/messages/next-prerender-crypto
Metadata
Metadata
Assignees
Type
Projects
Status
No status