oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.26k stars 2.69k forks source link

bun install / update / upgrade fails on Windows if https proxy is set #13796

Open Huliiiiii opened 2 weeks ago

Huliiiiii commented 2 weeks ago

What version of Bun is running?

1.1.27

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

// Set https_proxy to 'http://127.0.0.1:7890'
> bun upgrade --canary

GAC    Version        Location
---    -------        --------
True   v4.0.30319     C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsB...
At C:\program files\powershell\7\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1:969 char:13
+             throw $invalidFileFormatException
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FileFormatException
    + FullyQualifiedErrorId :

error: Failed to verify Bun (code: FileNotFound))

> bun upgrade
1 | HTTP/1.1 200 OK
    ^
error: Unexpected HTTP
    at releases.json:1:1

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

Huliiiiii commented 1 week ago

Also happends on updates.

> bun update @tanstack/solid-query @tanstack/solid-query-devtools valibot @types/bun @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-plugin-jsx-a11y eslint-plugin-oxlint  eslint-plugin-perfectionist playwright postcss typescript-eslint vite-plugin-cjs-interop
[0.00ms] ".env.local"
bun update v1.1.27 (267afa29)
  🔍 levn [108/163] 1 | �������
    ^
error: Unexpected HTTP
    at levn:1:1
  🔍 json-stable-stringify-without-jsonify [128/174] 1 | �������
    ^
error: Unexpected HTTP
    at brace-expansion:1:1
  🔍 playwright [137/180] 1 | �������
    ^
error: Unexpected HTTP
    at fsevents:1:1

Bun v1.1.27 (267afa2) on windows x86_64 [UpdateCommand]

Segmentation fault at address 0xFFFFFFFFFFFFFFFF

cirospaciari commented 1 week ago

Can you share the package.json? Are you using squid proxy?

Huliiiiii commented 1 week ago

I am using clash (clash for windows). It can be reproduced on this example solid project.

{
  "name": "example-basic",
  "type": "module",
  "scripts": {
    "dev": "vinxi dev",
    "build": "vinxi build",
    "start": "vinxi start",
    "version": "vinxi version"
  },
  "dependencies": {
    "@solidjs/meta": "^0.29.4",
    "@solidjs/router": "^0.14.1",
    "@solidjs/start": "^1.0.6",
    "solid-js": "^1.8.18",
    "vinxi": "^0.4.1"
  },
  "engines": {
    "node": ">=18"
  }
}
cirospaciari commented 1 week ago

Thanks will try clash and using the package json you mentioned here I tested locally and bun upgrade just worked.