nextjs - 💡(How to fix) Fix [regression] `app/not-found.tsx` throws FUNCTION_INVOCATION_FAILED server error instead of rendering the custom error page when cacheComponents are enabled [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

[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: 'NEXT_HTTP_ERROR_FALLBACK;404' } [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: 'NEXT_HTTP_ERROR_FALLBACK;404' } [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: 'NEXT_HTTP_ERROR_FALLBACK;404' } [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: 'NEXT_HTTP_ERROR_FALLBACK;404' }

Fix Action

Code Example

[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: 'NEXT_HTTP_ERROR_FALLBACK;404'
}
[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: 'NEXT_HTTP_ERROR_FALLBACK;404'
}
[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: 'NEXT_HTTP_ERROR_FALLBACK;404'
}
[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: 'NEXT_HTTP_ERROR_FALLBACK;404'
}

---

Operating System:
Platform: win32                                                                                                         
Arch: x64                                                                                                               
Version: Windows 10 Enterprise                                                                                          
Available memory (MB): 4009                                                                                            
Available CPU cores: 4                                                                                                
Binaries:                                                                                                                 
Node: 22.16.0                                                                                                           
npm: 11.12.1                                                                                                           
Yarn: N/A                                                                                                               
pnpm: 9.15.4                                                                                                          
Relevant Packages:                                                                                                        
next: 16.2.6
eslint-config-next: N/A                                                                                                 
react: 19.2.4                                                                                                           
react-dom: 19.2.4                                                                                                       
typescript: 5.9.3                                                                                                     
Next.js Config:                                                                                                           
output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/9smrdm

To Reproduce

  1. Run the application in production i.e. next start (error only occurs in production environments)
  2. Navigate to an unmatched route that invokes notFound() in the base layout.tsx (e.g. /random.xml)
  3. The application throws the above mentioned server error instead of serving the custom 404 page

Current vs. Expected behavior

The application works as intended with the same code and exact same steps when rerun in Next.js 16.2.3 suggesting a regression between that version and Next.js 16.2.6. Like I mentioned before, the issue only comes up in production environments with cacheComponents enabled and does not reproduce in dev builds.

Request 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: 'NEXT_HTTP_ERROR_FALLBACK;404'
}
[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: 'NEXT_HTTP_ERROR_FALLBACK;404'
}
[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: 'NEXT_HTTP_ERROR_FALLBACK;404'
}
[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: 'NEXT_HTTP_ERROR_FALLBACK;404'
}

Provide environment information

Operating System:
Platform: win32                                                                                                         
Arch: x64                                                                                                               
Version: Windows 10 Enterprise                                                                                          
Available memory (MB): 4009                                                                                            
Available CPU cores: 4                                                                                                
Binaries:                                                                                                                 
Node: 22.16.0                                                                                                           
npm: 11.12.1                                                                                                           
Yarn: N/A                                                                                                               
pnpm: 9.15.4                                                                                                          
Relevant Packages:                                                                                                        
next: 16.2.6
eslint-config-next: N/A                                                                                                 
react: 19.2.4                                                                                                           
react-dom: 19.2.4                                                                                                       
typescript: 5.9.3                                                                                                     
Next.js Config:                                                                                                           
output: N/A

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

Error Handling

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

next start (local)

Additional context

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING