Repository navigation
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
- StatusShow more project fieldsNo status
Activity
linear commentedon Nov 4, 2025
ENG-5824
getsantry commentedon Nov 4, 2025
Assigning to @getsentry/support for routing ⏲️
linear commentedon Nov 5, 2025
JS-1117
chargome commentedon Nov 5, 2025
Hey @ahmed-fawzy99 thanks for flagging this. Likely a regression from #16500
We want to add a e2e test case for static rendering as well to make sure we do not run into this anymore.
@logaretm fyi
fix(nextjs): Stop accessing sync props in template (#18113)
github-actions commentedon Nov 10, 2025
A PR closing this issue has just been released 🚀
This issue was referenced by PR #18113, which was included in the 10.24.0 release.