{"record":{"id":"91cf01d70f175ea4","repo":"can1357/oh-my-pi","slug":"timed-out-fetching-github-release-metadata-after-3","errorCode":null,"errorMessage":"Timed out fetching GitHub release metadata after 30s","messagePattern":"Timed out fetching GitHub release metadata after 30s","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/cli/update-cli.ts","lineNumber":266,"sourceCode":"\tgithubToken: string | undefined = $env.GITHUB_TOKEN || $env.GH_TOKEN,\n\tallowPrerelease = false,\n): Promise<ReleaseBinaryAsset> {\n\tconst tag = `v${expectedVersion}`;\n\tconst headers: Record<string, string> = {\n\t\tAccept: \"application/vnd.github+json\",\n\t\t\"X-GitHub-Api-Version\": \"2022-11-28\",\n\t};\n\tif (githubToken) headers.Authorization = `Bearer ${githubToken}`;\n\n\tlet response: Response;\n\ttry {\n\t\tresponse = await fetchImpl(`${GITHUB_API}/repos/${REPO}/releases/tags/${encodeURIComponent(tag)}`, {\n\t\t\theaders,\n\t\t\tsignal: withTimeoutSignal(RELEASE_METADATA_TIMEOUT_MS),\n\t\t});\n\t} catch (err) {\n\t\tif (isTimeoutError(err)) {\n\t\t\tthrow new Error(\"Timed out fetching GitHub release metadata after 30s\", { cause: err });\n\t\t}\n\t\tif (isUnsupportedProxyError(err)) throw new Error(unsupportedProxyMessage(), { cause: err });\n\t\tthrow err;\n\t}\n\tif ((response.status === 403 && !githubToken) || response.status === 429) {\n\t\tthrow new Error(\n\t\t\t\"GitHub API rate limit exceeded while fetching release metadata; retry later or set GITHUB_TOKEN or GH_TOKEN\",\n\t\t);\n\t}\n\tif (!response.ok) {\n\t\tthrow new Error(`Failed to fetch GitHub release metadata: ${response.statusText}`);\n\t}\n\n\treturn resolveReleaseBinaryAsset(await response.json(), tag, binaryName, { allowPrerelease });\n}\n\nexport interface VerifiedBinaryDownloadOptions {\n\turl: string;","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/cli/update-cli.ts#L248-L284","documentation":"getReleaseBinaryAsset fetches release metadata from the GitHub API with a 30-second timeout (RELEASE_METADATA_TIMEOUT_MS). When the request aborts due to the timeout, the code rewraps the AbortError with this clearer message (original error preserved as `cause`). The updater cannot proceed without release metadata.","triggerScenarios":"The fetch to `${GITHUB_API}/repos/${REPO}/releases/tags/${tag}` with `withTimeoutSignal(30000)` rejects with a timeout/abort error — the API did not respond within 30 seconds.","commonSituations":"Slow or saturated networks, corporate proxies delaying TLS handshakes, DNS resolution hangs, GitHub API incidents/outages, or VPN/firewall throttling api.github.com.","solutions":["Retry the update — transient latency is the most common cause.","Check connectivity to the API: curl -m 30 https://api.github.com/repos/<owner>/<repo>/releases/tags/<tag>.","Check GitHub status (https://www.githubstatus.com) for API incidents.","Inspect HTTP(S)_PROXY settings — a slow proxy can exceed the 30s budget; also check for SOCKS proxies (see the unsupported-proxy error)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"for (let attempt = 1; attempt <= 3; attempt++) {\n  try { await update(); return; }\n  catch (err) {\n    if (err instanceof Error && err.message.includes(\"Timed out fetching GitHub release metadata\") && attempt < 3) {\n      await Bun.sleep(2_000 * attempt);\n      continue;\n    }\n    throw err;\n  }\n}","preventionTips":["Run updates on reliable network paths; avoid long-latency VPN hops for api.github.com.","Configure HTTP(S)_PROXY only when the proxy is fast and reachable.","Check githubstatus.com before bulk update rollouts.","Monitor the X-GitHub-Request-Path latency if automating updates."],"tags":["network","timeout","github-api","update"],"backgroundTag":"request-timeout","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}