Closed rsheppard-dev closed 12 months ago
We have recently encountered some random crashes when changing routes after upgrading to version 13.5.1. I am not sure about the exact cause, but the page becomes stuck during the route change. In Chrome, it displays an 'Aw, snap!' crash error, while Firefox indicates that the site is slowing down your browser.
We are currently deploying on Amplify AWS.
This is happening for us in production when leaving the landing page for the following resource:
_next/static/chunks/webpack-8147f10d25df47dc.js Request Method: GET Status Code: 404 Not Found
Facing the same issue in production. Only the pages using CMS/revalidate feature crashes. The issue is most probably in server page.tsx files. Everything works fine in local. This happened when I updated the app to the latest 13.5.5 canary version. Reverted the version to 13.4.1 and now everything works fine even in production.
Having the same issue in production...
I have found the culprit that is causing the error but I don't know how to fix it easily.
My layout is a server component. My header component in layout.tsx is a server component but that includes a client component for my mobile menu as I use useState to manage the state of my menu. If this is a server component there is no issue but then I can't have a mobile menu functioning.
We are on page router
I have changed my hosting to Vercel and so far I haven't had the issue. It appears this is a Netlify issue not a Next issue which I'm glad about cause I love Next but this was making it unusable. Hopefully Netlify fix this. Will keep testing my production app and hopefully it carries on working.
So we got this error after upgrading to 13.5.5, in development and deployed to vercel in production. Downgrading to 13.5.4 fixed it
@huozhi not sure if you guys have seen this yet, but this does seem to be a pretty significant issue (can't upgrade without it since the site doesn't load). There is some activity here as well: https://github.com/vercel/next.js/issues/38507
Same kind of issue here, I have catch-all in my root [...foo]
and for me _next
assets are not loading but rather loading the catch-all page. Reverted back to 13.5.4
which works for me.
Due to this issue also navigation "crashes" as mentioned earlier in the comments.
@johnrackles's solution is currently the only fix for this. We were experiencing the exact same issue. The issue we discovered was due to encoded dynamic routes [locale]
.
This URL was what Next.js was requesting which 404'd: http://localhost:3000/_next/static/chunks/app/%255Blocale%255D/resources/page.js
But manually URL decoding the URL and opening in a new tab correctly resolved the file: http://localhost:3000/_next/static/chunks/app/[locale]/resources/page.js
We were experiencing this issue on next@13.5.6, but downgrading to next@13.5.4 resolved the issue, so there's definitely been a bug that's been released in version next@13.5.5 or later.
Had same issue in localhost. I just delete .next folder restart the application and issue resolved. error occurred when i changed routing hierarchy. now its working fine. NOTE: This is only applied in development mode, I didn't face this sort of issue on production.
Noticed the same thing as @enijar. The app is trying to load:
.../chats/%255BchatId%255D/page-...
which results in 404
but if I update the url manually to
.../chats/[chatId]/page-...
it works
Current version: 13.5.6
I think the problem is that the page.js url is double encode
When you url decode:
http://localhost:3000/_next/static/chunks/app/%255Bstorecode%255D/page.js
you get
http://localhost:3000/_next/static/chunks/app/%5Bstorecode%5D/page.js
And it only happens when navigating.
Checked 14.0.0, it still happening
Facing the same issue, revert back to v13.5.4
I've tried making a reproduction for the issue mentioned in the lower comments here, specifically double encoding of [
and ]
, but I failed. Since there isn't one in this issue, I would encourage anyone who's also having this issue to make one and share a repo link for it if you are able to. For is, the issue only appears on soft navigations.
+1
Can someone post a reproduction of this? The origin reproduction in the issue description is 404
We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate.
please add a complete reproduction
label?To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository (template for App Router, template for Pages Router), but you can also use these templates: CodeSandbox: App Router or CodeSandbox: Pages Router.
To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as minimal as possible. This means that you should remove unnecessary code, files, and dependencies that do not contribute to the issue. Ensure your reproduction does not depend on secrets, 3rd party registries, private dependencies, or any other data that cannot be made public. Avoid a reproduction including a whole monorepo (unless relevant to the issue). The easier it is to reproduce the issue, the quicker we can help.
Please test your reproduction against the latest version of Next.js (next@canary
) to make sure your issue has not already been fixed.
If you cannot create a clean reproduction, another way you can help the maintainers' job is to pinpoint the canary
version of next
that introduced the issue. Check out our releases, and try to find the first canary
release that introduced the issue. This will help us narrow down the scope of the issue, and possibly point to the PR/code change that introduced it. You can install a specific version of next
by running npm install next@<version>
.
Ensure the link is pointing to a codebase that is accessible (e.g. not a private repository). "example.com", "n/a", "will add later", etc. are not acceptable links -- we need to see a public codebase. See the above section for accepted links.
Issues with the please add a complete reproduction
label that receives no meaningful activity (e.g. new comments with a reproduction link) are automatically closed and locked after 30 days.
If your issue has not been resolved in that time and it has been closed/locked, please open a new issue with the required reproduction.
Anyone experiencing the same issue is welcome to provide a minimal reproduction following the above steps. Furthermore, you can upvote the issue using the :+1: reaction on the topmost comment (please do not comment "I have the same issue" without reproduction steps). Then, we can sort issues by votes to prioritize.
We look into every Next.js issue and constantly monitor open issues for new comments.
However, sometimes we might miss one or two due to the popularity/high traffic of the repository. We apologize, and kindly ask you to refrain from tagging core maintainers, as that will usually not result in increased priority.
Upvoting issues to show your interest will help us prioritize and address them as quickly as possible. That said, every issue is important to us, and if an issue gets closed by accident, we encourage you to open a new one linking to the old issue and we will look into it.
Here's a repro of this error:
https://github.com/enijar/next-load-error-repro
Notice that somehow including this third party script causes the issue:
<Script
strategy="beforeInteractive"
src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"
/>
@huozhi Here is a more detail bug reported by me #57829. Please check the Additional context
section.
As a workaround, you can remove beforeInteractive
to avoid this issue.
Removing beforeInteractive
fixes this issue. This is 100% still a bug as adding beforeInteractive
shouldn't cause that behaviour.
Removing
beforeInteractive
fixes this issue. This is 100% still a bug as addingbeforeInteractive
shouldn't cause that behaviour.
Bro, you saved our life. Thank you.
@jianliao thanks for the repro
We land a fix for #57829 and also the one mentioned related to next/script
in v14.0.2-canary.9, please upragde and let us know if your issue is resolved, thanks!
I tested the canary locally and can confirm that it the fix works with the Script strategy="beforeInteractive" 🥳
@huozhi Thanks for the quick fix. I can confirm it works on 14.0.2-canary.10 now.
@huozhi I am still getting an error on 14.0.2
and also latest canary next@14.0.3-canary.2
:
For some reason 14.0.1
is working without any errors.
Running pnpm dev
everything works with no errors shown.
When I build locally or deploy and navigate from /
to /backlink-prospects
(packages/frontend/src/app/(app)/(paid)/backlink-prospects) via a <Link/>
component I get the following error:
Application error: a client-side exception has occurred (see the browser console for more information).
When I check the console, I see the following:
ChunkLoadError: Loading chunk 3781 failed.
(missing: http://localhost:3000/_next/static/chunks/3781-32a3a102dc80bd51.js)
at s.f.j (webpack-20ebb4fb329d62fa.js:1:3964)
at webpack-20ebb4fb329d62fa.js:1:1427
at Array.reduce (<anonymous>)
at s.e (webpack-20ebb4fb329d62fa.js:1:1393)
at 3815-619463d83fe0fd94.js:6:15126
at 3815-619463d83fe0fd94.js:6:15328
at t (3815-619463d83fe0fd94.js:6:15531)
(anonymous) @ 3815-619463d83fe0fd94.js:1
When I refresh the route the page loads without any problem, but a tanstack-table
client component is unresponsive, e.g. clicking and everything doesn't do anything.
Let me know if I should open a new issue or can provide any more info.
@feliche93 please open a new issue with reproduction, thanks
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://github.com/rsheppard-dev/lh-plumbing
To Reproduce
Or
Current vs. Expected behavior
I expect page page to load normally however in development I get this error:
`Unhandled Runtime Error ChunkLoadError: Loading chunk app/(app)/layout failed. (error: http://localhost:3000/_next/static/chunks/app/(app)/layout.js)
Call Stack __webpack_require__.f.j file:///Users/roy/Documents/Code/lh-plumbing/.next/static/chunks/webpack.js (853:29)