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
Hi, I have encountered a problem with undici on Deno.
When use undici's fetch() method to fetch a file sufficiently large, the promise fails to resolve. This is not the case on node.js. You can reproduce this issue through the following codes:
import{Buffer}from"node:buffer";import{fetch}from'undici';consturl='';// url for a remote file/imageif(import.meta.main){constresult=awaitfetch(url);constarr=awaitresult.arrayBuffer();console.log(arr);constbuffer=Buffer.from(arr);console.log(buffer);}
With an image of ~40kB, this code fails to run on deno:
Tested ok with a 2-3kB image:
Version:
Deno 2.2.5
v8 13.5.212.4-rusty
typescript 5.7.3
Windows 11
Test image:
Big image (~40kB) and fail:
Small image (~2kB) and success:
TypeError [ERR_INVALID_ARG_TYPE]: The "stream" argument must be an instance of Stream. Received an instance of ReadableStream
at eos (ext:deno_node/_stream.mjs:855:15)
at fetchFinale (file:///.../node_modules/undici/lib/web/fetch/index.js:1094:9)
...
Hi, I have encountered a problem with undici on Deno.
When use undici's fetch() method to fetch a file sufficiently large, the promise fails to resolve. This is not the case on node.js. You can reproduce this issue through the following codes:
With an image of ~40kB, this code fails to run on deno:

Tested ok with a 2-3kB image:

Version:
Test image:


Big image (~40kB) and fail:
Small image (~2kB) and success:
The original issue is here: discordjs/discord.js#10812
The text was updated successfully, but these errors were encountered: