-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
HTTP related regression in v1.1.27 #14184
Comments
@nektro this is probably a regression from the node:http agent changes |
This problem already existed in previous versions. |
any workaround on this issue? i'm currently stuck at v1.1.26 |
Facing the same issue in v1.1.34 |
Any updates on the issue, or at least a workaround? |
Hi! Thank you for your time, i updated bun to canary release and seems like the issue is still there, probably not related to what it was fixed.
Trying the astro setup + contentful SDK fails to connect internally to their API:
Meanwhile, using npx seems to work fine without any issue:
|
Sorry to ping @cirospaciari just in case it doesn't get notified |
lets open a new issue for that, since the repro given in the original issue now behaves the same in bun as it does in node |
What version of Bun is running?
1.1.29+6d43b3662
What platform is your computer?
Darwin 23.6.0 arm64 arm
What steps can reproduce the bug?
I noticed a strange issue while using the contentful package after upgrading Bun. After some testing, I discovered the issue only occurs on Bun versions after 1.1.26 (last working version).
The issue is that the Contentful API client seemingly attempts to connect to their API URL using a combination of
https://
and port 80. This causes the connection to fail.I originally reported this in the Contentful Discord server before I found the relation to Bun. Therefore, I suspect this may be a Node-compatibility related issue.
Contentful uses Axios under the hood for communication.
I haven't yet found the exact piece of code causing this, but I would assume it has something to do with the detection of which protocol to use and how to match up port 80 or 443 to that protocol. I will pop back with anything I find, but maybe someone more familiar with the related changes in v1.1.27 already has an inkling? 😅
Reproduction
While using an affected Bun version (such as latest, v1.1.29 atm), create a new project and
bun add contentful
In the
index.ts
file, add the following:Run
bun .
on the file. The output will look something like this:What is the expected behavior?
I expect the API client to connect as intended, and as it did previously in version 1.1.26 or prior. The protocol should be
https://
and the port should be443
.What do you see instead?
The API client seemingly attempts to connect to their API URL using a combination of
https://
and port80
. This causes the connection to fail.Additional information
I tested several versions of Contenful's package. Both older and newer versions worked before the Bun upgrade, and both stopped working after.
This also likely has nothing to do with OS, as it also occurs on Linux/ARM (although I suppose I haven't tried an x86 OS)
The text was updated successfully, but these errors were encountered: