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
When using Deno and Bun, the error occurs because the client library depends on "got" and uses HTTP2 for requests.
You can reproduce the issue with these two repos.
error: Uncaught (in promise) RequestError
at ClientRequest.<anonymous> (file:///Users/logan/Library/Caches/deno/npm/registry.npmjs.org/got/11.8.6/dist/source/core/index.js:970:111)
at Object.onceWrapper (ext:deno_node/_events.mjs:518:26)
at ClientRequest.emit (ext:deno_node/_events.mjs:405:35)
at ClientRequest.origin.emit (file:///Users/logan/Library/Caches/deno/npm/registry.npmjs.org/@szmarczak/http-timer/4.0.6/dist/source/index.js:43:20)
at ClientRequest.flushHeaders (file:///Users/logan/Library/Caches/deno/npm/registry.npmjs.org/http2-wrapper/1.0.3/source/client-request.js:363:10)
at Object.runMicrotasks (ext:core/01_core.js:683:26)
at processTicksAndRejections (ext:deno_node/_next_tick.ts:59:10)
at runNextTicks (ext:deno_node/_next_tick.ts:76:3)
at eventLoopTick (ext:core/01_core.js:182:21)
or
346 | ...options
347 | });
348 | session[kCurrentStreamsCount] = 0;
349 | session[kGracefullyClosing] = false;
350 |
351 | const isFree = () => session[kCurrentStreamsCount] < session.remoteSettings.maxConcurrentStreams;
^
TypeError: null is not an object (evaluating 'session.remoteSettings.maxConcurrentStreams')
at isFree (/Users/logan/code/temp/test_aptos_error/bun_test/node_modules/http2-wrapper/source/agent.js:351:67)
at /Users/logan/code/temp/test_aptos_error/bun_test/node_modules/http2-wrapper/source/agent.js:449:12
at emit (node:events:183:48)
at #onConnect (node:http2:730:13)
at onConnect (node:http2:867:23)
at emit (node:events:183:48)
at handshake (node:net:159:14)
965 | var _a;
966 | // Force clean-up, because some packages (e.g. nock) don't do this.
967 | request.destroy();
968 | // Node.js <= 12.18.2 mistakenly emits the response `end` first.
969 | (_a = request.res) === null || _a === void 0 ? void 0 : _a.removeAllListeners('end');
970 | error = error instanceof timed_out_1.TimeoutError ? new TimeoutError(error, this.timings, this) : new RequestError(error.message, error, this);
^
RequestError: ERR_HTTP2_ERROR: h2 is not supported
code: "ERR_HTTP2_ERROR"
at /Users/logan/code/temp/test_aptos_error/bun_test/node_modules/got/dist/source/core/index.js:970:111
at onceWrapper (native:1:1)
at emitError (native:1:1)
at /Users/logan/code/temp/test_aptos_error/bun_test/node_modules/http2-wrapper/source/client-request.js:363:10
at processTicksAndRejections (native:1:1)
at #onConnect (node:http2:730:13)
at onConnect (node:http2:867:23)
at emit (node:events:183:48)
at handshake (node:net:159:14)
Bun v1.1.30 (macOS arm64)
For Bun, they don't support the allowHttp1 flag for the HTTP2 module which got relies on.
For Deno, the issue is likely with the runtime, believe it might have to do the the "stream" module.
🐛 Bug Description
When using Deno and Bun, the error occurs because the client library depends on "got" and uses HTTP2 for requests.
You can reproduce the issue with these two repos.
or
How to reproduce
https://github.com/WGB5445/test_deno_aptos_ts_sdk
https://github.com/WGB5445/test_bun_aptos_ts_sdk
System information
System details:
The text was updated successfully, but these errors were encountered: