{"record":{"id":"b599c43e4141ac54","repo":"oven-sh/bun","slug":"no-cores-url-given","errorCode":null,"errorMessage":"no cores-url given","messagePattern":"no cores-url given","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/debug-coredump.ts","lineNumber":25,"sourceCode":"// -p <PID of the test that crashed> (buildkite should show this)\n// -b <URL to the bun-profile.zip artifact for the appropriate platform>\n// -c <URL to the bun-cores.tar.gz.age artifact for the appropriate platform>\n// -d <debugger> (default: lldb)\nconst {\n  values: { pid: stringPid, [\"build-url\"]: buildUrl, [\"cores-url\"]: coresUrl, debugger: debuggerPath },\n} = parseArgs({\n  options: {\n    pid: { type: \"string\", short: \"p\" },\n    [\"build-url\"]: { type: \"string\", short: \"b\" },\n    [\"cores-url\"]: { type: \"string\", short: \"c\" },\n    debugger: { type: \"string\", short: \"d\", default: \"lldb\" },\n  },\n});\n\nif (stringPid === undefined) throw new Error(\"no PID given\");\nconst pid = parseInt(stringPid);\nif (buildUrl === undefined) throw new Error(\"no build-url given\");\nif (coresUrl === undefined) throw new Error(\"no cores-url given\");\nif (!process.env.AGE_CORES_IDENTITY?.startsWith(\"AGE-SECRET-KEY-\"))\n  throw new Error(\"no identity given in $AGE_CORES_IDENTITY\");\n\nconst id = Bun.hash(buildUrl + coresUrl).toString(36);\nconst dir = join(tmpdir(), `debug-coredump-${id}.tmp`);\nfs.mkdirSync(dir, { recursive: true });\n\nif (!fs.existsSync(join(dir, \"bun-profile\")) || !fs.existsSync(join(dir, `bun-${pid}.core`))) {\n  console.log(\"downloading bun-profile.zip\");\n  const zip = await (await fetch(buildUrl)).arrayBuffer();\n  await Bun.write(join(dir, \"bun-profile.zip\"), zip);\n  // -j: junk paths (don't create directories when extracting)\n  // -o: overwrite without prompting\n  // -d: extract to this directory instead of cwd\n  await Bun.$`unzip -j -o ${join(dir, \"bun-profile.zip\")} -d ${dir}`;\n\n  console.log(\"downloading cores\");\n  const cores = await (await fetch(coresUrl)).arrayBuffer();","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/debug-coredump.ts#L7-L43","documentation":"Error \"no cores-url given\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at scripts/debug-coredump.ts:25 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}