-
Notifications
You must be signed in to change notification settings - Fork 26k
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
Production Fatal Error #52578
Comments
We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate. Why was this issue marked with the
|
@balazsorban44 can not make a reproduction , this only happens in production in a certain point without notice, we dont know what is causing this, seems like there were a change in caches or something about bots conflicting with isr. bu i really dont know what is causing this, we just notice that when time pass, this happens to all the pages in the project. |
Thanks, a reproduction would be very helpful. We need more information to investigate. If you are confident this is a bug, you can try narrowing down which version is causing the issue by going through the |
There were a pr about incremental cache that in almost sure is what is causing this error I will attach here |
this is the code failing: async function renderToHTMLOrFlight(req, res, pagePath, query, renderOpts) {
const isFlight = req.headers[_approuterheaders.RSC.toLowerCase()] !== undefined;
const pathname = (0, _validateurl.validateURL)(req.url); there were a pr about changing the function that validates the url to rely on nodes validating url for performance reason, i dont see now the pr but i recall that. as you can see you are expecting in a header an url that can be wrong and there is not catch of the error which is causing all website to crash |
I encountered the same problem while using wrk for stress testing.
next:
|
Do you manage to fix or workaround we are getting this issue all the time and customers are starting to yield😔 |
Hey @joacub What is your Node version? Can you currently reproduce the issue? Everything works fine when I revert back to node v18.16.0. node 20.0.0 will have errors |
I have latest node version 20.4 |
… |
same issue here:
node: v20.4.0 also only happens in production. any fixes / workarounds yet? |
That’s the one I was referencing before . That’s the change is braking everything |
there is something wrong with this canParse function, in my case is failing a slash and it should not fail, so my guess is that next or something else is polifying the function and is not working properly, when using the canParse in a raw node with the same params, does not fail and works a expected, but in the next context fails at some point, or the slash is a special character or something, i dont really know. |
this: const test = URL.canParse('/ ', 'http://n');
console.log(test); return true, but in next context sometimes return false which cause the function to return a exception |
bug detected, it happened when you stress the node, then start yielding the false doing this will throw false at some point: while (true) {
const test = URL.canParse('/ ', 'http://n');
console.log(test);
} |
open a issue in nodejs: |
I opened a fix for this in the Node repository. Hopefully, it can be included in the next LTS release - v18.17.0 - nodejs/node#48817 |
this is happening also in the 20.4 version, the fix you submit is only for older versions ? |
Are you a worker of nextjs ? the pr you sibmited to nextjs should be reverted untile this is fixed by node |
The PR I've opened will be backported to Node 18 and 20 as well. |
This issue does not exist in Node 18.17.0, or any LTS release. It was a false alarm. |
So when it is happening ? We tested and when stressed this is showing up |
This particular code does work as expected as of
|
Great! Sounds like its fixed upstream. Can we close this issue? |
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. |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
no response
To Reproduce
Just update to latest canary version you have broken this really badly
Describe the Bug
500 server error
Expected Behavior
no server error
Which browser are you using? (if relevant)
no response
How are you deploying your application? (if relevant)
no response
The text was updated successfully, but these errors were encountered: