Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbortError: Request aborted with npm specifiers #16684

Open
Jakob5358 opened this issue Nov 17, 2022 · 3 comments
Open

AbortError: Request aborted with npm specifiers #16684

Jakob5358 opened this issue Nov 17, 2022 · 3 comments
Labels
needs investigation requires further investigation before determining if it is an issue or not node API polyfill Related to various "node:*" modules APIs node compat node:http Issues with `node:http` module - to be fixed with a rewrite

Comments

@Jakob5358
Copy link

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:

error: Uncaught AbortError: Request aborted
    at abort (file:///C:/Users/jbeta/AppData/Local/deno/npm/registry.npmjs.org/undici/5.12.0/lib/api/abort-signal.js:10:18)    
    at AbortSignal.self.<computed> (file:///C:/Users/jbeta/AppData/Local/deno/npm/registry.npmjs.org/undici/5.12.0/lib/api/abort-signal.js:29:5)
    at innerInvokeEventListeners (deno:ext/web/02_event.js:755:9)
    at invokeEventListeners (deno:ext/web/02_event.js:795:7)
    at dispatch (deno:ext/web/02_event.js:664:11)
    at AbortSignal.dispatchEvent (deno:ext/web/02_event.js:1043:14)
    at AbortSignal.[[[signalAbort]]] (deno:ext/web/03_abort_signal.js:86:12)
    at AbortController.abort (deno:ext/web/03_abort_signal.js:159:32)
    at Timeout.<anonymous> (file:///C:/Users/jbeta/AppData/Local/deno/npm/registry.npmjs.org/@discordjs/rest/1.3.0/dist/index.js:515:73)
    at https://deno.land/std@0.165.0/node/timers.ts:21:15

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.

@dsherret dsherret added needs investigation requires further investigation before determining if it is an issue or not node compat labels Nov 18, 2022
@khrj
Copy link
Contributor

khrj commented Nov 18, 2022

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)

@Jakob5358
Copy link
Author

Right, do you want to make a new issue?

@khrj
Copy link
Contributor

khrj commented Nov 19, 2022

#16710

@bartlomieju bartlomieju added the node API polyfill Related to various "node:*" modules APIs label Mar 4, 2024
@bartlomieju bartlomieju added the node:http Issues with `node:http` module - to be fixed with a rewrite label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation requires further investigation before determining if it is an issue or not node API polyfill Related to various "node:*" modules APIs node compat node:http Issues with `node:http` module - to be fixed with a rewrite
Projects
None yet
Development

No branches or pull requests

4 participants