-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
404 Template Throws 500 Error when Using Middleware (v14.2.7) #69428
Comments
Running into the same issue. I can confirm this started with v14.2.7 and v14.2.6 works as expected. Workaround for me |
Thanks for the additional repro @mauricedb. Could you upvote 👍 my initial comment just to raise the visibility of this issue? |
Thanks for the report folks -- we're looking into this. |
Thanks for the update @ztanner! Much appreciated. |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/jolly-taussig-tzm55f
To Reproduce
Current vs. Expected behavior
I would expect the custom 404 template to be displayed, instead a 500 error is thrown. This only seems to happen if a Middleware file is present. This seemed to start with v14.2.7.
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): 4102 Available CPU cores: 2 Binaries: Node: 20.9.0 npm: 9.8.1 Yarn: 1.22.19 pnpm: 8.10.2 Relevant Packages: next: 14.2.7 // Latest available version is detected (14.2.7). eslint-config-next: N/A react: 18.3.1 react-dom: 18.3.1 typescript: 5.1.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Middleware
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), Other (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered: