bun
bun copied to clipboard
Windows: Bun install fails to download when $Env:http_proxy is set
What version of Bun is running?
1.0.29
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
- Set $Env.http_proxy in $PROFILE
e.g.
$Env:http_proxy = "http://127.0.0.1:7890"; $Env:https_proxy = "http://127.0.0.1:7890" - Init a bun project
- Add some dependencies.
e.g.
bun init
bun add react
What is the expected behavior?
Dependencies being installed correctly.
What do you see instead?
bun add v1.0.29-canary.22 (5147c0ba)
🔍 @types/bun [11/12]
error: Syscall downloading package manifest @types/bun
🔍 @types/bun [11/12]
error: Syscall downloading package manifest react
🔍 typescript [18/18]
error: Syscall downloading package manifest typescript
error: @types/bun@latest failed to resolve
error: react@ failed to resolve
Additional information
With --verbose:
Details
bun add v1.0.29-canary.22 (5147c0ba)
Enqueue package manifest for download: @types/bun
[0.00ms] [cache hit] react
Enqueue package manifest for download: react
🔍 Resolving [1/2] [PackageManager] waiting for 2 tasks
Request: GET /@types%2fbun
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Request: GET /react
If-None-Match: W/"d13fe651ecc5eadfbb486c6b999d9db2"
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /@types%2fbun
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Request: GET /react
If-None-Match: W/"d13fe651ecc5eadfbb486c6b999d9db2"
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /@types%2fbun
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Request: GET /react
If-None-Match: W/"d13fe651ecc5eadfbb486c6b999d9db2"
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /@types%2fbun
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Request: GET /react
If-None-Match: W/"d13fe651ecc5eadfbb486c6b999d9db2"
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /@types%2fbun
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Request: GET /react
If-None-Match: W/"d13fe651ecc5eadfbb486c6b999d9db2"
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /@types%2fbun
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Request: GET /react
If-None-Match: W/"d13fe651ecc5eadfbb486c6b999d9db2"
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
🔍 @types/bun [11/12]
error: Response: < 200 Connection established
Syscall downloading package manifest @types/bun
🔍 react [12/12]
error: Syscall downloading package manifest react
Enqueue package manifest for download: typescript
Request: GET /typescript
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /typescript
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /typescript
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /typescript
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /typescript
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /typescript
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.0.29
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
🔍 typescript [18/18]
error: Syscall downloading package manifest typescript
warn: warn: Syscall downloading package manifest @types/bun
warn: warn: Syscall downloading package manifest react
warn: warn: Syscall downloading package manifest @types/bun
warn: warn: Syscall downloading package manifest react
warn: warn: Syscall downloading package manifest @types/bun
warn: warn: Syscall downloading package manifest react
warn: warn: Syscall downloading package manifest @types/bun
warn: warn: Syscall downloading package manifest react
warn: warn: Syscall downloading package manifest @types/bun
warn: warn: Syscall downloading package manifest react
warn: warn: Syscall downloading package manifest typescript
warn: warn: Syscall downloading package manifest typescript
warn: warn: Syscall downloading package manifest typescript
warn: warn: Syscall downloading package manifest typescript
warn: warn: Syscall downloading package manifest typescript
error: @types/bun@latest failed to resolve
error: react@ failed to resolve
same problem with me!
bun install v1.1.0 (5903a614) Enqueue package manifest for download: @types/bun 🔍 Resolving [1/1] [PackageManager] waiting for 1 tasks Request: GET /@types%2fbun Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.1.0 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
the same goes for Clash users:
bun install v1.1.0 (5903a614)
info: cannot move files from tempdir: RenameAcrossMountPoints, using fallback
Enqueue package manifest for download: @types/bun
🔍 Resolving [1/1] [PackageManager] waiting for 1 tasks
Request: GET /@types%2fbun
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*
Connection: keep-alive
User-Agent: Bun/1.1.0
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /@types%2fbun
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, /
Connection: keep-alive
User-Agent: Bun/1.1.0
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /@types%2fbun
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, /
Connection: keep-alive
User-Agent: Bun/1.1.0
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /@types%2fbun
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, /
Connection: keep-alive
User-Agent: Bun/1.1.0
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /@types%2fbun
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, /
Connection: keep-alive
User-Agent: Bun/1.1.0
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /@types%2fbun
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, /
Connection: keep-alive
User-Agent: Bun/1.1.0
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
🔍 @types/bun [6/6]
error: Syscall downloading package manifest @types/bun
Enqueue package manifest for download: typescript
Request: GET /typescript
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, /
Connection: keep-alive
User-Agent: Bun/1.1.0
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /typescript
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, /
Connection: keep-alive
User-Agent: Bun/1.1.0
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /typescript
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, /
Connection: keep-alive
User-Agent: Bun/1.1.0
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /typescript
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, /
Connection: keep-alive
User-Agent: Bun/1.1.0
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /typescript
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, /
Connection: keep-alive
User-Agent: Bun/1.1.0
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Request: GET /typescript
Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, /
Connection: keep-alive
User-Agent: Bun/1.1.0
Host: registry.npmjs.org
Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
🔍 typescript [12/12]
error: Syscall downloading package manifest typescript
warn: Syscall downloading package manifest @types/bun
warn: Syscall downloading package manifest @types/bun
warn: Syscall downloading package manifest @types/bun
warn: Syscall downloading package manifest @types/bun
warn: Syscall downloading package manifest @types/bun
warn: Syscall downloading package manifest typescript
warn: Syscall downloading package manifest typescript
warn: Syscall downloading package manifest typescript
warn: Syscall downloading package manifest typescript
warn: Syscall downloading package manifest typescript
Clean lockfile: 1 packages - 1 packages in 57.4us
error: @types/bun@latest failed to resolve
I have the same problem. Http_proxy was settled. And I need to have it settled, are under corporate proxy, cannot do without it.
same issue
bun install v1.1.2 (c8d072c2)
🔍 vite [11/12]
error: Syscall downloading package manifest vite
same issue
bun install v1.1.2 (c8d072c2) 🔍 vite [11/12] error: Syscall downloading package manifest vite
Bro, replying "same issue" does not help anything; it doesn't provide any useful information to fix the bug. You can just press the emoji ("reaction") button. 🙂
I would like to help pinpoint this issue, but I'm unsure where to start. I'm ready to compile 'bun' locally and then debug it, but since the compilation process for 'bun' also requires 'bun install', it becomes a chicken-and-egg problem.
I would like to help pinpoint this issue, but I'm unsure where to start. I'm ready to compile 'bun' locally and then debug it, but since the compilation process for 'bun' also requires 'bun install', it becomes a chicken-and-egg problem.
I believe you can run the bun install script for bun itself without setting the proxy.
I would like to help pinpoint this issue, but I'm unsure where to start. I'm ready to compile 'bun' locally and then debug it, but since the compilation process for 'bun' also requires 'bun install', it becomes a chicken-and-egg problem.
I believe you can run the bun install script for bun itself without setting the proxy.
(base) PS E:\github\bun> bun install bun install v1.1.2 (c8d072c2) 🔍 Resolving... error: Syscall downloading tarball [email protected] 🔍 Resolving... error: Syscall downloading tarball [email protected] 🔍 Resolving... error: Syscall downloading tarball @eslint/[email protected] 🔍 Resolving... error: Syscall downloading tarball [email protected] . . .
Is $Env:http_proxy present in your Powershell's $PROFILE?
Is $Env:http_proxy present in your Powershell's $PROFILE?
Yes http_proxy and https_proxy in both $Env and file $PROFILE. BTW: I'm using the company network, which has a firewall, and all access needs to go through the proxy.
https://github.com/oven-sh/bun/blob/7b5065c1c9d46d838d23f0279a508d0bae3357bd/src/http.zig#L2632-L2644
The problem is with proxy.ssl.handshake(), which throws an error.Syscall.