{"record":{"id":"e082538e8cafbda5","repo":"diegosouzapw/OmniRoute","slug":"chatgpt-browser-credentials-are-missing","errorCode":null,"errorMessage":"ChatGPT browser credentials are missing","messagePattern":"ChatGPT browser credentials are missing","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/chatgpt-web-codex/storageState.ts","lineNumber":151,"sourceCode":"        }\n      } catch {\n        // Rebuild the protected local working copy below.\n      }\n    }\n    atomicWriteFile(paths.storageStatePath, `${JSON.stringify(credential.storageState)}\\n`);\n    atomicWriteFile(\n      markerPath,\n      `${JSON.stringify({\n        version: 1,\n        authenticated: true,\n        verifiedAt: new Date().toISOString(),\n        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 ||","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/chatgpt-web-codex/storageState.ts#L133-L169","documentation":"Final guard in ensureConnectionStorageStateFromCredential: the credential has neither a storageState nor a cookie string, so there is no material to write a browser working copy from. The connection record is effectively credential-less for the browser flow.","triggerScenarios":"Thrown at open-sse/executors/chatgpt-web-codex/storageState.ts:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Save a ChatGPT session cookie or storageState on the connection","Complete the browser verification flow, which stores both the state file and the marker","Recreate the connection if its credential fields were wiped"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}