diegosouzapw/OmniRoute · error · Error
Encrypted ChatGPT browser storage state is invalid
Error message
Encrypted ChatGPT browser storage state is invalid
What it means
Shape guard in ensureConnectionStorageStateFromCredential: the connection's stored storageState (decrypted credential payload) fails the validStorageState check — missing or non-array 'cookies'/'origins'. The input at fault is the encrypted credential's storageState object, which was saved in a malformed or foreign format.
Solutions
- Re-verify the browser session so a well-formed storageState is stored on the connection
- Replace the credential with a fresh cookie and let OmniRoute derive the storage state
- If hand-importing a storageState, ensure it is a Playwright-format object with cookies[] and origins[]
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at open-sse/executors/chatgpt-web-codex/storageState.ts:118 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/737f2f38135740d9.
Report an issue: GitHub.
Appendix: source
Thrown at open-sse/executors/chatgpt-web-codex/storageState.ts:118
markerPath,
`${JSON.stringify({
version: 1,
authenticated: true,
verifiedAt: new Date().toISOString(),
cookieFingerprint: fingerprint,
pendingBrowserVerification: true,
})}\n`
);
return paths.storageStatePath;
}
export function ensureConnectionStorageStateFromCredential(
connectionId: string,
credential: { cookie?: string; storageState?: Record<string, unknown> }
): string {
if (credential.storageState) {
if (!validStorageState(credential.storageState)) {
throw new Error("Encrypted ChatGPT browser storage state is invalid");
}
const paths = connectionRuntimePaths(connectionId);
const markerPath = loginVerificationMarkerPath(paths.storageStatePath);
const fingerprint = stateFingerprint(credential.storageState);
if (existsSync(paths.storageStatePath) && existsSync(markerPath)) {
try {
const marker = JSON.parse(readFileSync(markerPath, "utf8")) as Record<string, unknown>;
if (
marker.version === 1 &&
marker.authenticated === true &&
marker.pendingBrowserVerification !== true &&
marker.storageStateFingerprint === fingerprint
) {
return paths.storageStatePath;
}
} catch {
// Rebuild the protected local working copy below.
}View on GitHub (pinned to a179ffed5b)