Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Own chrome browser not running #300

Open
William-67 opened this issue Feb 15, 2025 · 10 comments
Open

Own chrome browser not running #300

William-67 opened this issue Feb 15, 2025 · 10 comments

Comments

@William-67
Copy link

I try using my own browser, I set this up in my .env file:

CHROME_PATH="C:\Program Files\Google\Chrome\Application\chrome.exe"
CHROME_USER_DATA="C:\Users\YourUsername\AppData\Local\Google\Chrome\User Data"

It open my chrome, but after then not running task at all, and no error occurred, just stuck in there.

I assume it may be due to multiple profile I have so I deleted all others but with main profile, but it still not working.

@shaowin16
Copy link

me too!

@warmshao
Copy link
Collaborator

Set CHROME_USER_DATA empty, try again

@shaowin16
Copy link

shaowin16 commented Feb 16, 2025

Set CHROME_USER_DATA empty, try again

Now CHROME_USER_DATA is empty, an error occurs after running:

[src.browser.custom_browser] Failed to start a new Chrome instance.: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222
Call log:
  - <ws preparing> retrieving websocket url from http://localhost:9222

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.
WARNING  [src.agent.custom_agent] No history to create GIF from

and Chrome is closed.

@William-67
Copy link
Author

Not working as well, the chrome do nothing and about a minute later it open the default one without my data and credentials.

@William-67 William-67 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2025
@William-67 William-67 reopened this Feb 16, 2025
@William-67
Copy link
Author

Not working as well, it open my browser and not processing, then after a minute it open the default one and do the task, the one without my data

@warmshao
Copy link
Collaborator

Check if there is a process occupying port 9222. If you are using Windows, enter the following command in the terminal: netstat -aon|findstr 9222. Then, run taskkill /f /pid {pid of 9222}.

@imlastrebor
Copy link

imlastrebor commented Feb 17, 2025

For me using own browser was working yesterday and today morning perfectly. But suddenly this error started to appear:

INFO     [src.agent.custom_agent] 
📍 Step 1
ERROR    [browser] Failed to update state: Page.screenshot: Protocol error (Page.captureScreenshot): Cannot take screenshot with 0 width.
Call log:
  - taking page screenshot
  -     - disabled all CSS animations
  -   - waiting for fonts to load...
  -   - fonts loaded

ERROR    [agent] ❌ Result failed 3/3 times:
 Page.screenshot: Protocol error (Page.captureScreenshot): Cannot take screenshot with 0 width.
Call log:
  - taking page screenshot
  -     - disabled all CSS animations
  -   - waiting for fonts to load...
  -   - fonts loaded

ERROR    [agent] ❌ Stopping due to 3 consecutive failures
WARNING  [src.agent.custom_agent] No history to create GIF from

I tried to install project again but it's still occurring. Chrome opens up but nothing else happens.

@alexisCode50
Copy link

I have a same error, last week works fine, but today not working:

INFO [browser_use] BrowserUse logging setup complete with level info
INFO [root] Anonymized telemetry enabled. See https://github.com/browser-use/browser-use for more information.
INFO [agent] 🚀 Starting task: Search for Tour Agencies
INFO [agent]
📍 Step 1
ERROR [browser] Failed to start a new Chrome instance.: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222
Call log:

WARNING [browser] Page load failed, continuing...
ERROR [browser] Failed to start a new Chrome instance.: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222
Call log:

ERROR [agent] ❌ Result failed 1/3 times:
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.
INFO [agent]

@faizan-official
Copy link

Did anyone find the solution for this issue?

@atlasgp1
Copy link

In case it helps anyone (in windows), I created a .bat file, like so:
@echo off
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Profile 16" %*

And then set my path to
CHROME_PATH=C:\Users\user\web-ui\my-chrome.bat

This way I'm able to have it load the exact profile I want to load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants