-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Environment
SaaS (https://sentry.io/)
Steps to Reproduce
- Have the sentry v10.22 installed on 15.5.3 wizard set up sentry on a project
sentry.server.config.tsfrom the wizard setup will have this option:sendDefaultPii: true- Build an ISR route on Next.js 15.5.3 (this example only pre-renders 250 pages, not all possible routes) like this:
interface Props {
params: Promise<{ slug: string }>;
}
export async function generateMetadata({ params }: Props): Promise<Metadata> {
const { slug } = await params;
const [video, videoError] = await tryCatch(fetchVideo(slug, true));
if (videoError || !video) {
return {
title: 'Video not found',
description: 'The requested video could not be found.',
};
}
return {
title: '...',
description: '...',
// rest of metadata
};
}
export async function generateStaticParams() {
const videos: SlugsResponse = await fetchVideoSlugs(250);
return videos?.data?.map((video: string) => ({
slug: video,
}));
}
export default async function page({ params }: Props) {
const { slug } = await params;
const [video, videoError] = await tryCatch(fetchVideo(slug, true));
if (videoError || !video) {
return <p>Error fetching the requested video</p>
}
return (
{/* Rest of the page */}
);
}- Build and run the project
- Visit any page on that route that is either :
a. Was not from the pre-rendered 250 example pages
b. Does not exist (random slug) - An 500 | INTERNAL SERVER ERROR is thrown on the visited page. Nextjs error log:
⨯ [Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
digest: 'DYNAMIC_SERVER_USAGE'
}sendDefaultPii parameter breaks the ISR generation, and setting its value to false resolves this issue. However, the bug root wasn't clear it was caused by Sentry, and should removed from the setup wizard and/or have a comment on it that this parameter breaks ISR.
Expected Result
Page should render the requested resource or throw 404 not found error, not 500 server error.
Actual Result
ISR page renders 500 | INTERNAL SERVER ERROR
Next.js logs:
⨯ [Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
digest: 'DYNAMIC_SERVER_USAGE'
}Product Area
Ingestion and Filtering
Link
No response
DSN
No response
Version
No response
Metadata
Metadata
Assignees
Labels
Projects
Status
No status