[Python] --remote-debugging-port argument problem in Debian 12 resulting in...

Discussão em 'Python' iniciado por Stack, Junho 18, 2025.

  1. Stack

    Stack Membro Participativo

    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. The Chrome instance is launching, but http://localhost:9222/json/version is 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.

    Continue reading...

Compartilhe esta Página