diegosouzapw/OmniRoute · error · Error

Browser-login session not found

Error message

Browser-login session not found

What it means

Lookup failure in harvestSession: getSession(connectionId, sessionId) found no live entry in the in-memory SESSIONS map. Means the session already ended (stopSession removes it from the map), was swept by the idle reaper, or the sessionId is wrong/stale — harvesting an unknown or finished browser-login session is not possible.

Solutions

  1. Start a new browser-login session and harvest that one
  2. Refresh the UI — the session list may be stale after a stop or idle sweep
  3. Verify the sessionId matches an entry returned by the sessions API
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

    cleanupProfile(state);
    throw new Error(`Failed to start browser login for connection ${connectionId}: ${state.error}`);
  }
}

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,

View on GitHub (pinned to a179ffed5b)