{"record":{"id":"d8a68b793179bad0","repo":"n8n-io/n8n","slug":"no-executable-path-for-browser","errorCode":null,"errorMessage":"No executable path for ${browser}","messagePattern":"No executable path for (.+?)","errorType":"exception","errorClass":"BrowserExecutableNotFoundError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/mcp-browser/src/adapters/agent-browser.ts","lineNumber":184,"sourceCode":"\t\t\t\ttimeout: 5_000,\n\t\t\t});\n\t\t} catch {\n\t\t\t// no existing session — that's fine\n\t\t}\n\t}\n\n\t// =========================================================================\n\t// Lifecycle\n\t// =========================================================================\n\n\tasync launch(config: ConnectConfig): Promise<void> {\n\t\tlog.debug('launch: killing stale session');\n\t\tawait this.killSession();\n\t\tlog.debug('launch: stale session killed');\n\n\t\tconst browserInfo = this.resolvedConfig.browsers.get(config.browser);\n\t\tconst chromePath = browserInfo?.executablePath;\n\t\tif (!chromePath) throw new BrowserExecutableNotFoundError(config.browser);\n\t\tlog.debug('launch: browser executable:', chromePath);\n\n\t\tif (!this.relay) {\n\t\t\tthis.relay = new CDPRelayServer();\n\t\t\tthis.relayPort = await this.relay.listen();\n\t\t\tlog.debug('launch: relay listening on port', this.relayPort);\n\t\t} else {\n\t\t\tlog.debug('launch: reusing existing relay on port', this.relayPort);\n\t\t}\n\n\t\tif (!this.relay.isExtensionConnected()) {\n\t\t\tconst extensionEndpoint = this.relay.extensionEndpoint(this.relayPort);\n\t\t\t// `N8N_EVAL_AUTO_BROWSER_CONNECT=1` mirrors the playwright adapter — see\n\t\t\t// `playwright.ts` for the full justification. The extension only honors\n\t\t\t// the flag when the relay URL is localhost, which it always is here.\n\t\t\tconst autoConnect = process.env.N8N_EVAL_AUTO_BROWSER_CONNECT === '1';\n\t\t\tconst connectUrl =\n\t\t\t\t`chrome-extension://${BROWSER_USE_EXTENSION_ID}/connect.html` +","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/mcp-browser/src/adapters/agent-browser.ts#L166-L202","documentation":"Thrown as BrowserExecutableNotFoundError by AgentBrowserAdapter.launch when the resolved config has a browser entry for config.browser but its executablePath is undefined/empty. BrowserExecutableNotFoundError extends McpBrowserError and carries a hint telling the user to verify the browser is installed or provide an explicit executablePath. The message interpolates the browser name.","triggerScenarios":"Calling adapter.launch(config) where resolvedConfig.browsers.get(config.browser) returns an object with no executablePath, or returns undefined (so browserInfo?.executablePath is undefined). The browser was either not detected at all or detected without resolving a binary path.","commonSituations":"Chrome/Chromium/Brave/Edge was uninstalled after the config was built; the browser detection ran in a different environment (Docker vs host) and the path is stale; the browser is installed but not in a standard location the detector scans; config.browser names a browser that isn't in the resolved browsers map.","solutions":["Provide an explicit executablePath in the browser config for the browser you are selecting.","Re-run browser detection so the config reflects currently-installed browsers.","Verify the browser is actually installed: run the binary path from a shell.","If config.browser is wrong, pass the name of a browser that IS in resolvedConfig.browsers."],"exampleFix":"// before — relying on auto-detection that returned no path\nawait adapter.launch({ browser: 'chrome' });\n\n// after — set executablePath explicitly\nconst config = buildConfig({\n  browsers: { chrome: { executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' } },\n});\nawait adapter.launch({ browser: 'chrome' });","handlingStrategy":"validation","validationCode":"function hasExecutablePath(config: ResolvedConfig, browser: string): boolean {\n  return !!config.browsers.get(browser)?.executablePath;\n}","typeGuard":"function isBrowserExecutableAvailable(config: ResolvedConfig, browser: string): boolean {\n  return Boolean(config.browsers.get(browser)?.executablePath);\n}","tryCatchPattern":null,"preventionTips":["Set an explicit executablePath for the browser in config rather than relying on detection.","Re-run browser detection after install/uninstall changes.","Verify the binary path is executable by the gateway user before launch."],"tags":["mcp-browser","agent-browser","browser-launch","configuration"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}