{"record":{"id":"bf8106d1121dc1fb","repo":"diegosouzapw/OmniRoute","slug":"tunnel-download-exceeds-the-size-limit","errorCode":null,"errorMessage":"Tunnel download exceeds the size limit","messagePattern":"Tunnel download exceeds the size limit","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/chatgpt-web-codex/tunnelClient.ts","lineNumber":91,"sourceCode":"\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\"),\n    supervisorLease: join(root, \"supervisor-lease.json\"),\n  };\n}","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/chatgpt-web-codex/tunnelClient.ts#L73-L109","documentation":"Error \"Tunnel download exceeds the size limit\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/chatgpt-web-codex/tunnelClient.ts:91 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"}