diegosouzapw/OmniRoute · error · Error

ChatGPT browser validation does not match the supplied…

Error message

ChatGPT browser validation does not match the supplied Cookie

What it means

Consistency guard in finalizeValidatedChatGptWebCodexSecrets: the fingerprint of the cookie in the finalize payload does not match the cookieFingerprint recorded in the validation's marker file. A different cookie was supplied at finalization than at validation start, so the verified state does not belong to this credential.

Solutions

  1. Finalize with the exact same cookie used to start the browser validation
  2. If the cookie was rotated mid-flow, restart validation with the new cookie
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

  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 ||
    marker.authenticated !== true ||
    marker.pendingBrowserVerification === true ||
    marker.cookieFingerprint !== cookieFingerprint(rawCookie)
  ) {
    throw new Error("ChatGPT browser validation does not match the supplied Cookie");
  }
  const storageState = readConnectionStorageState(paths.storageStatePath);
  const runtimeKey = typeof parsed.runtimeKey === "string" ? parsed.runtimeKey.trim() : "";
  const next = JSON.stringify({
    version: 2,
    storageState,
    ...(runtimeKey ? { runtimeKey } : {}),
  });
  rmSync(paths.root, { recursive: true, force: true });
  return { encodedCredential: next, storageState };
}

View on GitHub (pinned to a179ffed5b)