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

chromedriver wont launch #3432

Closed
1 task done
bjm88 opened this issue Apr 27, 2023 · 30 comments
Closed
1 task done

chromedriver wont launch #3432

bjm88 opened this issue Apr 27, 2023 · 30 comments

Comments

@bjm88
Copy link

bjm88 commented Apr 27, 2023

⚠️ Search for existing issues first ⚠️

  • I have searched the existing issues, and there is no existing issue for my problem

Which Operating System are you using?

Docker

Which version of Auto-GPT are you using?

Stable (branch)

GPT-3 or GPT-4?

GPT-4

Steps to reproduce 🕹

On macbook pro latest download docker and download autoGPT following docker setup instructions. Generally runs and works, but the web searches using chrome driver always fail...

SYSTEM: Command browse_website returned: Error: Message: unknown error: Chrome failed to start: exited abnormally. (chrome not reachable) (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace: #0 0x0040006e6fe3 #1 0x004000425d36 #2 0x00400044eb20 #3 0x00400044aa9b #4 0x00400048caf7 #5 0x00400048c11f #6 0x004000483693 #7 0x00400045603a #8 0x00400045717e #9 0x0040006a8dbd #10 0x0040006acc6c #11 0x0040006b64b0 #12 0x0040006add63 #13 0x004000680c35 #14 0x0040006d1138 #15 0x0040006d12c7 #16 0x0040006df093 #17 0x004002585ea7 start_thread
THOUGHTS: I will use the 'google' command to search for articles

I installed chromedriver locally for good measure, but pretty sure it would be using the local one inside the docker containers, so not expecting this would be an issue. It seems to fall back to some google api search, but it slows things down and I assume limits how well it can search the web ?

Current behavior 😯

chrome search commands fail

Expected behavior 🤔

chrome web searches work

Your prompt 📝

# Paste your prompt here

I just run auto-gpt and give it an AI context and goals...like search and monitor for healthcare tech news...

Your Logs 📒

SYSTEM:  Command browse_website returned: Error: Message: unknown error: Chrome failed to start: exited abnormally. (chrome not reachable) (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace: #0 0x0040006e6fe3 <unknown> #1 0x004000425d36 <unknown> #2 0x00400044eb20 <unknown> #3 0x00400044aa9b <unknown> #4 0x00400048caf7 <unknown> #5 0x00400048c11f <unknown> #6 0x004000483693 <unknown> #7 0x00400045603a <unknown> #8 0x00400045717e <unknown> #9 0x0040006a8dbd <unknown> #10 0x0040006acc6c <unknown> #11 0x0040006b64b0 <unknown> #12 0x0040006add63 <unknown> #13 0x004000680c35 <unknown> #14 0x0040006d1138 <unknown> #15 0x0040006d12c7 <unknown> #16 0x0040006df093 <unknown> #17 0x004002585ea7 start_thread
 THOUGHTS:  I will use the 'google' command to search for articles
@bjm88
Copy link
Author

bjm88 commented Apr 27, 2023

I did search and find this issue, but it was closed, so I assume this is different...
#1788

@RuvenBeck
Copy link

try to download chrome with pip install chromedriver

@wafflemakr
Copy link

Same here. Just downloaded the stable release and getting exact same error. Running on Macbook Pro

@unmotivatedgene
Copy link

@bjm88 I did pip install chromedriver and then also had to open the google chrome browser once. It had been a long time since I had used it. Now the browse_website action works. Not sure if I just needed to open chrome or if the pip install was also needed.

@bjm88
Copy link
Author

bjm88 commented Apr 27, 2023

I did brew install cast chromedriver and then had to auth it with apples controls but it runs on cmd line

chromedriver --version

Still same.issue though in AutoGPT. I'm confused on if it's issue with my MacBook or issue inside docker container that chronedriver not setup in that image properly....

@wafflemakr
Copy link

@bjm88 I did pip install chromedriver and then also had to open the google chrome browser once. It had been a long time since I had used it. Now the browse_website action works. Not sure if I just needed to open chrome or if the pip install was also needed.

Are you on mac too?

@bjm88
Copy link
Author

bjm88 commented Apr 28, 2023

@bjm88 I did pip install chromedriver and then also had to open the google chrome browser once. It had been a long time since I had used it. Now the browse_website action works. Not sure if I just needed to open chrome or if the pip install was also needed.

Are you on mac too?

Yes MacBook Pro Apple M1 chip, Ventura 13.1

@unmotivatedgene
Copy link

I am on windows, I missed that you are running in docker, i am not. Did you do the pip install from within the container?

@bjm88
Copy link
Author

bjm88 commented Apr 28, 2023

No, I dont know how to add to the container as is. I thought the point of the docker option is it has everything it needs setup already, I suspect if others seeing this issue its problem with the container setup. Perhaps the docker container calls out to the main host OS for this function, but I'd doubt it...

@qhoarau
Copy link

qhoarau commented Apr 28, 2023

Same error here. I'm running it in docker

@aunitt
Copy link

aunitt commented Apr 28, 2023

I've tried logging into the running docker container and ruining:
pip install chromedriver
and still get the same error

@wafflemakr
Copy link

I tried cloning repo and running it from there. I dont get the Chrome failed to start: exited abnormally. error, but a different one, saying that exited with Error 255. Also tried with firefox and safari, no luck.

@aunitt
Copy link

aunitt commented Apr 28, 2023

I'm running on Mac too. Docker image on MacBook Pro Apple M1 chip, Ventura 13.2.1
Running the vscode devcontainer version doesn't give me any problems.

@flecchi
Copy link

flecchi commented May 1, 2023

I've got the same issue :

  • Using Docker : Docker version 20.10.24, build 297e128
  • Using docker-compose : Docker Compose version v2.17.2
  • Docker Images : auto-gpt-auto-gpt (f83db2b6b711)
  • Command : browse_website
  • Arguments : {'url': 'https://www.sciencedirect.com/science/article/pii/S0167404821003126', 'question': 'mathematical explanation behind k-anonymity algorithm'}
  • Result : Command browse_website returned: Error: Message: Service /home/appuser/.wdm/drivers/chromedriver/linux64/112.0.5615.49/chromedriver unexpectedly exited. Status code was: 255

@caudurodev
Copy link

Installing in the docker image

apt-get install -y libglib2.0 libnss3 libgconf-2-4 libfontconfig1 chromium-driver

fixes the issue for me.

@Firunner757
Copy link

Getting the same issue on Windows. I have installed Docker. I'm getting this in the CLI

"SYSTEM: Command browse_website returned: Error: Message: unknown error: Chrome failed to start: exited abnormally. (chrome not reachable) (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace: #0 0x560928657fe3 #1 0x560928396d36 #2 0x5609283bfb20 #3 0x5609283bba9b #4 0x5609283fdaf7 #5 0x5609283fd11f #6 0x5609283f4693 #7 0x5609283c703a #8 0x5609283c817e #9 0x560928619dbd #10 0x56092861dc6c #11 0x5609286274b0 #12 0x56092861ed63 #13 0x5609285f1c35 #14 0x560928642138 #15 0x5609286422c7 #16 0x560928650093 #17 0x7f9445a30ea7 start_thread"

Any idea how to fix it?

@Firunner757
Copy link

I even ask it to fix itself but it didn't work.
image

@TylerBarnes
Copy link

The steps above from @caudurodev worked for me. For those who are still having issues:

  1. download latest stable code
  2. Edit Dockerfile and change the browser code to this:
# Install browsers
RUN apt-get update && apt-get install -y \
    chromium-driver firefox-esr \
    ca-certificates \
    libglib2.0 libnss3 libgconf-2-4 libfontconfig1
  1. Build docker by cding into the directory where your Dockerfile is and running docker-compose build auto-gpt
  2. Run docker-compose run --rm auto-gpt and it should work

@pryadchenko
Copy link

It fails on MAC with M1 chip.

BTW, use of firefox helped.

@TylerBarnes
Copy link

@pryadchenko it's working on an M2 mac for me with the instructions above

@anonhostpi
Copy link

As someone who works on chromedriver metrics, chromedriver failing to install on certain arch/systems doesn't surprise me.

Google/Chromium have a tendency to offer poor support for automating Chrome/chromedriver downloads, and when they do its frequently inconsistent with prior Chrome/Chromium/Chromedriver builds.

@Firunner757
Copy link

Any solution for Windows users?

@vinay-mehta
Copy link

This is how issue fixed for me
1.Loging to docker container as root using the following commands
-sudo docker exec --user="root" -it /bin/bash
2. Update the existing chromium version inside the
dockercontainer using the following
-apt update
-apt install chromium-browser

@jdewind
Copy link

jdewind commented May 6, 2023

The chromium driver installs just fine, but it compiles for the mac CPU architecture and it tries to execute it from the wrong directory.

@BrianAndersen78
Copy link

BrianAndersen78 commented May 15, 2023

TylerBarnes solution works on M1 - thanks mate...

@yuvaldream
Copy link

This doenst work for me. Did you add something special to .env file? or is it just openai token?

@yuvaldream
Copy link

it also fail on list _files command:

SYSTEM: Command list_files returned: Error: list_files() got an unexpected keyword argument 'extension'

@FedericoCapaldo
Copy link

This is what I did to solve it based on @caudurodev answer:

  1. run your docker container of auto gpt:
docker-compose run --rm auto-gpt
  1. find your docker container ID for auto gpt with:
docker ps
  1. log in from another terminal into it
docker exec -it [your docker container ID which you will find with docker ps] /bin/bash
  1. Install the necessary packages which seem to be missing:
apt-get install -y libglib2.0 libnss3 libgconf-2-4 libfontconfig1 chromium-driver
  1. Lastly stop your docker container and restart it
docker-compose run --rm auto-gpt

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.

@github-actions github-actions bot added the Stale label Sep 6, 2023
@github-actions
Copy link

This issue was closed automatically because it has been stale for 10 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests