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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command browse_website returned: Error: Message: unknown error: Chrome failed to start: crashed. (unknown error: DevToolsActivePort file doesn't exist) #1788

Closed
1 task done
Bourn3Dynsty opened this issue Apr 16, 2023 · 14 comments
Labels
bug Something isn't working function: browse

Comments

@Bourn3Dynsty
Copy link

Duplicates

  • I have searched the existing issues

Steps to reproduce 馃暪

Running autogpt in docker desktop for windows

Current behavior 馃槸

Command browse_website returned: Error: Message: unknown error: Chrome failed to start: crashed. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace: #0 0x5634a2f84fe3 #1 0x5634a2cc3d36 #2 0x5634a2cecb20 #3 0x5634a2ce8a9b #4 0x5634a2d2aaf7 #5 0x5634a2d2a11f #6 0x5634a2d21693 #7 0x5634a2cf403a #8 0x5634a2cf517e #9 0x5634a2f46dbd #10 0x5634a2f4ac6c #11 0x5634a2f544b0 #12 0x5634a2f4bd63 #13 0x5634a2f1ec35 #14 0x5634a2f6f138 #15 0x5634a2f6f2c7 #16 0x5634a2f7d093 #17 0x7fead9ae1ea7 start_thread

Expected behavior 馃

Should be able to read the links it's pulling

Your prompt 馃摑

FROM debian:bullseye AS builder

ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /workdir

RUN apt update && apt -y install git make build-essential

RUN git clone --recursive https://github.com/RediSearch/RediSearch.git

RUN cd RediSearch && make setup && make build

Use an official Python base image from the Docker Hub

FROM python:3.11-slim

Switch to root user and install necessary packages

USER root
RUN apt update && apt -y install vim redis-server chromium-driver chromium &&
rm -rf /var/lib/apt/lists/*

Set environment variables

ENV PIP_NO_CACHE_DIR=yes
PYTHONUNBUFFERED=1
PYTHONDONTWRITEBYTECODE=1

Create a non-root user and set permissions

RUN useradd --create-home appuser
WORKDIR /home/appuser
RUN chown appuser:appuser /home/appuser
USER appuser

Copy the requirements.txt file and install the requirements

COPY --chown=appuser:appuser requirements-docker.txt .
RUN pip install --no-cache-dir --user -r requirements-docker.txt

Copy the application files

COPY --chown=appuser:appuser autogpt/ ./autogpt

Set the entrypoint

ENTRYPOINT ["python", "-m", "autogpt"]

@jik-ai
Copy link

jik-ai commented Apr 16, 2023

I got this to work in docker by making the following patches to the dockerfile and web.py

414bd4c

I would PR this but will probably break non-docker versions.

@Bourn3Dynsty
Copy link
Author

That indeed work but it yielded a new error : Command browse_website returned: Error: Message: unknown error: session deleted because of page crash from unknown error: cannot determine loading status from tab crashed (Session info: headless chrome=112.0.5615.121) Stacktrace: #0 0x5612c2c8bfe3 #1 0x5612c29cabc1 #2 0x5612c29b4ad2 #3 0x5612c29b3608 #4 0x5612c29b3db2 #5 0x5612c29c1283 #6 0x5612c29c22c2 #7 0x5612c29d24db #8 0x5612c29d64eb #9 0x5612c29b4273 #10 0x5612c29d2108 #11 0x5612c2a41140 #12 0x5612c2a28693 #13 0x5612c29fb03a #14 0x5612c29fc17e #15 0x5612c2c4ddbd #16 0x5612c2c51c6c #17 0x5612c2c5b4b0 #18 0x5612c2c52d63 #19 0x5612c2c25c35 #20 0x5612c2c76138 #21 0x5612c2c762c7 #22 0x5612c2c84093 #23 0x7eff5e8b2ea7 start_thread

@jik-ai
Copy link

jik-ai commented Apr 16, 2023

I also ran into this occasionally, I assumed due to a memory issue, but try with some other domains to narrow down?

@dexchaindev
Copy link

I added this to web_selenium.py to fix it:
# Add the following lines:
options.add_argument("--no-sandbox")
options.add_argument("--headless")
options.add_argument("--disable-dev-shm-usage")

@jamie7893
Copy link

works great, thanks

@Pwuts
Copy link
Member

Pwuts commented Apr 19, 2023

Resolved in #1473

@Pwuts Pwuts closed this as completed Apr 19, 2023
@Pwuts Pwuts added bug Something isn't working function: browse labels Apr 19, 2023
@bjm88
Copy link

bjm88 commented Apr 27, 2023

I saw this today on the 0.2.2 latest stable. The weird thing is AutoGPT previously worked hours early and was able to launch chrome (I think, unless it fell back to google search api directly?). Anything else to check...Using standard MacBook pro latest OS, docker fully updated, run as docker compose container.....?

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: Since the browse_website command failed, I will try using the Google Search command

@bjm88 bjm88 mentioned this issue Apr 27, 2023
1 task
@d3fc0n2008
Copy link

I added this to web_selenium.py to fix it: # Add the following lines: options.add_argument("--no-sandbox") options.add_argument("--headless") options.add_argument("--disable-dev-shm-usage")

Can you tell me exactly where you added this in the code? I'm really new to all of this

@rudolfovic
Copy link

NEXT ACTION:  COMMAND = browse_website ARGUMENTS = {'url': 'https://somesite.com/', 'question': 'water pump'}
Enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter feedback for ...
Input:y
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-=
[WDM] - Downloading: 19.2kB [00:00, 6.00MB/s]
[WDM] - Downloading: 19.2kB [00:00, 3.64MB/s]
[WDM] - Downloading: 100%|鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 2.93M/2.93M [00:01<00:00, 2.11MB/s]
SYSTEM:  Command browse_website returned: Error: Message: Process unexpectedly closed with status 1
 THOUGHTS:  It seems like there was an error with the 'browse_website' command. I suggest we use the 'google' command to search for a water pump instead.

None of the browsers work for me, neither through docker nor vanilla macOS. I don't get why it wouldn't work through docker, isn't it supposed to perfectly replicate the intended environment?

When run on macOS directly with safari, a window actually opens (since Safari doesn't support headless) and the page is rendered but there is still an error within Augo-GPT.

@sumukhshetty
Copy link

d3fc0n2008

I took a bit to figure this out but if you're using docker - you cannot edit the image.

You will have to clone the github repo - like so git clone -b stable https://github.com/Significant-Gravitas/Auto-GPT.git

You then need to make a few edits on the dockerfile in this repo.

Then you can create a docker build on the file - and if you run that docker image - it should fix the issue

I also found this specific comment useful to fix the issue - #2600 (comment)

I think the issue only exists for people who are running the M1 chips

@rudolfovic
Copy link

I am running on Apple Silicon and the fix helped, thanks so much!

@matguest
Copy link

I changed the default browser to Firefox by editing the .env file and it work -> USE_WEB_BROWSER=firefox

@pareekyashovardhan
Copy link

I changed the default browser to Firefox by editing the .env file and it work -> USE_WEB_BROWSER=firefox

You are a low key genius my friend! This helped a lot, thanks.

@lahfir
Copy link

lahfir commented Jul 17, 2023

#3432 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working function: browse
Projects
None yet
Development

No branches or pull requests