Open Jakob5358 opened 2 years ago
I've been investigating the cause of this issue, and it turns out that this can be reproduced much more simply:
import { request } from "npm:undici"
await request("https://www.example.com")
fails with
error: Uncaught (in promise) ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (file:///home/khushraj/.cache/deno/npm/registry.npmjs.org/undici/5.12.0/lib/core/connect.js:133:24)
at file:///home/khushraj/.cache/deno/npm/registry.npmjs.org/undici/5.12.0/lib/core/connect.js:80:46
at Timeout.<anonymous> (file:///home/khushraj/.cache/deno/npm/registry.npmjs.org/undici/5.12.0/lib/core/connect.js:121:9)
at https://deno.land/std@0.164.0/node/timers.ts:21:15
at Object.action (deno:ext/web/02_timers.js:147:13)
at handleTimerMacrotask (deno:ext/web/02_timers.js:64:12)
Right, do you want to make a new issue?
Reproduction repo: https://github.com/Jakob5358/DJS-Deno-Test
The node version inside the 'node' dir with 'node index.js' works but not the deno version.
For this specific repro, you'll need to put a discord bot token in the TOKEN variable, you can get one by following these steps: go to https://discord.com/developers/applications -> create a new application -> press bot -> create new bot -> reset token -> copy token -> put it in the TOKEN variable
Then go in the project and run 'deno task start' and wait for just over a minute (I timed it). than you'll get an error which looks like this:
This is my first issue btw so let me know if anything is off. If you dont want to make your own bot and dont trust that package or whatever, I can send you a test bot token on discord.