{"record":{"id":"f296d3890e25d7e4","repo":"Yeachan-Heo/oh-my-codex","slug":"native-assets-failed-to-download-url-respo","errorCode":null,"errorMessage":"[native-assets] failed to download ${url} (${response.status} ${response.statusText})","messagePattern":"\\[native-assets\\] failed to download (.+?) \\((.+?) (.+?)\\)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/native-assets.ts","lineNumber":266,"sourceCode":"  return manifest;\n}\n\nfunction isUnavailableManifestError(error: unknown): boolean {\n  if (!(error instanceof Error)) return false;\n  return /\\[native-assets\\] failed to fetch native release manifest/i.test(error.message)\n    || /fetch failed/i.test(error.message);\n}\n\nfunction isUnavailableArchiveError(error: unknown): boolean {\n  if (!(error instanceof Error)) return false;\n  return /\\[native-assets\\] failed to download /i.test(error.message)\n    || /fetch failed/i.test(error.message);\n}\n\nasync function downloadFile(url: string, destinationPath: string): Promise<void> {\n  const response = await fetch(url);\n  if (!response.ok || !response.body) {\n    throw new Error(`[native-assets] failed to download ${url} (${response.status} ${response.statusText})`);\n  }\n  await mkdir(dirname(destinationPath), { recursive: true });\n  await pipeline(Readable.fromWeb(response.body), createWriteStream(destinationPath));\n}\n\nasync function sha256ForFile(path: string): Promise<string> {\n  const hash = createHash('sha256');\n  hash.update(await readFile(path));\n  return hash.digest('hex');\n}\n\n\nconst SIDECAR_SUFFIX = '.sha256';\nconst LOCK_SUFFIX = '.hydrate.lock';\nconst LOCK_WAIT_MS = 10_000;\nconst LOCK_RETRY_MS = 100;\nconst NATIVE_LOCK_WAIT_MS_ENV = 'OMX_NATIVE_LOCK_WAIT_MS';\n","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/native-assets.ts#L248-L284","documentation":"A binary or archive download returned a non-OK status or had no body. This is the raw fetch inside downloadFile used to pull platform archives from the release; the message includes the failing URL and HTTP status so you can see exactly what was rejected.","triggerScenarios":"hydrateNativeBinary fetching an asset.download_url that returns 404 (asset missing for that platform), 403 (rate limit / private repo without auth), or a proxy/network failure producing a non-OK response.","commonSituations":"A platform archive (e.g. linux-arm64 musl) missing from the release; GitHub rate limits in CI; private repos where the asset URL requires authentication; expired signed URLs from a mirror.","solutions":["Open the URL in the message; if 404, confirm the release includes an asset for your platform.","If 403/429, address GitHub rate limiting (wait, cache, or mirror assets internally).","Pre-hydrate the cache in your base Docker image so runtime downloads are unnecessary.","Point NATIVE_RELEASE_BASE_URL at an authenticated internal mirror."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"async function assetDownloadable(url: string): Promise<boolean> { const r = await fetch(url, { method: 'HEAD' }); return r.ok; }","typeGuard":null,"tryCatchPattern":"try { await hydrateNativeBinary(); } catch (e) { if (/\\[native-assets\\] failed to download /.test(String(e))) { /* extract URL+status; fix proxy/rate limit/missing asset */ } throw e; }","preventionTips":["Cache hydrated binaries in base images","Handle GitHub rate limits by mirroring assets","Check release assets include your platform before pinning a version"],"tags":["native-assets","network","download","http-status"],"backgroundTag":"http-download-failed","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}