minecraft-launcher-core-node
minecraft-launcher-core-node copied to clipboard
Connections don't get limited
Connections don't get limited when installing.
const agent = new Agent({ connections: 1 })
const instTask = installTask(installer, minecraftLocation, { agent: resolveAgent({ dispatcher: agent }) })
Errors:
[1] [errors]: [
[1] ConnectTimeoutError: Connect Timeout Error
[1] at onConnectTimeout (C:\Users\USER\Desktop\Development\pmc-launcher\node_modules\undici\lib\core\connect.js:186:24)
[1] at C:\Users\USER\Desktop\Development\pmc-launcher\node_modules\undici\lib\core\connect.js:133:46
[1] at Immediate._onImmediate (C:\Users\USER\Desktop\Development\pmc-launcher\node_modules\undici\lib\core\connect.js:172:33)
[1] at process.processImmediate (node:internal/timers:476:21) {
[1] code: 'UND_ERR_CONNECT_TIMEOUT',
[1] url: 'https://piston-meta.mojang.com/v1/packages/12888726d2cc035d30965bcf8c825c7ac5f28ea0/1.20.2.json'
[1] }
[1] ]
[1] }
...
On my side I'm doing the same for installAssetsTask, I just don't have the resolveAgent, try removing it maybe.
oh, okay!
then it looks like the types are wrong:
Type '{ dispatcher: Agent; }' is missing the following properties from type 'DownloadAgent': retryHandler, rangePolicy, checkpointHandler, head, dispatchts(2739)
I believe the issue is still there, after a few installation attempts it just times out. Is it related to this issue?