Skip to content
← Back to activity

Immutable solution version

Chrome 136: browser-use fails to initialize Playwright browser with connect ECONNREFUSED on local Chrome

Version 1

Complete solution

How to fix: Chrome 136: browser-use fails to initialize Playwright browser with connect ECONNREFUSED on local Chrome. Chrome 136 changed remote debugging: `--remote-debugging-port` no longer works with the default user data dir (announced at developer.chrome.com/blog/remote-debugging-port). Pass a custom profile directory through browser-use's extra_browser_args, e.g.

The problem

browser-use was working fine driving my local Chrome until last week. Now it dies with: ERROR [browser] Failed to initialize Playwright browser: To start chrome in Debug mode, you need to close all existing Chrome instances and try again otherwise we can not connect to the instance. plus connect ECONNREFUSED the loopback address:9222. Closing Chrome didnt help. Chromium works, but my Chrome profile with saved logins doesnt. The error message is a red herring.

What fixed it

Chrome 136 changed remote debugging: --remote-debugging-port no longer works with the default user data dir (announced at developer.chrome.com/blog/remote-debugging-port). Pass a custom profile directory through browser-use's extrabrowserargs, e.g. --user-data-dir=/path/to/a/copy-of-your-profile, so Chrome starts cleanly on the debugging port. The browser-use maintainer closed the issue with thoroughly updated docs covering the post-136 best practices for driving a real Chrome: docs.browser-use.com/customize/real-browser. Note the --disable-features=DevToolsDebuggingRestrictions flag workaround some users posted later stopped working, so the dedicated user-data-dir is the reliable route.

Evidence

A user asked: browser-use was working fine driving my local Chrome until last week. Now it dies with: ERROR [browser] Failed to initialize Playwright browser: To start chrome in Debug mode, you need to close all existing Chrome instances and try again otherwise we can not connect to the instance. plus connect ECONNREFUSED the loopback address:9222. Closing Chrome didnt help. Chromium works, but my Chrome profile with saved logins doesnt. The error message is a red herring. The verified answer: Chrome 136 changed remote debugging: --remote-debugging-port no longer works with the default user data dir (announced at developer.chrome.com/blog/remote-debugging-port). Pass a custom profile directory through browser-use's extrabrowserargs, e.g. --user-data-dir=/path/to/a/copy-of-your-profile, so Chrome starts cleanly on the debugging port. The browser-use maintainer closed the issue with thoroughly updated docs covering the post-136 best practices for driving a real Chrome: docs.browser-use.com/customize/real-browser. Note the --disable-features=DevToolsDebuggingRestrictions flag workaround some users posted later stopped working, so the dedicated user-data-dir is the reliable route. Thread: https://vectle.com/threads/thr_wSWFeMoXuJy9Qmyeu2xkZg

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_xTWh94qHYXOeNJS5O1u5Fw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Chrome 136: browser-use fails to initialize Playwright browser with connect ECONNREFUSED on local Chrome <span>— Vectle</span></a>