{"record":{"id":"e373cd5140fe8a67","repo":"can1357/oh-my-pi","slug":"timed-out-fetching-release-info-for-pkg-after","errorCode":null,"errorMessage":"Timed out fetching release info for ${pkg} after ${Math.round(timeoutMs / 1000)}s","messagePattern":"Timed out fetching release info for (.+?) after (.+?)s","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/cli/update-cli.ts","lineNumber":773,"sourceCode":"\tthrow new Error(`Could not resolve ${APP_NAME} binary path in PATH`);\n}\n\n/** Bound on `omp.rename` hops so a broken pointer chain cannot loop forever. */\nconst MAX_RENAME_HOPS = 3;\n\nasync function fetchLatestManifest(\n\tpkg: string,\n\ttimeoutMs: number,\n\tchannel: UpdateChannel,\n): Promise<{ version: string; manifest: Record<string, unknown> }> {\n\tlet response: Response;\n\ttry {\n\t\tresponse = await fetch(`${NPM_REGISTRY}${pkg}/${channel === \"canary\" ? \"canary\" : \"latest\"}`, {\n\t\t\tsignal: withTimeoutSignal(timeoutMs),\n\t\t});\n\t} catch (err) {\n\t\tif (isTimeoutError(err)) {\n\t\t\tthrow new Error(`Timed out fetching release info for ${pkg} after ${Math.round(timeoutMs / 1000)}s`, {\n\t\t\t\tcause: err,\n\t\t\t});\n\t\t}\n\t\tif (isUnsupportedProxyError(err)) throw new Error(unsupportedProxyMessage(), { cause: err });\n\t\tthrow err;\n\t}\n\tif (!response.ok) {\n\t\tif (response.status === 404 && channel === \"canary\") {\n\t\t\tthrow new Error(`No canary release has been published for ${pkg} yet. Try \\`${APP_NAME} update --stable\\`.`);\n\t\t}\n\t\tthrow new Error(`Failed to fetch release info for ${pkg}: ${response.statusText}`);\n\t}\n\n\tconst data: unknown = await response.json();\n\tif (!isRecord(data) || typeof data.version !== \"string\") {\n\t\tthrow new Error(`Malformed npm registry response for ${pkg}: missing version`);\n\t}\n\treturn { version: data.version, manifest: data };","sourceCodeStart":755,"sourceCodeEnd":791,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/cli/update-cli.ts#L755-L791","documentation":"Thrown when the HTTP request to the npm registry (NPM_REGISTRY/<pkg>/latest or /canary) during an `omp update` check does not complete within `timeoutMs`. The underlying fetch abort is detected via `isTimeoutError` and rethrown as this user-facing Error with the original abort as `cause`. It guards the updater against hanging indefinitely on a slow or unresponsive network path.","triggerScenarios":"Running the update check (fetch of latest/canary release metadata from the npm registry) when the fetch aborts via `withTimeoutSignal(timeoutMs)` because the response did not arrive in time.","commonSituations":"Slow or flaky network, offline machine with long DNS hangs, corporate firewalls silently dropping packets to registry.npmjs.org, heavily loaded proxy, or an excessively small timeout value.","solutions":["Check network connectivity to the npm registry (curl https://registry.npmjs.org/<pkg>/latest) and retry the update","Verify HTTP_PROXY/HTTPS_PROXY point at a working http(s) proxy; fix or unset them","Retry later or from a different network (VPN off, corporate proxy bypassed)","If timeouts persist despite good connectivity, reinstall manually via the official installer"],"exampleFix":"// before: update fails behind a dead proxy\nexport HTTPS_PROXY=http://127.0.0.1:9999 omp update\n// after: point at a reachable proxy or unset\nunset HTTPS_PROXY HTTP_PROXY\nomp update","handlingStrategy":"retry","validationCode":"// quick reachability probe before running the updater\ncurl -sf --max-time 10 https://registry.npmjs.org/oh-my-pi/latest >/dev/null && echo ok || echo registry-unreachable","typeGuard":null,"tryCatchPattern":"try {\n  await runUpdate();\n} catch (err) {\n  if (isTimeoutError(err)) {\n    // exponential backoff, then surface a friendly offline message\n    await Bun.sleep(2000);\n    return retryUpdate(2);\n  }\n  throw err;\n}","preventionTips":["Ensure stable connectivity or a working proxy before updating","Run updates on a network that can reach registry.npmjs.org","Keep the default timeout generous; don't shrink it on slow links","Check for captive portals on hotel/conference Wi-Fi before updating"],"tags":["network","timeout","npm-registry","updater"],"backgroundTag":"request-timeout","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}