{"record":{"id":"862bf095bb71153e","repo":"musistudio/claude-code-router","slug":"chrome-login-import-job-was-not-found-jobid","errorCode":null,"errorMessage":"Chrome login import job was not found: ${jobId}","messagePattern":"Chrome login import job was not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/electron/src/main/browser-automation-mcp.ts","lineNumber":1005,"sourceCode":"        const domains = resolveChromeLoginImportDomains(args, session?.ref.tabId);\n        const job = await chromeLoginImportService.createJob({\n          domains,\n          openConfirmationPage: args.openConfirmationPage !== false,\n          target: readString(args.target) === \"browser-and-web-search\" ? \"browser-and-web-search\" : \"browser\"\n        });\n        return {\n          humanHelpRequired: true,\n          job,\n          nextAction: \"user_confirm_chrome_import\",\n          state: browserWindowState(),\n          summary: `Opened Chrome login import confirmation for ${job.domains.join(\", \")}.`\n        };\n      }\n      case \"browser_chrome_login_import_status\": {\n        const jobId = requiredString(args.jobId, \"browser_chrome_login_import_status requires jobId.\");\n        const job = chromeLoginImportService.getJob(jobId);\n        if (!job) {\n          throw new Error(`Chrome login import job was not found: ${jobId}`);\n        }\n        return { job };\n      }\n      case \"browser_open\": {\n        const state = await this.ensureBrowserVisible();\n        const url = readString(args.url);\n        return url ? await builtInBrowserService.navigateAutomationTab(url, state.activeTabId) : builtInBrowserService.getAutomationState();\n      }\n      case \"browser_tabs\":\n        await this.ensureBrowserOpen();\n        return builtInBrowserService.getAutomationState();\n      case \"browser_tab_new\": {\n        await this.ensureBrowserOpen();\n        const tab = builtInBrowserService.createAutomationTab(readString(args.url) || undefined);\n        return { state: builtInBrowserService.getAutomationState(), tab };\n      }\n      case \"browser_snapshot\":\n        await this.ensureBrowserOpen();","sourceCodeStart":987,"sourceCodeEnd":1023,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/electron/src/main/browser-automation-mcp.ts#L987-L1023","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Use the exact jobId returned by the browser_chrome_login_import tool response.","Poll status promptly while the import runs rather than long after completion.","If the app restarted, restart the import to obtain a fresh jobId instead of reusing a stale one."],"exampleFix":"// before\nconst { jobId } = await call(\"browser_chrome_login_import\", { domains: [\"example.com\"] });\n// ... app restarts ...\nawait call(\"browser_chrome_login_import_status\", { jobId });\n\n// after\nconst { jobId } = await call(\"browser_chrome_login_import\", { domains: [\"example.com\"] });\nawait call(\"browser_chrome_login_import_status\", { jobId }); // same app lifetime","handlingStrategy":"try-catch","validationCode":"if (!activeJobIds.has(jobId)) throw new Error(`jobId ${jobId} is not tracked locally — restart import`);\nawait call(\"browser_chrome_login_import_status\", { jobId });","typeGuard":null,"tryCatchPattern":"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; }","preventionTips":["Persist jobId immediately when issued","Poll while the import is running","Assume job ids die with app restarts"],"tags":["mcp","browser-automation","job-not-found","import"],"backgroundTag":"job-id-not-found","analyzedSha":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}