[ppr] An unexpected error happened when running this build

Hi,

I’m experiencing an issue when deploying a project using the latest Next.js canary release (currently 15.4.0-canary.47). The build completes successfully with the message:

Build Completed in /vercel/output [2m]
Deploying outputs...

However, approximately 20 minutes later, the deployment fails with the following error:

An unexpected error happened when running this build. We have been notified of the problem. If you have any questions, please contact Vercel Support https://vercel.com/help

This seems to occur during the deployment of serverless functions, as if the process gets stuck.

Context & Observations

  • I’m using the experimental dynamicIO: true flag.
  • If I disable dynamicIO, the build succeeds (but it also disables ppr).
  • If I enable both ppr: true and useCache: true without dynamicIO: true, the build times out with the same error (so the issue seems to be ppr related rather than dynamicIO).
  • Simplifying the app leads to successful build:
    • Keeping only a “Hello World” page works fine.
    • Using a single parallel route at the root of /app works.
    • Using more than one parallel route at /app causes the timeout.
    • Nesting multiple levels of route groups (without parallel routes) also causes the timeout.
    • Removing the nested route groups resolves the issue.

Request

Could someone from the Vercel team help clarify the exact cause of this issue? It seems related to the combination of ppr and specific routing structures, but the behavior is inconsistent and difficult to debug without more detailed error logs.

Expected Behavior

I would expect to be able to deploy a Next.js app using the latest canary features, including ppr or dynamicIO, and advanced routing structures, without build timeouts or random failures.

Project Info

Project link: https://vercel.com/photostetic-llc/photostetic
Framework: Next.js 15.4.0-canary.47
Flags: experimental.dynamicIO = true or ppr = true + useCache = true

Thanks in advance for your help!

I think I found the issue which seems to be related to the experimental.clientSegmentCache = true flag that was activated.

Disabling this flag seems to make the Deploying outputs... phase always succeed with the ppr or dynamicIO flags enabled.

1 Like

Worked for me too. I found this X thread saying a fix is being worked on: https://x.com/leknerg/status/1915664665335546364

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.