{"record":{"id":"737f2f38135740d9","repo":"diegosouzapw/OmniRoute","slug":"encrypted-chatgpt-browser-storage-state-is-invalid","errorCode":null,"errorMessage":"Encrypted ChatGPT browser storage state is invalid","messagePattern":"Encrypted ChatGPT browser storage state is invalid","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/chatgpt-web-codex/storageState.ts","lineNumber":118,"sourceCode":"    markerPath,\n    `${JSON.stringify({\n      version: 1,\n      authenticated: true,\n      verifiedAt: new Date().toISOString(),\n      cookieFingerprint: fingerprint,\n      pendingBrowserVerification: true,\n    })}\\n`\n  );\n  return paths.storageStatePath;\n}\n\nexport function ensureConnectionStorageStateFromCredential(\n  connectionId: string,\n  credential: { cookie?: string; storageState?: Record<string, unknown> }\n): string {\n  if (credential.storageState) {\n    if (!validStorageState(credential.storageState)) {\n      throw new Error(\"Encrypted ChatGPT browser storage state is invalid\");\n    }\n    const paths = connectionRuntimePaths(connectionId);\n    const markerPath = loginVerificationMarkerPath(paths.storageStatePath);\n    const fingerprint = stateFingerprint(credential.storageState);\n    if (existsSync(paths.storageStatePath) && existsSync(markerPath)) {\n      try {\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.storageStateFingerprint === fingerprint\n        ) {\n          return paths.storageStatePath;\n        }\n      } catch {\n        // Rebuild the protected local working copy below.\n      }","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/chatgpt-web-codex/storageState.ts#L100-L136","documentation":"Error \"Encrypted ChatGPT browser storage state is invalid\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/chatgpt-web-codex/storageState.ts:118 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"}