Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error.tsx doesnt get fired in client components #76439

Open
AmirShafikhani opened this issue Feb 24, 2025 · 0 comments
Open

error.tsx doesnt get fired in client components #76439

AmirShafikhani opened this issue Feb 24, 2025 · 0 comments
Labels
Error Handling Related to handling errors (e.g., error.tsx, global-error.tsx).

Comments

@AmirShafikhani
Copy link

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/friendly-poitras-mwxdvz?file=%2Fapp%2Fpage.tsx

To Reproduce

  1. start the app
  2. click on the "Click to fire error" button
  3. the error.tsx page doesnt get fired

Current vs. Expected behavior

i expected that the error.tsx file fires when an error happens in client components but instead just an error toast showed up

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4242
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 15.2.0-canary.71 // Latest available version is detected (15.2.0-canary.71).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.3.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 dev (local), next start (local)

Additional context

this issue exists on 15.1.7 version and also the latest version of canary

@github-actions github-actions bot added the Error Handling Related to handling errors (e.g., error.tsx, global-error.tsx). label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Handling Related to handling errors (e.g., error.tsx, global-error.tsx).
Projects
None yet
Development

No branches or pull requests

1 participant