Significant-Gravitas / AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
https://agpt.co
Other
168.07k stars 44.35k forks source link

"DevToolsActivePort file doesn't exist" in browse_website #1978

Closed ziliangpeng closed 1 year ago

ziliangpeng commented 1 year ago

⚠️ Search for existing issues first ⚠️

GPT-3 or GPT-4

Steps to reproduce 🕹

Current behavior 😯

Assistant: { "thoughts": { "text": "I need to read the reviews on the Rotten Tomatoes and Roger Ebert websites to start summarizing the user reviews for Avengers: Endgame. ", "reasoning": "Both Rotten Tomatoes and Roger Ebert are popular review websites, which should have a variety of opinions for the movie. This will allow me to get a broad range of opinions before summarizing the reviews.", "plan": "- I will browse the Rotten Tomatoes website for reviews on Avengers: Endgame.\n- I will browse the Roger Ebert website for reviews on Avengers: Endgame. \n- I will store the useful information in separate files for positive and negative reviews so that I can summarize the reviews more efficiently.", "criticism": "None", "speak": "I will start browsing the Rotten Tomatoes website for Avengers: Endgame reviews first. Shall I proceed with that?" }, "command": { "name": "browse_website", "args": { "url": "https://www.rottentomatoes.com/m/avengers_endgame/reviews", "question": "positive and negative reviews for Avengers: Endgame on Rotten Tomatoes" } } }

System: Command browse_website returned: Error: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Expected behavior 🤔

expect it be able to correctly browse the url, and summarize content.

Your prompt 📝

ai_goals:
- 'summarize user reviews from both the positive side and negative side for the Movie
  "Avengers: End Game"'
mihalycsaba commented 1 year ago

same error on a headless virtual machine running rocky 8

mihalycsaba commented 1 year ago

some other error with firefox

NEXT ACTION:  COMMAND = browse_website ARGUMENTS = {'url': 'https://www.steamgifts.com/giveaway/GBzCg/frog-detective-1-the-haunted-island', 'question': 'giveaway details'}
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, 15.2MB/s]                                                                                                                                                                                                 
[WDM] - Downloading: 19.2kB [00:00, 12.9MB/s]                                                                                                                                                                                                 
[WDM] - Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.93M/2.93M [00:00<00:00, 6.00MB/s]
SYSTEM:  Command browse_website returned: Error: Message: Process unexpectedly closed with status 1
mihalycsaba commented 1 year ago

@ziliangpeng add the lines marked with + after line 65

diff --git a/autogpt/commands/web_selenium.py b/autogpt/commands/web_selenium.py
index 1d078d7..dd7bcb9 100644
--- a/autogpt/commands/web_selenium.py
+++ b/autogpt/commands/web_selenium.py
@@ -65,6 +65,8 @@ def scrape_text_with_selenium(url: str) -> tuple[WebDriver, str]:
     options.add_argument(
         "user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.5615.49 Safari/537.36"
     )
+    options.add_argument("--no-sandbox")
+    options.add_argument("--headless")

     if CFG.selenium_web_browser == "firefox":
         driver = webdriver.Firefox(
johndzxu commented 1 year ago

Still gets the error after adding the lines:

Command browse_website returned: Error: Message: unknown error: 
DevToolsActivePort file doesn't exist Stacktrace: #0 0x564a6c95efe3 <unknown> #1 0x564a6c69dd36 <unknown>
 #2 0x564a6c6ca459 <unknown> #3 0x564a6c6c6051 <unknown> #4 0x564a6c6c2a9b <unknown> #5 0x564a6c704af7 
<unknown> #6 0x564a6c70411f <unknown> #7 0x564a6c6fb693 <unknown> #8 0x564a6c6ce03a <unknown> #9 
0x564a6c6cf17e <unknown> #10 0x564a6c920dbd <unknown> #11 0x564a6c924c6c <unknown> #12 0x564a6c92e4b0 
<unknown> #13 0x564a6c925d63 <unknown> #14 0x564a6c8f8c35 <unknown> #15 0x564a6c949138 <unknown> #16 
0x564a6c9492c7 <unknown> #17 0x564a6c957093 <unknown> #18 0x7f1cab890402 <unknown>
horazius commented 1 year ago

Same problem here:

-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-= SYSTEM: 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/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace: #0 0x56255f21efe3 #1 0x56255ef5dd36 #2 0x56255ef86b20 #3 0x56255ef82a9b #4 0x56255efc4af7 #5 0x56255efc411f #6 0x56255efbb693 #7 0x56255ef8e03a #8 0x56255ef8f17e #9 0x56255f1e0dbd #10 0x56255f1e4c6c #11 0x56255f1ee4b0 #12 0x56255f1e5d63 #13 0x56255f1b8c35 #14 0x56255f209138 #15 0x56255f2092c7 #16 0x56255f217093 #17 0x7f427280cea7 start_thread

k-boikov commented 1 year ago

https://github.com/Significant-Gravitas/Auto-GPT/pull/2096 This should help. Try adding --disable-dev-shm-usage in your case.

sadmuphin commented 1 year ago

Selenium has a lot of issues with chrome on linux. If anyone has any other flags to add to improve #2096 that would be great

Pwuts commented 1 year ago

Closing as resolved by #2096