oven-sh / bun

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

Internal Assertion Failure: Invalid cache key "F:\\test-discord\" #14238

Open devaoto opened 6 days ago

devaoto commented 6 days ago

How can we reproduce the crash?

It only crashes if I use seyfert

src/index.ts:

import { Client, type ParseClient } from "seyfert";

const client = new Client();

client.start();

declare module "seyfert" {
  interface UsingClient extends ParseClient<Client<true>> {}
}

package.json

{
  "name": "test-discord",
  "module": "src/index.ts",
  "type": "module",
  "devDependencies": {
    "@types/bun": "latest"
  },
  "peerDependencies": {
    "typescript": "^5.0.0"
  },
  "dependencies": {
    "seyfert": "^2.1.0"
  }
}

Relevant log output

============================================================
Bun v1.1.29 (6d43b366) Windows x64
Windows v.win10_fe
CPU: sse42 avx avx2 avx512
Args: "bun" "run" "src/index.ts"
Features: jsc dotenv tsconfig(2)
Builtins: "bun:main" "node:buffer" "node:console" "node:crypto" "node:fs" "node:https" "node:path" "node:string_decoder" "node:util" "node:util/types" "node:zlib" "node:cluster"
Elapsed: 5642ms | User: 828ms | Sys: 343ms
RSS: 133.94MB | Peak: 133.94MB | Commit: 0.16GB | Faults: 33224

panic(main thread): Internal Assertion Failure: Invalid cache key "F:\\test-discord\"
See Resolver.assertValidCacheKey for details.
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:

 https://bun.report/1.1.29/wr16d43b36AiogggCgv7tBilqyRqg1rLygwrL25vyfit/7oBy9/1lB__qvp89BA0eNodzEEKg0AMBdB9TxHc1wO4KwVB3LXgajZh5ovBMANJFLx9sQd4b6oBq6z0coeFtEojix6GgaZ6skqhzHkD7bioG4eUAh7PIp6bldQ9vgB94E1PWM//ZbnZ+1YzLlqbUUGwqPc/zksoSg

Stack Trace (bun.report)

https://bun.report/1.1.29/wr16d43b36AiogggCgv7tBilqyRqg1rLygwrL25vyfit/7oBy9/1lB__qvp89BA0eNodzEEKg0AMBdB9TxHc1wO4KwVB3LXgajZh5ovBMANJFLx9sQd4b6oBq6z0coeFtEojix6GgaZ6skqhzHkD7bioG4eUAh7PIp6bldQ9vgB94E1PWM//ZbnZ+1YzLlqbUUGwqPc/zksoSg

Jarred-Sumner commented 6 days ago

It's a filesystem path issue in our code for normalizing file paths

devaoto commented 6 days ago

I found a similar issue just now: https://github.com/oven-sh/bun/issues/11709