-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PPR - Static bail out error caught when using partial prerending nextjs #12061
Comments
Hello, can you try to put the content of I just want to make sure that this is not a setup-related problem. I hope this will help :) |
hey @s1gr1d moved my logic to instrumentation.ts, the error can still be reproduced. I am pretty sure your Node wrapper is catching this error. import * as Sentry from "@sentry/nextjs";
export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
Sentry.init({
dsn: "https://bf65eb7c9c42794495d4916d58a78477@o4507254924115968.ingest.de.sentry.io/4507254931259472",
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
// Uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: process.env.NODE_ENV === 'development',
});
}
if (process.env.NEXT_RUNTIME === "edge") {
Sentry.init({
dsn: "https://bf65eb7c9c42794495d4916d58a78477@o4507254924115968.ingest.de.sentry.io/4507254931259472",
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
}
} |
Fix released with https://github.com/getsentry/sentry-javascript/releases/tag/8.5.0 - please give it a try! |
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
^8
Framework Version
No response
Link to Sentry event
https://tabtick.sentry.io/issues/369364/events/c792870db01e4425b2076500da9333af/
SDK Setup
sentry.server.config.ts
Steps to Reproduce
next/headers
likecookies()
,headers()
Expected Result
From next.js docs this is normal, and we shouldn't caught it
https://nextjs.org/docs/messages/ppr-caught-error
Actual Result
Sentry catches errors for routes that use
ppr
.This is the error description:
Route /location/les-caves-du-roy-nightclub needs to bail out of prerendering at this point because it used headers. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs...
The text was updated successfully, but these errors were encountered: