AutoGPT: SYSTEM: Command browse_website returned: Error: Message: Service /home/appuser/.wdm/drivers/chromedriver/linux64/112.0.5615.49/chromedriver unexpectedly exited. Status code was: 127
Duplicates
- I have searched the existing issues
Steps to reproduce š¹
- Build a dockerized version of aouto-gpt
- Give it any instruction that leads to it needing to browse_website
Current behavior šÆ
SYSTEM: Command browse_website returned: Error: Message: Service /home/appuser/.wdm/drivers/chromedriver/linux64/112.0.5615.49/chromedriver unexpectedly exited. Status code was: 127
Expected behavior š¤
Should be bale to browse website properly
Your prompt š
# It really could be any prompt
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 4
- Comments: 29 (7 by maintainers)
Commits related to this issue
- fixes #1821 by installing required drivers and adding options to chromedriver — committed to psvensson/Auto-GPT by psvensson a year ago
- fixes #1821 by installing required drivers and adding options to chromedriver — committed to Significant-Gravitas/AutoGPT by psvensson a year ago
@p-i- I also have same issue, also using docker on an apple M2 macbookā¦
Iāve had good milage using Seleniarm (Selenium for ARM64) on M1 https://github.com/seleniumhq-community/docker-seleniarm
and override the chromedriver binary path in autogpt/commands/web_selenium.py
Just for the record: Same isssue here (MacBook Pro 2021 with M1, Chrome version Version 112.0.5615.137). Error msg:
Command browse_website returned: Error: Message: Service /home/appuser/.wdm/drivers/chromedriver/linux64/112.0.5615.49/chromedriver unexpectedly exited. Status code was: 255
wget https://chromedriver.storage.googleapis.com/94.0.4606.41/chromedriver_linux64.zip unzip chromedriver_linux64.zip -d /path/to/directory mkdir ~/bin mv /path/to/chromedriver ~/bin export PATH=$PATH:$HOME/bin
above resolved this issue for me
Solution:
The issue occurred due to missing libraries in the Dockerfile. The solution is to add the required libraries to the Dockerfile.
Additionally, adding options to the Chrome webdriver also helped to resolve the issue.
These changes have been made in the PR #1857 and it has been merged. Please check if the issue is resolved by updating your code with the changes in the PR.
Hi, just my two cents: I have the same problem, but with exit code 255. What is strange, is that if we go inside the running container, in /home/appuser, there is no .wdm directory , and if we try to find / -name chrome* in the container, we donāt find chromedriver. Iāve tried to install chromium in the dockerfile, but no luck. Iām still searchingā¦
Iām running the latest stable branch with Docker on an Apple Silicon Mac.
Iām able to load simple web pages with the following changes:
web_selenium.py
at L71 :Make sure firefox is selected as the browser in .env file.
This one probably is irrelevant, but I changed it at the beginning and donāt have time to test w/o it: I removed the arch specifier in the deb command when installing Chrome at L14 in Dockerfile. (Note that this doesnāt seem to help with Chrome on M1 Macs either).
I only tested with some simple static web pages. It seems to be loading fine. Not sure if firefox would crash if a website uses some fancy web features that require GPU acceleration.
This also does not work for me with the latest code on
stable
.M1 MBP running in docker.
@WangPeterXF the file heās referring to is
commands/web_selenium.py
But the solution did not work for me.
Thank you, no luck for me, I have the same error then before but know, but itās related with the Apple Silicon architecture now,
SYSTEM: Command browse_website returned: Error: Message: Service /home/appuser/.wdm/drivers/chromedriver/linux64/112.0.5615.49/chromedriver unexpectedly exited. Status code was: 255
So, I connect to the terminal inside the container, and now I see the .wdm directory. If Iām going inside and launch the chromedriver, I have this error:it send me to this: https://github.com/browserless/chrome/issues/2004 Itās true that my Macbook is an M1, so itās another specific issue. So, Iāve ticked āUse Rosettaā¦ā in docker desktop, and now, when I launch chromedriver, I have
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2 Trace/breakpoint trap
So I didexport DOCKER_DEFAULT_PLATFORM=linux/amd64
And now I have the status code 127 back and./chromedriver: error while loading shared libraries: libglib-2.0.so.0: cannot open shared object file: No such file or directory
aaarg⦠š¦ endless debuggingā¦Solved by this PR https://github.com/Significant-Gravitas/Auto-GPT/pull/1857
There was a discussion in the Discord #dev-autogpt channel and one suggestion was that it might be permission issues. The installation process might download the right thing but is not able to save it, or perhaps everything is installed fine, but the docker user is not allowed to either run it or access the files (or both)
My bad, didnāt see the last line
In the file at location autogpt/commands/web_selenium.py, change line 90 to
driver = webdriver.Chrome( executable_path=ā/usr/bin/chromedriverā, options=options )
and re-build the Docker container. This resolved the issue for me
On Sun, Apr 23, 2023 at 8:53āÆPM ornedaj @.***> wrote:
I am having the same error on Macbook M1:
Service /home/appuser/.wdm/drivers/chromedriver/linux64/112.0.5615.49/chromedriver unexpectedly exited. Status code was: 255
The issue appeard to be that Chrome Driver is not correctly installed or configured.
I think I found the problem. BY adding some options before starting the chrome webdriver, the problem goies away;
if CFG.selenium_web_browser == āfirefoxā: driver = webdriver.Firefox( executable_path=GeckoDriverManager().install(), options=options ) elif CFG.selenium_web_browser == āsafariā: # Requires a bit more setup on the users end # See https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari driver = webdriver.Safari(options=options) else: options.add_argument(āāno-sandboxā) options.add_argument(āāwindow-size=1420,1080ā) options.add_argument(āāheadlessā) options.add_argument(āādisable-gpuā) driver = webdriver.Chrome( executable_path=ChromeDriverManager().install(), options=options ) driver.get(url)
Thatās the lines with āoption.addā
This is the first Python code Iāve ever written/pasted from Google btw š Will do a PR nowā¦