You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: write method is not returning a boolean value #683
'The return value is true if the internal buffer is less than the highWaterMark configured when the stream was created after admitting chunk. If false is returned, further attempts to write data to the stream should stop until the 'drain' event is emitted.'
With newer versions of trpc (11.0.0-rc.419) this leads to a hang. The trpc middleware interprets void as false and waits for the 'drain' event that is never showing up. The lambda runtime is shutting down the event handling with an internal server error.
Ran into this problem when packaging SvelteKit with adapter-node and polka, the effect confusingly caused the Lambda to return status code 200 with null as the body.
I can confirm that @KATT's fix provided does work, thanks!
Ran into this problem when trying to upgrade to Next.js 14.0.0. It also interprets void as falsey and waits for the stream 'drain' event that never happens. Patching my serverless-express version with this fix, solved the problem 👍
@brettstack I tried to make a PR originally but I lacked permissions and couldn't push up to create a remote branch, did I miss something? Happy to create a PR
Activity
KATT commentedon Jul 4, 2024
This might be enough? KATT@9ba260e
fix(@angular/ssr): prevent stream draining if `write` does not return…
fix(@angular/ssr): prevent stream draining if `write` does not return…
fix(@angular/ssr): prevent stream draining if `write` does not return…
jimdigriz commentedon Jul 3, 2025
Ran into this problem when packaging SvelteKit with adapter-node and polka, the effect confusingly caused the Lambda to return status code 200 with
nullas the body.I can confirm that @KATT's fix provided does work, thanks!
joshlperry commentedon Jul 10, 2025
Ran into this problem when trying to upgrade to Next.js 14.0.0. It also interprets void as falsey and waits for the stream 'drain' event that never happens. Patching my serverless-express version with this fix, solved the problem 👍
joshlperry commentedon Jul 10, 2025
@brettstack Could we get @KATT's fix in?
brettstack commentedon Jul 11, 2025
If someone wants to submit this as a PR I can merge it in @joshlperry @KATT
joshlperry commentedon Jul 17, 2025
@brettstack I tried to make a PR originally but I lacked permissions and couldn't push up to create a remote branch, did I miss something? Happy to create a PR
fix: response.write() to return a bool (resolves CodeGenieApp#683)
fix: response.write() to return a bool (resolves CodeGenieApp#683) (C…
chore(release): 4.17.2-beta.1 [skip ci]
github-actions commentedon Dec 8, 2025
🎉 This issue has been resolved in version 4.17.2-beta.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
chore(release): 5.0.0-beta.1 [skip ci]
github-actions commentedon Dec 8, 2025
🎉 This issue has been resolved in version 5.0.0-beta.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
chore(release): 5.0.0 [skip ci]
github-actions commentedon Apr 16, 2026
🎉 This issue has been resolved in version 5.0.0 🎉
The release is available on:
Your semantic-release bot 📦🚀