{"record":{"id":"4e8e798979ad673d","repo":"diegosouzapw/OmniRoute","slug":"chatgpt-browser-validation-reference-is-invalid","errorCode":null,"errorMessage":"ChatGPT browser validation reference is invalid","messagePattern":"ChatGPT browser validation reference is invalid","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/chatgpt-web-codex/storageState.ts","lineNumber":163,"sourceCode":"        storageStateFingerprint: fingerprint,\n        pendingBrowserVerification: false,\n      })}\\n`\n    );\n    return paths.storageStatePath;\n  }\n  if (!credential.cookie) throw new Error(\"ChatGPT browser credentials are missing\");\n  return ensureConnectionStorageState(connectionId, credential.cookie);\n}\n\nexport function finalizeValidatedChatGptWebCodexSecrets(\n  encodedCredential: string,\n  validationId: string\n): { encodedCredential: string; storageState: Record<string, unknown> } {\n  const parsed = JSON.parse(encodedCredential) as Record<string, unknown>;\n  const rawCookie = typeof parsed.cookie === \"string\" ? cookieHeaderValue(parsed.cookie) : \"\";\n  if (!rawCookie) throw new Error(\"A fresh ChatGPT Cookie is required for browser validation\");\n  if (!/^validation-[a-f0-9]{24}$/.test(validationId)) {\n    throw new Error(\"ChatGPT browser validation reference is invalid\");\n  }\n  const paths = connectionRuntimePaths(validationId);\n  const markerPath = loginVerificationMarkerPath(paths.storageStatePath);\n  const marker = JSON.parse(readFileSync(markerPath, \"utf8\")) as Record<string, unknown>;\n  if (\n    marker.version !== 1 ||\n    marker.authenticated !== true ||\n    marker.pendingBrowserVerification === true ||\n    marker.cookieFingerprint !== cookieFingerprint(rawCookie)\n  ) {\n    throw new Error(\"ChatGPT browser validation does not match the supplied Cookie\");\n  }\n  const storageState = readConnectionStorageState(paths.storageStatePath);\n  const runtimeKey = typeof parsed.runtimeKey === \"string\" ? parsed.runtimeKey.trim() : \"\";\n  const next = JSON.stringify({\n    version: 2,\n    storageState,\n    ...(runtimeKey ? { runtimeKey } : {}),","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/chatgpt-web-codex/storageState.ts#L145-L181","documentation":"Error \"ChatGPT browser validation reference is invalid\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/chatgpt-web-codex/storageState.ts:163 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"}