Skip to content

notFound function does not render not-found page and instead causes page crash (App Router, Next 16) #90837

@CesarFont

Description

@CesarFont

Link to the code that reproduces this issue

https://github.com/alexismendez11/ecommerce-demo

To Reproduce

  1. Navigate to https://v0-ecommerce-next-js-app.vercel.app/menu
  2. Go to a non existent category page (ex. https://v0-ecommerce-next-js-app.vercel.app/menu/category/test)
  3. You will see the page crash with the message
Image

Current vs. Expected behavior

current: the site crashed. and you will see this message "Application Error"
expected: see the content of the defined NotFound page

Provide environment information

Next.js: 16.x (also reproducible on latest canary)
React: 19.x
Router: App Router
Node.js: 22.x
Package manager: pnpm
OS: macOS 
(also reproducible on other team machines)
Browser: Chrome 145.x
Architecture: Dynamic route (/menu/category/[slug])
Data layer: External CMS (Prismic), but issue appears framework-level

Which area(s) are affected? (Select all that apply)

Error Handling, Use Cache, cacheComponents, Dynamic Routes

Which stage(s) are affected? (Select all that apply)

next build (local), next start (local), Vercel (Deployed)

Additional context

No response

Metadata

Metadata

Assignees

Labels

Dynamic RoutesRelated to dynamic routes.Error HandlingRelated to handling errors (e.g., error.tsx, global-error.tsx).

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions