Open GustavBW opened 1 month ago
Can you run bun upgrade
? The current version of Bun is v1.1.22
Also, note that this will need an await Promise.all
:
const blobs: Blob[] = [...];
blobs.map(b => {
const data = await blob.arrayBuffer();
await Bun.write(<some file to output to>, data);
})
Can you run
bun upgrade
? The current version of Bun is v1.1.22
I tried before posting, but I'm getting a funky error:
E:\GitHub\devour> bun upgrade
Bun v1.1.22 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 (baseline)
UpgradeCommand:
Elapsed: 1563ms | User: 0ms | Sys: 0ms
RSS: 79.50MB | Peak: 79.50MB | Commit: 0.14GB | Faults: 19612
----- bun meta -----
0 00007FF7040A0508
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 21324 panic: attempt to unwrap error
???:?:?: 0x7ff702cb4d51 in ??? (bun.exe)
???:?:?: 0x7ff702cb293d in ??? (bun.exe)
???:?:?: 0x7ff702cb53b6 in ??? (bun.exe)
???:?:?: 0x7ff702cc18e4 in ??? (bun.exe)
???:?:?: 0x7ff7029f15fe in ??? (bun.exe)
???:?:?: 0x7ff70559d943 in ??? (bun.exe)
???:?:?: 0x7ffd2d07257c in ??? (KERNEL32.DLL)
???:?:?: 0x7ffd2edcaf27 in ??? (ntdll.dll)
Also, note that this will need an
await Promise.all
:
I'm aware. In my impl. I'm using a standard for loop. Don't know why I went with Array.map() here - editing that real quick.
Can you reinstall from curl? Some of those early versions would repeatedly crash in bun upgrade on Windows
Can you reinstall from curl? Some of those early versions would repeatedly crash in bun upgrade on Windows
Good idea. Just did, now on v. 1.1.22, but observing the same behavior. Ill update the issue
What version of Bun is running?
1.1.22
What platform is your computer?
Microsoft Windows NT 10.0.22621.0 x64
What steps can reproduce the bug?
Write any series of array buffers with data to disk, and sometimes, the resulting file will be empty:
What is the expected behavior?
That the file contains the data in the array buffer.
What do you see instead?
When inspecting the files in the File Explorer, they're completely empty. Also, when trying to open the files with the normal image viewer, they're corrupted or "something went wrong when trying to open..."
Additional information
Bun reports the amount of bytes written to equal that of the byteLength of the arrayBuffer:
So it may be a case of Windows doing Windows things.