gpt4free icon indicating copy to clipboard operation
gpt4free copied to clipboard

Claude-3-Opus (You) error: Failed to connect to browser

Open rqi14 opened this issue 1 year ago • 6 comments
trafficstars

Bug description I asked a question using claude-3-opus model from You. It reports error:

An error occured: You: Exception: --------------------- Failed to connect to browser --------------------- One of the causes could be when you are running as root. In that case you need to pass no_sandbox=True

Environment

  • 0.3.10 (docker compose)

rqi14 avatar May 08 '24 08:05 rqi14

The browser won't open. Maybe it's out of memory or you're doing too many things at once.

hlohaus avatar May 08 '24 16:05 hlohaus

The browser won't open. Maybe it's out of memory or you're doing too many things at once.

Hi. I have 128GB of memory and at least 100GB are free. It doesn't look like a memory issue. I run it using docker compose. Is it somehow related to that?

rqi14 avatar May 09 '24 03:05 rqi14

The browser won't open. Maybe it's out of memory or you're doing too many things at once.

By checking the noVNC for the VM, I found the browser was actually open but showed a blank page.

rqi14 avatar May 11 '24 01:05 rqi14

Please confirm if the following line is present in your docker-compose.yml file: shm_size: 2gb

It is important to note that Google Chrome requires a minimum amount of memory to function properly.

Alternatively, you can try restarting the container and running nodriver again.

hlohaus avatar May 19 '24 03:05 hlohaus

Please confirm if the following line is present in your docker-compose.yml file: shm_size: 2gb

It is important to note that Google Chrome requires a minimum amount of memory to function properly.

Alternatively, you can try restarting the container and running nodriver again.

Hi.

I double checked and can confirm the 'shm_size: 2gb' option is present in the docker-compose file. I don't quite understand the nodriver thing. It does not seem to be present in any of the document.

Please see the below screenshot. I think the chrome is open but it shows a blank page.

image

g4f complaints it couldn't connect to the browser.

image

rqi14 avatar May 22 '24 02:05 rqi14

I have the same question no_sandbox=True

KGLongWang avatar May 23 '24 07:05 KGLongWang

I have the same question no_sandbox=True (Need for Heroku hosting)

daniilshamraev avatar Jun 07 '24 14:06 daniilshamraev

I have the same question no_sandbox=True

Antom91 avatar Jun 15 '24 09:06 Antom91

Please confirm if the following line is present in your docker-compose.yml file: shm_size: 2gb

It is important to note that Google Chrome requires a minimum amount of memory to function properly.

Alternatively, you can try restarting the container and running nodriver again.

Hi. I probably found the cause of the issue. I cannot access you.com directly. It must happen via a proxy. Therefore, in addition to the G4F_PROXY environment varaible, I set HTTP_PROXY and HTTPS_PROXY. If these two are not set, the chromium window pops up with the url being you.com but it is inaccessible due to my network enviroment. If I set these two proxy options, I have the problem that the chromium window pops up with a empty blank page.

rqi14 avatar Jun 19 '24 04:06 rqi14

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

github-actions[bot] avatar Jul 05 '24 00:07 github-actions[bot]

Closing due to inactivity.

github-actions[bot] avatar Jul 12 '24 00:07 github-actions[bot]

Why is anyone here, this issue is becoming the limiting factor.

John4650-hub avatar Aug 06 '24 17:08 John4650-hub