# Cannot connect to existing browser

**URL:** https://forum.robotframework.org/t/cannot-connect-to-existing-browser/7807
**Category:** SeleniumLibrary
**Created:** [15 September 2024 14:12 UTC](https://forum.robotframework.org/t/cannot-connect-to-existing-browser/7807 "2024-09-15T14:12:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![opadfnezig](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/opadfnezig/32/4236_2.png) [@opadfnezig](https://forum.robotframework.org/u/opadfnezig)
#### Post date: [15 September 2024 14:12 UTC](https://forum.robotframework.org/t/cannot-connect-to-existing-browser/7807/1 "2024-09-15T14:12:30Z")

</div>

Trying to do this [How to use an already running (Chrome) browser for your web automation robots - Robocorp Portal](https://robocorp.com/portal/tutorial/how-to-attach-to-running-chrome-browser)

Running exactly same code, exept everything is on linux in cli.

starting chrome

`./chrome --headless --remote-debugging-port=8222 --remote-debugging-address=0.0.0.0 --no-sandbox --disable-gpu --disable-dev-shm-usage`

code

```
***Settings***
Documentation Google using an already open Chrome browser.

Library RPA.Browser.Selenium

***Tasks***
Attach to running Chrome Browser and execute Google search
    Attach Chrome Browser 8222
    Go To https://www.google.com/?hl=en
    Input Text name:q Dinosaur
    Press Keys name:q ENTER

```

output

```
(venv) [user@archlinux robot-client]$ python3.11 -m robot task.robot
2024-09-15 14:00:25,964 - RPA.core.certificates - INFO - Truststore not in use, HTTPS traffic validated against `certifi` package. (requires Python 3.10.12 and 'pip' 23.2.1 at minimum)
==============================================================================
Task :: Google using an already open Chrome browser.
==============================================================================
Attach to running Chrome Browser and execute Google search | FAIL |
WebDriverException: Message: unknown error: cannot connect to chrome at localhost:8222
from unknown error: unable to discover open pages
Stacktrace:
#0 0x555715bbb4e3 <unknown>
#1 0x5557158eac76 <unknown>
#2 0x55571591804a <unknown>
#3 0x55571590f884 <unknown>
#4 0x55571594eccc <unknown>
#5 0x55571594e47f <unknown>
#6 0x555715945de3 <unknown>
#7 0x55571591b2dd <unknown>
#8 0x55571591c34e <unknown>
#9 0x555715b7b3e4 <unknown>
#10 0x555715b7f3d7 <unknown>
#11 0x555715b89b20 <unknown>
#12 0x555715b80023 <unknown>
#13 0x555715b4e1aa <unknown>
#14 0x555715ba46b8 <unknown>
#15 0x555715ba4847 <unknown>
#16 0x555715bb4243 <unknown>
#17 0x7656f8f8c39d <unknown>
#18 0x7656f901149c <unknown>
------------------------------------------------------------------------------
Task :: Google using an already open Chrome browser. | FAIL |
1 task, 0 passed, 1 failed
==============================================================================
Output: /home/user/projects/chrome-remote-connection-test/robot-client/output.xml
Log: /home/user/projects/chrome-remote-connection-test/robot-client/log.html
Report: /home/user/projects/chrome-remote-connection-test/robot-client/report.html

```

seems like I’m missing something, but don’t understand what.  
also I would really like to use puppeteer instaed of selenium but couldn’t find any ways of using it to connect via ws debug port
