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

Bun throws error 'A retry listener has been attached already' #2299

Open
iamkhalidbashir opened this issue Sep 12, 2023 · 6 comments
Open

Bun throws error 'A retry listener has been attached already' #2299

iamkhalidbashir opened this issue Sep 12, 2023 · 6 comments

Comments

@iamkhalidbashir
Copy link

Bun throws error on this line

https://github.com/sindresorhus/got/blob/944caa8ce8151d7b18ab17c4130b18d622c04ebe/source/core/index.ts#L219C3-L224C1

@sindresorhus
Copy link
Owner

If this only happens on Bun and not Node.js, you need to report it in the Bun issue tracker. They claim Node.js compatibility, so they need to resolve any Node.js compatibility issues.

@iamkhalidbashir
Copy link
Author

It makes sense, you can close this if you'd like
but I think its a small fix as all of other packages dosent give an issue with bun
so if you could look into it, would appreciate it.

@erictheswift
Copy link

As I understand, issue is bun firing newListener event after listener have been added, while node fires when the listener is about to be added but not added yet.

fix is stuck oven-sh/bun#4395

@erictheswift
Copy link

Unfortunately this isn't the only thing where bun fails in got,
e.g. if I ditch the retry checker, then

    typedResponse.statusMessage = typedResponse.statusMessage ?? http.STATUS_CODES[statusCode];

throws

TypeError: Attempted to assign to readonly property.

also bun seems to freeze 2 times out of 3 not resolving a single request response forever — didn't dive deep into why )

@bryanjtc
Copy link

Does 1.0.13 fix the issue?

@Thinkscape
Copy link

Does 1.0.13 fix the issue?

nope :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants