bun icon indicating copy to clipboard operation
bun copied to clipboard

Fail to upgrade bun on Windows (native) and Linux (WSL)

Open tuyen-at-work opened this issue 1 year ago • 4 comments

What version of Bun is running?

1.1.4

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64 - Linux 5.15.146.1-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

Windows:

bun upgrade
Bun v1.1.5 is out! You're on v1.1.4

uh-oh: attempt to unwrap error
bun will crash now 😭😭😭

----- bun meta -----
Bun v1.1.4 (fbe2fe0c) Windows x64
UpgradeCommand:
Elapsed: 3134ms | User: 46ms | Sys: 93ms
RSS: 81.11MB | Peak: 81.12MB | Commit: 133.01MB | Faults: 21382
----- bun meta -----

0   00007FF7A7F72588
1   ???
2   ???
3   ???
4   ???
5   ???
6   ???
7   ???
8   ???
9   ???

Search GitHub issues https://bun.sh/issues or join in #windows channel in https://bun.sh/discord

thread 33672 panic: attempt to unwrap error
???:?:?: 0x7ff7a6b83221 in ??? (bun.exe)
???:?:?: 0x7ff7a6b80e06 in ??? (bun.exe)
???:?:?: 0x7ff7a6b83876 in ??? (bun.exe)
???:?:?: 0x7ff7a6b902fc in ??? (bun.exe)
???:?:?: 0x7ff7a68b1603 in ??? (bun.exe)
???:?:?: 0x7ff7a9474c63 in ??? (bun.exe)
???:?:?: 0x7ffc6fcf7343 in ??? (KERNEL32.DLL)
???:?:?: 0x7ffc6fec26b0 in ??? (ntdll.dll)

Linux (WSL):

bun upgrade
Bun upgrade failed with error: HTTPForbidden

Please upgrade manually:
  curl -fsSL https://bun.sh/install | bash

What is the expected behavior?

Upgrade successfully.

What do you see instead?

Upgrade failed

Additional information

I installed and turn-on Cloudflare WARP 2024.3.409.0 (https://one.one.one.one/). If I turn it off, upgrade on Linux will success while it's still fail on Windows.

tuyen-at-work avatar Apr 26 '24 10:04 tuyen-at-work

Notes: the issues also happen on my colleagues's computer for other Bun versions. They also have Cloudfare installed and turn-on. If turn off, upgrade will success on WSL.

tuyen-at-work avatar Apr 26 '24 10:04 tuyen-at-work

same here

staabm avatar Apr 26 '24 10:04 staabm

Facing the same issue here.

shaik-abdul-thouhid avatar Apr 26 '24 13:04 shaik-abdul-thouhid

Hi @tuyen-at-work, can you try to set env GITHUB_TOKEN in ~/.bashrc, ~/.zshrc then run upgrade again? The error in WSL is because GitHub ratelimit your requests, not sure about the errors in Windows (native).

See more in here:

  • https://github.com/oven-sh/bun/blob/main/docs/cli/bun-create.md#environment-variables
  • https://github.com/oven-sh/bun/issues/9104

haunt98 avatar May 11 '24 16:05 haunt98