musistudio/claude-code-router · error · Error

Chrome login import job was not found: ${jobId}

Error message

Chrome login import job was not found: ${jobId}

What it means

Thrown by the browser_chrome_login_import_status MCP tool when chromeLoginImportService.getJob(jobId) returns nothing — the supplied job id does not correspond to any tracked Chrome login import job. Jobs are held in an in-memory service keyed by the id returned when the import was started.

Source

Thrown at packages/electron/src/main/browser-automation-mcp.ts:1005

        const domains = resolveChromeLoginImportDomains(args, session?.ref.tabId);
        const job = await chromeLoginImportService.createJob({
          domains,
          openConfirmationPage: args.openConfirmationPage !== false,
          target: readString(args.target) === "browser-and-web-search" ? "browser-and-web-search" : "browser"
        });
        return {
          humanHelpRequired: true,
          job,
          nextAction: "user_confirm_chrome_import",
          state: browserWindowState(),
          summary: `Opened Chrome login import confirmation for ${job.domains.join(", ")}.`
        };
      }
      case "browser_chrome_login_import_status": {
        const jobId = requiredString(args.jobId, "browser_chrome_login_import_status requires jobId.");
        const job = chromeLoginImportService.getJob(jobId);
        if (!job) {
          throw new Error(`Chrome login import job was not found: ${jobId}`);
        }
        return { job };
      }
      case "browser_open": {
        const state = await this.ensureBrowserVisible();
        const url = readString(args.url);
        return url ? await builtInBrowserService.navigateAutomationTab(url, state.activeTabId) : builtInBrowserService.getAutomationState();
      }
      case "browser_tabs":
        await this.ensureBrowserOpen();
        return builtInBrowserService.getAutomationState();
      case "browser_tab_new": {
        await this.ensureBrowserOpen();
        const tab = builtInBrowserService.createAutomationTab(readString(args.url) || undefined);
        return { state: builtInBrowserService.getAutomationState(), tab };
      }
      case "browser_snapshot":
        await this.ensureBrowserOpen();

View on GitHub (pinned to 99f24806c6)

Solutions

  1. Use the exact jobId returned by the browser_chrome_login_import tool response.
  2. Poll status promptly while the import runs rather than long after completion.
  3. If the app restarted, restart the import to obtain a fresh jobId instead of reusing a stale one.

Example fix

// before
const { jobId } = await call("browser_chrome_login_import", { domains: ["example.com"] });
// ... app restarts ...
await call("browser_chrome_login_import_status", { jobId });

// after
const { jobId } = await call("browser_chrome_login_import", { domains: ["example.com"] });
await call("browser_chrome_login_import_status", { jobId }); // same app lifetime
Defensive patterns

Strategy: try-catch

Validate before calling

if (!activeJobIds.has(jobId)) throw new Error(`jobId ${jobId} is not tracked locally — restart import`);
await call("browser_chrome_login_import_status", { jobId });

Try / catch

try { const { job } = await call("browser_chrome_login_import_status", { jobId }); } catch (e) { if (e instanceof Error && e.message.includes("job was not found")) { const started = await call("browser_chrome_login_import", { domains }); /* use started.jobId */ } else throw e; }

Prevention

When it happens

Trigger: Calling browser_chrome_login_import_status with a jobId that was never issued, was typo'd, or belongs to a job whose entry was cleared (e.g. after completion cleanup or app restart).

Common situations: Polling a job id across an app restart (the in-memory registry is lost); using a jobId from a different session; the job finished and was evicted before the status call.

Related errors


AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27). Data as JSON: /api/errors/862bf095bb71153e. Report an issue: GitHub.