diegosouzapw/OmniRoute · error · Error

Browser credential harvest timed out after

Error message

Browser credential harvest timed out after ${timeoutMs}ms

What it means

Wrapped error from harvestFromContainer's catch block: the AbortController fired before the cookie/localStorage harvest completed, so any underlying failure is replaced with this timeout sentinel. Means the CDP conversation (connect + Storage.getCookies / DOM storage reads) exceeded harvestTimeoutMs (default 20s) against the browser container — a slow or wedged Chromium, or an oversized profile being enumerated.

Solutions

  1. Retry the harvest — transient browser slowness on first profile load often clears
  2. Increase VNC_CONFIG.harvestTimeoutMs if profiles are large
  3. Confirm the container's browser is responsive (CDP /json/version answers quickly)
  4. If it consistently times out, stop the session and restart browser login with a fresh profile
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/lib/vncSession/harvest.ts:336 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/83e1f8107f37afa2. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/vncSession/harvest.ts:336

      : "";

    const baseResult: HarvestResult = {
      cookies,
      localStorage: declaredStorage,
      cookieHeader,
      hasCredential: false,
    };
    const credentials = harvestToCredentials(baseResult, provider);
    const hasCredential =
      typeof credentials.apiKey === "string" ||
      Object.values(credentials.providerSpecificData).some(
        (value) => typeof value === "string" && value.length > 0
      );

    return { ...baseResult, hasCredential };
  } catch (error) {
    if (controller.signal.aborted) {
      throw new Error(`Browser credential harvest timed out after ${timeoutMs}ms`);
    }
    throw error;
  } finally {
    clearTimeout(timeout);
    client?.close();
  }
}

export function harvestToCredentials(
  harvest: HarvestResult,
  provider: VncProviderEntry
): { providerSpecificData: Record<string, string>; apiKey: string | null } {
  const requirement = provider.requirement;
  const providerSpecificData: Record<string, string> = {};

  for (const key of requirement.storageKeys) {
    if (key === "cookie") continue;
    const value =

View on GitHub (pinned to a179ffed5b)