-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
Application error: a client-side exception has occurred (see the browser console for more information). #43772
Comments
This bug is reproducible also with the lastest next 13.1 |
I have the exact same issue... |
Can confirm this is happening as well. Had to downgrade back to 13.0.6 for time being. |
Dealing with the same issue right now. I really hope there's a fix for this. |
@wadehammes in 13.0.6 it works as expected? I discovered it in 12.3.3 and then in 13.1. |
This happened to us when we deployed a new version.
Also I've received it during development. |
We also had this issue on our end (v13.1.6) Every first navigation to certain app folder routes with dynamic route segments would fail, but as long as at least one user had navigated to the page once after deploy, the page would work for everyone. The navigation failed because the browser was served an application/octet-stream (.rsc in the .next/app folder) version of the page which referenced chunks that no longer existed in the current deployment. The reason for getting the old content on first navigation in our case was due having some dynamic route param that was not known at build time, possibly combined with our self hosting of the next application. For these pages with incompletely generated static params at build time, .next would generate .html and .rsc files on demand as it was running in our self hosted environment, which was persisted in the .next/app folder alongside files generated at build time. Since these files were not part of our deployment package, they would not be affected by the following deploy, and therefore stick around through multiple deployments. These files were detected as stale by next, but would still be served to the first visitor before new content was generated in the background. These visitors would then experience the exact issue described here. The fix we have added to solve our specific case is to just ensure that all such "on demand generated" content is cleared during each deployment. I am not sure how well our case translates to people hosting next applications in other ways, but thought it could be helpful information for people regardless. |
In my case I was using I have uploaded buggy code here - https://github.com/junedkhatri31/vercel-reproduce/blob/main/app/head.tsx |
Closing as a duplicate of → #38239. |
This ensures we properly handle rendering the `404` page when `notFound: true` is returned and middleware is present. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) Fixes: #38239 x-ref: #43772 --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
Data fetching (gS(S)P, getInitialProps), Middleware / Edge (API routes, runtime)
Link to the code that reproduces this issue
https://github.com/slackerzz/next-middleware-error
To Reproduce
Describe the Bug
The error is triggerd only if you run
pnpm build && pnpm start
, it is not present if you runpnpm dev
.If you remove the
middleware.ts
file from the project the error is gone and you will get a 404 page as expected.When a middleware is present the
/test/baz
getsundefined
as props. It seems related togetStaticProps
returning{ notFound: true }
Expected Behavior
The presence of a middleware should not interfere with page props
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Vercel
The text was updated successfully, but these errors were encountered: