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

Got ^14.4.5 (latest version) not working on bun 1.1.37 (latest version) #15477

Open
pjlunardelli opened this issue Nov 28, 2024 · 2 comments · May be fixed by #17494
Open

Got ^14.4.5 (latest version) not working on bun 1.1.37 (latest version) #15477

pjlunardelli opened this issue Nov 28, 2024 · 2 comments · May be fixed by #17494
Labels
bug Something isn't working node:http2

Comments

@pjlunardelli
Copy link

pjlunardelli commented Nov 28, 2024

What version of Bun is running?

1.1.37+8ca0eb831

What platform is your computer?

Darwin 24.1.0 arm64 arm

What steps can reproduce the bug?

Dependencies version:

"got": "^14.4.5",
"http2-wrapper": "2.2.1"

Run code bellow:

import got from "got";

await got("https://google.com.br", {
  http2: true,
});

What is the expected behavior?

Return response

What do you see instead?

113 |   }
114 | };
115 | 
116 | // This is basically inverted `closeCoveredSessions(...)`.
117 | const closeSessionIfCovered = (where, coveredSession) => {
118 |   for (let index = 0; index < where.length; index++) {
                                   ^
TypeError: undefined is not an object (evaluating 'where.length')
      at closeSessionIfCovered (/${OmittedForPrivacy}/node_modules/http2-wrapper/source/agent.js:118:30)
      at /${OmittedForPrivacy}/node_modules/http2-wrapper/source/agent.js:524:7
      at emit (node:events:73:22)
      at #onConnect (node:http2:2088:45)
      at onConnect (node:http2:2219:22)
550 |                                           return;
551 |                                           }
552 | 
553 |                                           // See https://github.com/nodejs/node/issues/38426
554 |                                           if (session.setLocalWindowSize) {
555 |                                           session.setLocalWindowSize(1024 * 1024 * 4); // 4 MB
                     ^
TypeError: this.#parser?.setLocalWindowSize is not a function. (In 'this.#parser?.setLocalWindowSize(windowSize)', 'this.#parser?.setLocalWindowSize' is undefined)
      at node:http2:2188:44
      at /${OmittedForPrivacy}/node_modules/http2-wrapper/source/agent.js:555:16
      at onceWrapper (node:events:165:55)
      at emit (node:events:73:22)
      at remoteSettings (node:http2:2012:49)

Additional information

No response

@pjlunardelli pjlunardelli added bug Something isn't working needs triage labels Nov 28, 2024
@pjlunardelli
Copy link
Author

When I run bunx tsx script.ts, it works as expected

@rvuyyuru2
Copy link

TypeError: undefined is not an object (evaluating 'where.length') still the same not fixed

@cirospaciari cirospaciari linked a pull request Feb 20, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working node:http2
Projects
None yet
3 participants