{"record":{"id":"fc473523eef4ec21","repo":"diegosouzapw/OmniRoute","slug":"tunnel-download-failed-response-status","errorCode":null,"errorMessage":"Tunnel download failed (${response.status})","messagePattern":"Tunnel download failed \\((.+?)\\)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/chatgpt-web-codex/tunnelClient.ts","lineNumber":88,"sourceCode":"  }\n  return `tunnel-client-v${CHATGPT_WEB_CODEX_TUNNEL_VERSION}-${os}-${cpu}.zip`;\n}\n\nexport function parseTunnelChecksum(text: string, asset: string): string {\n  const entry = text\n    .split(/\\r?\\n/)\n    .map((line) => line.trim())\n    .find((line) => line.endsWith(asset));\n  const checksum = entry?.split(/\\s+/)[0]?.toLowerCase();\n  if (!checksum || !/^[a-f0-9]{64}$/.test(checksum)) {\n    throw new Error(`SHA256SUMS.txt has no valid entry for ${asset}`);\n  }\n  return checksum;\n}\n\nasync function download(url: string): Promise<Uint8Array> {\n  const response = await fetch(url, { redirect: \"follow\" });\n  if (!response.ok) throw new Error(`Tunnel download failed (${response.status})`);\n  const declared = Number(response.headers.get(\"content-length\") || \"0\");\n  if (Number.isFinite(declared) && declared > MAX_DOWNLOAD_BYTES) {\n    throw new Error(\"Tunnel download exceeds the size limit\");\n  }\n  const bytes = new Uint8Array(await response.arrayBuffer());\n  if (bytes.byteLength > MAX_DOWNLOAD_BYTES) {\n    throw new Error(\"Tunnel download exceeds the size limit\");\n  }\n  return bytes;\n}\n\nexport function tunnelClientPaths() {\n  const root = join(getConfigDir(), \"tunnel-client\");\n  return {\n    root,\n    binary: join(root, process.platform === \"win32\" ? \"tunnel-client.exe\" : \"tunnel-client\"),\n    manifest: join(root, \"manifest.json\"),\n    profileDir: join(root, \"profiles\"),","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/chatgpt-web-codex/tunnelClient.ts#L70-L106","documentation":"Error \"Tunnel download failed (${response.status})\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/chatgpt-web-codex/tunnelClient.ts:88 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":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}