AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

chromedriver wont launch

Open bjm88 opened this issue 2 years ago • 25 comments

⚠️ Search for existing issues first ⚠️

  • [X] 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 avatar Apr 27 '23 21:04 bjm88

I did search and find this issue, but it was closed, so I assume this is different... https://github.com/Significant-Gravitas/Auto-GPT/issues/1788

bjm88 avatar Apr 27 '23 21:04 bjm88

try to download chrome with pip install chromedriver

RuvenBeck avatar Apr 27 '23 22:04 RuvenBeck

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

wafflemakr avatar Apr 27 '23 22:04 wafflemakr

@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.

unmotivatedgene avatar Apr 27 '23 22:04 unmotivatedgene

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....

bjm88 avatar Apr 27 '23 23:04 bjm88

@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?

wafflemakr avatar Apr 28 '23 00:04 wafflemakr

@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

bjm88 avatar Apr 28 '23 00:04 bjm88

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?

unmotivatedgene avatar Apr 28 '23 00:04 unmotivatedgene

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...

bjm88 avatar Apr 28 '23 00:04 bjm88

Same error here. I'm running it in docker

qhoarau avatar Apr 28 '23 11:04 qhoarau

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

aunitt avatar Apr 28 '23 11:04 aunitt

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.

wafflemakr avatar Apr 28 '23 13:04 wafflemakr

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.

aunitt avatar Apr 28 '23 14:04 aunitt

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

flecchi avatar May 01 '23 11:05 flecchi

Installing in the docker image

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

fixes the issue for me.

caudurodev avatar May 01 '23 16:05 caudurodev

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 avatar May 03 '23 09:05 Firunner757

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

Firunner757 avatar May 03 '23 09:05 Firunner757

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

TylerBarnes avatar May 04 '23 15:05 TylerBarnes

It fails on MAC with M1 chip.

BTW, use of firefox helped.

pryadchenko avatar May 04 '23 15:05 pryadchenko

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

TylerBarnes avatar May 04 '23 16:05 TylerBarnes

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.

anonhostpi avatar May 04 '23 20:05 anonhostpi

Any solution for Windows users?

Firunner757 avatar May 05 '23 02:05 Firunner757

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

vinay-mehta avatar May 05 '23 07:05 vinay-mehta

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

jdewind avatar May 06 '23 22:05 jdewind

TylerBarnes solution works on M1 - thanks mate...

BrianAndersen78 avatar May 15 '23 16:05 BrianAndersen78

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

yuvaldream avatar May 18 '23 07:05 yuvaldream

it also fail on list _files command:

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

yuvaldream avatar May 18 '23 07:05 yuvaldream

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

FedericoCapaldo avatar May 26 '23 15:05 FedericoCapaldo

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[bot] avatar Sep 06 '23 21:09 github-actions[bot]

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

github-actions[bot] avatar Sep 19 '23 01:09 github-actions[bot]