cloudflare/vinext

Pages Router: `getServerSideProps` SSR returns 500 Internal Server Error

クローズ

#1,458 opened on 2026/05/22

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (371 件のフォーク)github user discovery
adapter-api-e2ehelp wanted

Repository metrics

Stars
 (8,563 個のスター)
PR merge metrics
 (平均マージ 1d 1h) (30d で 462 merged PRs)

説明

This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext main vs Next.js v16.2.6, 2026-05-22).

Problem

Several Pages Router pages that should SSR via getServerSideProps respond with Internal Server Error (HTTP 500) instead of the rendered page. The data-fetching pipeline appears to crash on basic gssp pages and on error-mapping cases (ENOENT, thrown errors), preventing the custom pages/500.tsx from rendering.

Expected pattern: /Post:.*?post-1/
Received: "Internal Server Error"
Expected substring: "custom pages/500"
Received: "Internal Server Error"

Estimated Impact

~3 test failures across the deploy suite.

Affected Test Suites

  • test/e2e/getserversideprops/test/index.test.ts (3 failures)

Recommendation

  1. Reproduce first in vinext's own test suite. Add a Pages Router page with a simple getServerSideProps returning { props: { post } }. Confirm the response is 500.

  2. Inspect the server logs. Look for the stack trace produced by the 500 response — it should pinpoint the gssp dispatch path that is crashing.

  3. Fix the gssp dispatch path. Make sure getServerSideProps is invoked with the correct context (req/res/query/params), its props serialised, and the error path handed to the user's custom pages/500.tsx rather than collapsed into a plain Internal Server Error.

コントリビューターガイド