-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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
External API response is cut off when proxying with rewrites
#53737
Comments
Do you have to downgrade all the way to 13.2.4 for it to break? I can try to do a bit of searching on which commit broke it, but I'd just like some confirmation that 13.2.5 for example is already broken. |
Hi, I've found out that this specific problem might be fixed in the latest canary version,
Confirmed on local machine: Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64
Binaries:
Node: 18.16.1
npm: 9.5.1
Yarn: 1.22.19
ppm: 8.6.9
Relevant Packages:
next: 13.4.14-canary.1
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A This is the code I used, sorry I had to move from Codesandbox because it was laggy. |
Awesome, no worries. You can also use Stackblitz from GitHub, like this:
Though there seems to be an issue with Next.js there. Anyway, so if its fixed in canary, then I guess we could close the issue? |
This is nice to know! Thanks for checking in, I'll close this issue and see if it'll be fixed in the next stable release. |
@yamashhh Did you ever verify this in a stable release? I'm seeing very similar issues in dev when proxying requests on version 13.4.19. It feels like something has fundamentally changed with the chunking. I do not see the issue in 13.4.12. |
Sorry, I haven't updated this thread. |
My use case seems intermittent. I thought it was fixed by the canary release (and it worked locally) but is truncated still when deployed in AWS with any of the released versions |
exact same here |
after lots of digging i was able to resolve my issue by removing the content-length on the proxy response. This wasnt an issue until upgrading from 13.4.12 to 13.4.19 |
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: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023 Binaries: Node: 16.17.0 npm: 8.15.0 Yarn: 1.22.19 pnpm: 7.1.0 Relevant Packages: next: 13.4.13-canary.13 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 Next.js Config: output: N/A
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
https://codesandbox.io/p/sandbox/competent-tess-gdqf3w
To Reproduce
rewrites
innext.config.js
Describe the Bug
The response JSON is cut off.
Expected Behavior
The entire API response is available.
Confirmed working when downgraded to v13.2.4.
repro: https://codesandbox.io/p/sandbox/vibrant-http-j6wnzr
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023 Binaries: Node: 16.17.0 npm: 8.15.0 Yarn: 1.22.19 pnpm: 7.1.0 Relevant packages: next: 13.2.4 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0
These issues/discussions might be related:
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: