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

Chrome Browser Crash on Linux Fix #2086

Closed
wants to merge 2 commits into from
Closed

Chrome Browser Crash on Linux Fix #2086

wants to merge 2 commits into from

Conversation

Wetiqe
Copy link

@Wetiqe Wetiqe commented Apr 17, 2023

By adding these two arguments can fix the chrome crash problem

Background

When running auto-gpt on a server where there is no displaying manager (I am running on a VPS). The browser command google-chrome will not run correctly.

Related Issue #2043

Changes

By adding --headless --disable-gpu can run chrome in headless mode which prevents it from calling displaying manager and allow the program to parse raw information

Documentation

Add arguments to run the browser in headless mode without a graphical user interface

Test Plan

The bug can be checked from previous issue. After fixing the script ran properly:

PLAN:
-  Use 'browse_website' command to extract important information from each website obtained from last search result.
CRITICISM:  None
NEXT ACTION:  COMMAND = browse_website ARGUMENTS = {'url': 'https://jamanetwork.com/journals/jamanetworkopen/fullarticle/2800812', 'question': 'What is the hypothesis of this study and what neurological diseases are discussed?'}
Text length: 64001 characters
Adding chunk 1 / 9 to memory
Summarizing chunk 1 / 9
Added chunk 1 summary to memory
Adding chunk 2 / 9 to memory
Summarizing chunk 2 / 9
Added chunk 2 summary to memory
Adding chunk 3 / 9 to memory
Summarizing chunk 3 / 9
Added chunk 3 summary to memory
Adding chunk 4 / 9 to memory
Summarizing chunk 4 / 9
Added chunk 4 summary to memory
Adding chunk 5 / 9 to memory
Summarizing chunk 5 / 9
Added chunk 5 summary to memory
Adding chunk 6 / 9 to memory
Summarizing chunk 6 / 9
Added chunk 6 summary to memory
Adding chunk 7 / 9 to memory
Summarizing chunk 7 / 9
Added chunk 7 summary to memory
Adding chunk 8 / 9 to memory
Summarizing chunk 8 / 9
Added chunk 8 summary to memory
Adding chunk 9 / 9 to memory
Summarizing chunk 9 / 9
Added chunk 9 summary to memory
Summarized 9 chunks.

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

Tested only on my VPS while my PC can't run this project yet. This change can help fix the bug when running on a system without a displaying manager.

By adding these two arguments can fix the chrome crash problem
@Wetiqe Wetiqe changed the title Chrome Crash Problem Fix Chrome Browser Crash on Linux Fix Apr 17, 2023
@Wetiqe
Copy link
Author

Wetiqe commented Apr 17, 2023

#2096 #2066

brendanwenzel
brendanwenzel previously approved these changes Apr 17, 2023
Copy link

@brendanwenzel brendanwenzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this and it fixed my issues with the browser on my server instance with Linux. Seems to work as intended.

@nponeccop nponeccop added the B7 label Apr 17, 2023
Copy link
Contributor

@nponeccop nponeccop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You fix it on Linux but break elsewhere. Make it optional/configurable or detect the platform.

Check system type before changing chrome into headless mode
@Wetiqe
Copy link
Author

Wetiqe commented Apr 17, 2023

Updated using the platform package. When the system type is 'Linux', options will add these two configs.

@nponeccop nponeccop mentioned this pull request Apr 17, 2023
1 task
@nponeccop nponeccop added the bug Something isn't working label Apr 18, 2023
@Pwuts
Copy link
Member

Pwuts commented Apr 18, 2023

Closed as duplicate of #1473, #1984

@Pwuts Pwuts closed this Apr 18, 2023
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

Successfully merging this pull request may close these issues.

4 participants