diegosouzapw/OmniRoute · error · Error

Browser-login session is not running

Error message

Browser-login session is not running (${session.status})

What it means

State guard in harvestSession: the session exists but its status is not 'running' (e.g. 'starting', 'harvesting', 'stopping', 'error'); the actual status is embedded. Means credential harvest was requested against a session that hasn't finished booting, is mid-harvest, or is tearing down — the browser container is not in a stable state to read cookies from.

Solutions

  1. Wait until the session reports status 'running' (CDP readiness) and retry the harvest
  2. Do not double-harvest: a session already in 'harvesting' will return to 'running' in its finally block
  3. Restart the session if it is stuck in 'starting' or 'error'
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/lib/vncSession/service.ts:267 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/7caa816ab73a6a2b. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/vncSession/service.ts:267

  }
}

export function markViewerActive(connectionId: string, sessionId: string): void {
  const session = getSession(connectionId, sessionId);
  if (session) session.lastViewerAt = Date.now();
}

export async function harvestSession(
  connectionId: string,
  sessionId: string
): Promise<HarvestSessionResult> {
  if (await isConnectionUnavailableToAuxiliaryActivity(connectionId))
    throw new Error("Browser login is unavailable for managed lease connections");

  const session = getSession(connectionId, sessionId);
  if (!session) throw new Error("Browser-login session not found");
  if (session.status !== "running") {
    throw new Error(`Browser-login session is not running (${session.status})`);
  }

  const provider = getVncProvider(session.providerId);
  if (!provider) throw new Error("Provider is no longer supported for browser login");

  session.status = "harvesting";
  try {
    const harvest = await harvestFromContainer(
      session.cdpPort,
      provider,
      VNC_CONFIG.harvestTimeoutMs
    );
    session.lastHarvestAt = Date.now();
    if (!harvest.hasCredential) {
      return {
        harvested: false,
        sessionId,
        connectionId,

View on GitHub (pinned to a179ffed5b)