diegosouzapw/OmniRoute · error · Error

ChatGPT browser credentials are missing

Error message

ChatGPT browser credentials are missing

What it means

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.

Solutions

  1. Save a ChatGPT session cookie or storageState on the connection
  2. Complete the browser verification flow, which stores both the state file and the marker
  3. Recreate the connection if its credential fields were wiped
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at open-sse/executors/chatgpt-web-codex/storageState.ts:151 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/e082538e8cafbda5. Report an issue: GitHub.

Appendix: source

Thrown at open-sse/executors/chatgpt-web-codex/storageState.ts:151

        }
      } catch {
        // Rebuild the protected local working copy below.
      }
    }
    atomicWriteFile(paths.storageStatePath, `${JSON.stringify(credential.storageState)}\n`);
    atomicWriteFile(
      markerPath,
      `${JSON.stringify({
        version: 1,
        authenticated: true,
        verifiedAt: new Date().toISOString(),
        storageStateFingerprint: fingerprint,
        pendingBrowserVerification: false,
      })}\n`
    );
    return paths.storageStatePath;
  }
  if (!credential.cookie) throw new Error("ChatGPT browser credentials are missing");
  return ensureConnectionStorageState(connectionId, credential.cookie);
}

export function finalizeValidatedChatGptWebCodexSecrets(
  encodedCredential: string,
  validationId: string
): { encodedCredential: string; storageState: Record<string, unknown> } {
  const parsed = JSON.parse(encodedCredential) as Record<string, unknown>;
  const rawCookie = typeof parsed.cookie === "string" ? cookieHeaderValue(parsed.cookie) : "";
  if (!rawCookie) throw new Error("A fresh ChatGPT Cookie is required for browser validation");
  if (!/^validation-[a-f0-9]{24}$/.test(validationId)) {
    throw new Error("ChatGPT browser validation reference is invalid");
  }
  const paths = connectionRuntimePaths(validationId);
  const markerPath = loginVerificationMarkerPath(paths.storageStatePath);
  const marker = JSON.parse(readFileSync(markerPath, "utf8")) as Record<string, unknown>;
  if (
    marker.version !== 1 ||

View on GitHub (pinned to a179ffed5b)