-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
In REPL, if response
is created from a blob, then response.arrayBuffer()
never resolves
#49062
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
probably duplicate of #48916 |
The code in arrayBuffer() wasnt changed so seems unlikely to be related to #48916 does it fail on all version of v20x? on v18.x i think the blob dataqueue implementation hasn't been backported Edit: does response use stream() to collect the array buffer by any chance |
No. I tried v20.3.1, v20.4.0, and v20.5.0, among which v20.3.1 does not have the same bug. |
Indeed #48935 fixes this |
Yes it does, https://github.com/nodejs/undici/blob/c83b084879fa0bb8e0469d31ec61428ac68160d5/lib/fetch/body.js#L43-L45 |
fixed by 3224527 |
Version
v20.5.0
Platform
Linux ulysses-legion-r70002021 5.15.0-76-generic #83~20.04.1-Ubuntu SMP Wed Jun 21 20:23:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
Run
node
in command line to enter REPL mode, then run the following:How often does it reproduce? Is there a required condition?
The code snippet above reproduces the bug steadily. However, similar codes do not produce the same bug when run them in a script file. Also, strangely, the one-liner does not reproduce the same bug (in REPL):
What is the expected behavior? Why is that the expected behavior?
No response
What do you see instead?
Stuck forever.
Additional information
I tried v18 and v20, and I found that the bug is only reproduceable on v20 but not on v18.
Also, there is another bug that I think is related:
Run this script will crash Node v20 (with exit code 13 and no output). Node v18 runs it fine expectedly.
The text was updated successfully, but these errors were encountered: