I have python project, that launches chrome instance with –remote-debugging-port argument and connecting to it using playwright library.
url = "http://localhost:9222/json/version"
subprocess.Popen([CHROME_PATH, f"--remote-debugging-port=9222, url])
websocket_url = get_websocket_debugger_url(url)
with sync_playwright() as p:
browser = p.chromium.connect_over_cdp(websocket_url)
It worked fine on Windows 11, but recently I switched to Debian 12, and it’s not working.
Chrome instance is launching, but http://localhost:9222/json/version giving ERR_CONNECTION_REFUSED.
I tried to run /opt/google/chrome/google-chrome --remote-debugging-port=9222
from terminal with and without --no-sandbox
argument but result is the same.
It’s kinda working only if run the above command with sudo
I tried to use firefox instead but still got the same issue