-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Pages route suddenly fails with Headers Overflow Error. #54709
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
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I have the same error after upgrading to any version above 13.4.9 (tested latest and canary too). There is a related issue here nodejs/node#47246 and it seems there is no way in NextJS to tweak this setting. |
It is not possible to reduce the headers size for us as they are large because of the JWT token / Auth0 session. |
Thanks for the context @adoprog. This sounds like a Node.js/undici bug then. Note that if
Without anyone adding a reproduction though, it's also not clear how bumping a Next.js version affected this compared to previous versions. Instead of commenting "same issue", etc. please provide us with a minimal code/reproduction that we can use to reproduce the issue to verify it. Any unhelpful comment will be marked as off-topic. Thanks! cc @Ethan-Arrowood if you have more advice here, but I feel that this should be fixed upstream by |
I opened a PR to fix this upstream in Node.js/undici. You can follow along here: nodejs/undici#2234 I'm closing this as it's not a Next.js bug, but how Node.js+undici works currently. When that PR lands in Node.js, you'll be able to set the Node.js flag |
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
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:19 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8103 Binaries: Node: 18.16.1 npm: 9.7.2 Yarn: N/A pnpm: N/A Relevant Packages: next: 13.4.19 eslint-config-next: 13.4.19 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
Link to the code that reproduces this issue or a replay of the bug
See below.
To Reproduce
This is the route code, it splits traffic by iOS and other operating systems:
Describe the Bug
We maintain an app that still uses
pages/
routing. In this app there is a redirecting route that, depending on client OS redirects to an external third party or the landingpage (see reproduction section). The implementation usesgetServerSideProps()
to return a redirect object, e.g.This worked fine until recently, presumably the update to next 13.
Since then we're seeing the page crash at the redirect route with a 500. The server logs show a
'UND_ERR_HEADERS_OVERFLOW'
error with the following stack:Expected Behavior
The redirect route should work without throwing an exception.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Google Cloud
The text was updated successfully, but these errors were encountered: