anthropics / anthropic-quickstarts

A collection of projects designed to help developers quickly get started with building deployable applications using the Anthropic API
MIT License
6.74k stars 973 forks source link

[computer-use-demo] noVNC Failed to connect to server #42

Open AlexZhangji opened 3 weeks ago

AlexZhangji commented 3 weeks ago

noVNC Failed to connect to server. Normal chat and screen cap works.

image

chrisgorgo commented 3 weeks ago

Does this persist after refreshing the browser or restarting the container? Can you access http://localhost:6080/vnc.html or vnc://localhost:5900

arbiyanto commented 3 weeks ago

Same issue

AlexZhangji commented 3 weeks ago

Does this persist after refreshing the browser or restarting the container? Can you access http://localhost:6080/vnc.html or vnc://localhost:5900

restart container helps. works for me now.

x5a commented 3 weeks ago

I'm closing this as a known issue until we are able to reproduce and fix on our end

bmacer commented 3 weeks ago

From #48 here's the console error message prior to the restart:

Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.575329) [GFX1-]: glxtest: libpci missing
rburhum commented 3 weeks ago

On Ubuntu 24.10 running KDE I cannot connect to the VNC Server through the docker webapp or through a native VNC app in my host machine. The host machine just shows a blank screen:

image

and the web app in your docker container just tries to connect but doesn't do anything:

image

The weird thing is that if I run the agent, it seems it can see it. It even shows a screenshot:

image

Eventually (minutes later) I get the standard FAILED to connect to server noVNC from other people.

image

Inside the docker container:

This is what novnc.log has:

computeruse@4213af600317:/tmp$ cat novnc.log 
Warning: could not find self.pem
Using local websockify at /opt/noVNC/utils/websockify/run
Starting webserver and WebSockets proxy on port 6080
WebSocket server settings:
  - Listen on :6080
  - Web server. Web root: /opt/noVNC
  - No SSL/TLS support (no cert file)
  - proxying from :6080 to localhost:5900

Navigate to this URL:

    http://4213af600317:6080/vnc.html?host=4213af600317&port=6080

Press Ctrl-C to exit

172.17.0.1 - - [22/Oct/2024 22:11:05] 172.17.0.1: Plain non-SSL (ws://) WebSocket connection
172.17.0.1 - - [22/Oct/2024 22:11:05] 172.17.0.1: Path: '/websockify'
172.17.0.1 - - [22/Oct/2024 22:11:05] connecting to: localhost:5900
handler exception: [Errno 107] Transport endpoint is not connected
172.17.0.1 - - [22/Oct/2024 22:36:33] 172.17.0.1: Plain non-SSL (ws://) WebSocket connection
172.17.0.1 - - [22/Oct/2024 22:36:33] 172.17.0.1: Path: '/websockify'
172.17.0.1 - - [22/Oct/2024 22:36:33] connecting to: localhost:5900
172.17.0.1 - - [22/Oct/2024 22:36:33] Failed to connect to localhost:5900: [Errno 111] Connection refused
computeruse@4213af600317:/tmp$

This is what netstat shows:

computeruse@4213af600317:~$ netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:6080            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:8501            0.0.0.0:*               LISTEN     
tcp        0      0 4213af600317:8501       172.17.0.1:40714        ESTABLISHED
tcp        0      0 localhost:57068         localhost:6080          TIME_WAIT  
tcp       25      0 4213af600317:33000      160.79.104.10:https     CLOSE_WAIT 
tcp       25      0 4213af600317:32996      160.79.104.10:https     CLOSE_WAIT 
tcp6       0      0 [::]:http-alt           [::]:*                  LISTEN     
tcp6       0      0 [::]:8501               [::]:*                  LISTEN     
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  3      [ ]         STREAM     CONNECTED     347318   @/tmp/.X11-unix/X1
unix  3      [ ]         STREAM     CONNECTED     343724   
unix  3      [ ]         STREAM     CONNECTED     340514   @/tmp/.X11-unix/X1
unix  3      [ ]         STREAM     CONNECTED     347339   
unix  3      [ ]         STREAM     CONNECTED     347338   
unix  3      [ ]         STREAM     CONNECTED     347317   
unix  3      [ ]         STREAM     CONNECTED     328702   @/tmp/.X11-unix/X1
unix  3      [ ]         STREAM     CONNECTED     326964   
unix  2      [ ACC ]     STREAM     LISTENING     339840   @/tmp/.X11-unix/X1
computeruse@4213af600317:~$

I tried running the vnc server manually inside the Docker container and got this output:

computeruse@4213af600317:~$ x11vnc -display $DISPLAY \
    -forever \
    -shared \
    -wait 50 \
    -timeout 60 \
    -noxrecord \
    -noxfixes \
    -noxdamage \
    -rfbport 5900
22/10/2024 22:45:14 passing arg to libvncserver: -rfbport
22/10/2024 22:45:14 passing arg to libvncserver: 5900
###############################################################
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  **  WARNING  **  WARNING  **  WARNING  **  WARNING  **   @#
#@                                                           @#
#@        YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!!        @#
#@                                                           @#
#@  This means anyone with network access to this computer   @#
#@  may be able to view and control your desktop.            @#
#@                                                           @#
#@ >>> If you did not mean to do this Press CTRL-C now!! <<< @#
#@                                                           @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  You can create an x11vnc password file by running:       @#
#@                                                           @#
#@       x11vnc -storepasswd password /path/to/passfile      @#
#@  or   x11vnc -storepasswd /path/to/passfile               @#
#@  or   x11vnc -storepasswd                                 @#
#@                                                           @#
#@  (the last one will use ~/.vnc/passwd)                    @#
#@                                                           @#
#@  and then starting x11vnc via:                            @#
#@                                                           @#
#@      x11vnc -rfbauth /path/to/passfile                    @#
#@                                                           @#
#@  an existing ~/.vnc/passwd file from another VNC          @#
#@  application will work fine too.                          @#
#@                                                           @#
#@  You can also use the -passwdfile or -passwd options.     @#
#@  (note -passwd is unsafe if local users are not trusted)  @#
#@                                                           @#
#@  Make sure any -rfbauth and -passwdfile password files    @#
#@  cannot be read by untrusted users.                       @#
#@                                                           @#
#@  Use x11vnc -usepw to automatically use your              @#
#@  ~/.vnc/passwd or ~/.vnc/passwdfile password files.       @#
#@  (and prompt you to create ~/.vnc/passwd if neither       @#
#@  file exists.)  Under -usepw, x11vnc will exit if it      @#
#@  cannot find a password to use.                           @#
#@                                                           @#
#@                                                           @#
#@  Even with a password, the subsequent VNC traffic is      @#
#@  sent in the clear.  Consider tunnelling via ssh(1):      @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/#tunnelling            @#
#@                                                           @#
#@  Or using the x11vnc SSL options: -ssl and -stunnel       @#
#@                                                           @#
#@  Please Read the documentation for more info about        @#
#@  passwords, security, and encryption.                     @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/faq.html#faq-passwd    @#
#@                                                           @#
#@  To disable this warning use the -nopw option, or put     @#
#@  'nopw' on a line in your ~/.x11vncrc file.               @#
#@                                                           @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
###############################################################
22/10/2024 22:45:15 x11vnc version: 0.9.16 lastmod: 2019-01-05  pid: 731
22/10/2024 22:45:15 XOpenDisplay("-forever") failed.
22/10/2024 22:45:15 Trying again with XAUTHLOCALHOSTNAME=localhost ...

22/10/2024 22:45:15 ***************************************
22/10/2024 22:45:15 *** XOpenDisplay failed (-forever)

*** x11vnc was unable to open the X DISPLAY: "-forever", it cannot continue.
*** There may be "Xlib:" error messages above with details about the failure.

Some tips and guidelines:

** An X server (the one you wish to view) must be running before x11vnc is
   started: x11vnc does not start the X server.  (however, see the -create
   option if that is what you really want).

** You must use -display <disp>, -OR- set and export your $DISPLAY
   environment variable to refer to the display of the desired X server.
 - Usually the display is simply ":0" (in fact x11vnc uses this if you forget
   to specify it), but in some multi-user situations it could be ":1", ":2",
   or even ":137".  Ask your administrator or a guru if you are having
   difficulty determining what your X DISPLAY is.

** Next, you need to have sufficient permissions (Xauthority) 
   to connect to the X DISPLAY.   Here are some Tips:

 - Often, you just need to run x11vnc as the user logged into the X session.
   So make sure to be that user when you type x11vnc.
 - Being root is usually not enough because the incorrect MIT-MAGIC-COOKIE
   file may be accessed.  The cookie file contains the secret key that
   allows x11vnc to connect to the desired X DISPLAY.
 - You can explicitly indicate which MIT-MAGIC-COOKIE file should be used
   by the -auth option, e.g.:
       x11vnc -auth /home/someuser/.Xauthority -display :0
       x11vnc -auth /tmp/.gdmzndVlR -display :0
   you must have read permission for the auth file.
   See also '-auth guess' and '-findauth' discussed below.

** If NO ONE is logged into an X session yet, but there is a greeter login
   program like "gdm", "kdm", "xdm", or "dtlogin" running, you will need
   to find and use the raw display manager MIT-MAGIC-COOKIE file.
   Some examples for various display managers:

     gdm:     -auth /var/gdm/:0.Xauth
              -auth /var/lib/gdm/:0.Xauth
     kdm:     -auth /var/lib/kdm/A:0-crWk72
              -auth /var/run/xauth/A:0-crWk72
     xdm:     -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk
     dtlogin: -auth /var/dt/A:0-UgaaXa

   Sometimes the command "ps wwwwaux | grep auth" can reveal the file location.

   Starting with x11vnc 0.9.9 you can have it try to guess by using:

              -auth guess

   (see also the x11vnc -findauth option.)

   Only root will have read permission for the file, and so x11vnc must be run
   as root (or copy it).  The random characters in the filenames will of course
   change and the directory the cookie file resides in is system dependent.

See also: http://www.karlrunge.com/x11vnc/faq.html
computeruse@4213af600317:~
rburhum commented 3 weeks ago

@x5a let me know if you need any extra info to repro. Thanks

x5a commented 3 weeks ago

@rburhum this is very helpful, I'll let you know what I find

rburhum commented 3 weeks ago

I also tried setting up DISPLAY to :1 before running the VNC Server, and no luck

x5a commented 3 weeks ago

@rburhum Thanks for your patience. So it seems like:

Can you pull the latest container and tell me if you see any logs from the docker execution? https://github.com/anthropics/anthropic-quickstarts/commit/0cd8e733ff894342861ff93e45f72a162362fc4d adds exception logging for x11vnc and automatic restart - specifically interested in logging that starts with x11vnc process crashed, restarting...

rburhum commented 3 weeks ago

This is the image I have:

❯ docker images
REPOSITORY                                                                   TAG                        IMAGE ID       CREATED         SIZE
ghcr.io/anthropics/anthropic-quickstarts                                     computer-use-demo-latest   e11803f5a79d   3 hours ago     2.8GB

And I did run that updated docker image 3hrs ago.

Every once in awhile, I see this in the stdout:

x11vnc process crashed, restarting...
x11vnc stderr output:
23/10/2024 01:05:11 Got connection from client 127.0.0.1
23/10/2024 01:05:11   0 other clients
23/10/2024 01:05:11 Normal socket connection
23/10/2024 01:05:11 Disabled X server key autorepeat.
23/10/2024 01:05:11   to force back on run: 'xset r on' (3 times)
23/10/2024 01:05:11 incr accepted_client=1 for 127.0.0.1:51902  sock=6
23/10/2024 01:05:11 Client Protocol Version 3.8
23/10/2024 01:05:11 Protocol version sent 3.8, using 3.8
23/10/2024 01:05:11 No valid client after 63 secs.
23/10/2024 01:05:11 rfbProcessClientSecurityType: executing handler for type 1
23/10/2024 01:05:11 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
23/10/2024 01:05:11 deleted 32 tile_row polling images.
23/10/2024 01:05:11 Restored X server key autorepeat to: 1
starting vnc
PORT=5900
x11vnc process crashed, restarting...
x11vnc stderr output:
23/10/2024 01:06:18 No client after 60 secs.
23/10/2024 01:06:18 deleted 32 tile_row polling images.
starting vnc
PORT=5900

but the x11vnc_stderr.log is empty.

 │  ~/src/anthropic-quickstarts/computer-use-demo │   main ?1 ──❯ docker exec -ti 23a7 /bin/bash
computeruse@23a7cb535f37:~$ cd /tmp/
computeruse@23a7cb535f37:/tmp$ ls
novnc.log                            server_logs.txt       x11vnc_stderr.log
python-build.20241022145738.118.log  streamlit_stdout.log
computeruse@23a7cb535f37:/tmp$ less x11vnc_stderr.log 
computeruse@23a7cb535f37:/tmp$ cat x11vnc_stderr.log 
computeruse@23a7cb535f37:/tmp$ ls
novnc.log                            server_logs.txt       x11vnc_stderr.log
python-build.20241022145738.118.log  streamlit_stdout.log
computeruse@23a7cb535f37:/tmp$ ls -l
total 1156
-rw-r--r-- 1 computeruse computeruse    1019 Oct 23 01:05 novnc.log
-rw-r--r-- 1 computeruse computeruse 1168312 Oct 22 14:59 python-build.20241022145738.118.log
-rw-r--r-- 1 computeruse computeruse     136 Oct 23 01:03 server_logs.txt
-rw-r--r-- 1 computeruse computeruse     172 Oct 23 00:56 streamlit_stdout.log
-rw-r--r-- 1 computeruse computeruse       0 Oct 23 01:06 x11vnc_stderr.log
computeruse@23a7cb535f37:/tmp$ 

Here are all the other log files just in case (except the python-build):

computeruse@23a7cb535f37:/tmp$ for file in *; do
    if [ -f "$file" ] && [ "$file" != "python-build.20241022145738.118.log" ]; then
        echo "=== $file ==="
        cat "$file"
        echo
    fi
done
=== novnc.log ===
Warning: could not find self.pem
Using local websockify at /opt/noVNC/utils/websockify/run
Starting webserver and WebSockets proxy on port 6080
WebSocket server settings:
  - Listen on :6080
  - Web server. Web root: /opt/noVNC
  - No SSL/TLS support (no cert file)
  - proxying from :6080 to localhost:5900

Navigate to this URL:

    http://23a7cb535f37:6080/vnc.html?host=23a7cb535f37&port=6080

Press Ctrl-C to exit

172.17.0.1 - - [23/Oct/2024 00:57:19] 172.17.0.1: Plain non-SSL (ws://) WebSocket connection
172.17.0.1 - - [23/Oct/2024 00:57:19] 172.17.0.1: Path: '/websockify'
172.17.0.1 - - [23/Oct/2024 00:57:19] connecting to: localhost:5900
handler exception: [Errno 107] Transport endpoint is not connected
172.17.0.1 - - [23/Oct/2024 01:03:07] 172.17.0.1: Plain non-SSL (ws://) WebSocket connection
172.17.0.1 - - [23/Oct/2024 01:03:07] 172.17.0.1: Path: '/websockify'
172.17.0.1 - - [23/Oct/2024 01:03:07] connecting to: localhost:5900
handler exception: [Errno 107] Transport endpoint is not connected

=== output.txt ===
=== novnc.log ===
Warning: could not find self.pem
Using local websockify at /opt/noVNC/utils/websockify/run
Starting webserver and WebSockets proxy on port 6080
WebSocket server settings:
  - Listen on :6080
  - Web server. Web root: /opt/noVNC
  - No SSL/TLS support (no cert file)
  - proxying from :6080 to localhost:5900

Navigate to this URL:

    http://23a7cb535f37:6080/vnc.html?host=23a7cb535f37&port=6080

Press Ctrl-C to exit

172.17.0.1 - - [23/Oct/2024 00:57:19] 172.17.0.1: Plain non-SSL (ws://) WebSocket connection
172.17.0.1 - - [23/Oct/2024 00:57:19] 172.17.0.1: Path: '/websockify'
172.17.0.1 - - [23/Oct/2024 00:57:19] connecting to: localhost:5900
handler exception: [Errno 107] Transport endpoint is not connected
172.17.0.1 - - [23/Oct/2024 01:03:07] 172.17.0.1: Plain non-SSL (ws://) WebSocket connection
172.17.0.1 - - [23/Oct/2024 01:03:07] 172.17.0.1: Path: '/websockify'
172.17.0.1 - - [23/Oct/2024 01:03:07] connecting to: localhost:5900
handler exception: [Errno 107] Transport endpoint is not connected

=== server_logs.txt ===
::ffff:172.17.0.1 - - [23/Oct/2024 00:57:19] "GET / HTTP/1.1" 200 -
::ffff:172.17.0.1 - - [23/Oct/2024 01:03:07] "GET / HTTP/1.1" 304 -

=== streamlit_stdout.log ===

  You can now view your Streamlit app in your browser.

  Local URL: http://localhost:8501
  Network URL: http://172.17.0.2:8501
  External URL: http://184.179.2.90:8501

=== x11vnc_stderr.log ===

=== server_logs.txt ===
::ffff:172.17.0.1 - - [23/Oct/2024 00:57:19] "GET / HTTP/1.1" 200 -
::ffff:172.17.0.1 - - [23/Oct/2024 01:03:07] "GET / HTTP/1.1" 304 -

=== streamlit_stdout.log ===

  You can now view your Streamlit app in your browser.

  Local URL: http://localhost:8501
  Network URL: http://172.17.0.2:8501
  External URL: http://184.179.2.90:8501

=== x11vnc_stderr.log ===

computeruse@23a7cb535f37:/tmp$ 

Same issue.

lihua8848 commented 3 weeks ago

when the docker image will update, the same issue. I have tried both in windows and linux. image

iwishyouwerehere commented 3 weeks ago

Its about the screen resolution size Change the code to match your actual screen resolution

achristianson commented 3 weeks ago

Same issue here. It seems x11vnc keeps bouncing. Log file /tmp/x11vnc_stderr.log exists but is empty. The PID for x11vnc keeps changing.

~/workspace/anthropic-quickstarts/computer-use-demo main $ docker exec -ti 0cdbf /bin/bash   
computeruse@0cdbf3ca7193:~$ ls /tmp
Temp-253b8fc8-6d76-4b3d-9929-b81446b6bee3  firefox-esr-esr115  outputs                              security_state   streamlit_stdout.log  x11vnc_stderr.log
Temp-dfbe767b-6b15-4591-8046-64207c0bf9f9  novnc.log           python-build.20241023113200.118.log  server_logs.txt  tmpaddon
computeruse@0cdbf3ca7193:~$ cat /tmp/x11vnc_stderr.log 
computeruse@0cdbf3ca7193:~$ cat /tmp/novnc.log 
Warning: could not find self.pem
Using local websockify at /opt/noVNC/utils/websockify/run
Starting webserver and WebSockets proxy on port 6080
WebSocket server settings:
  - Listen on :6080
  - Web server. Web root: /opt/noVNC
  - No SSL/TLS support (no cert file)
  - proxying from :6080 to localhost:5900

Navigate to this URL:

    http://0cdbf3ca7193:6080/vnc.html?host=0cdbf3ca7193&port=6080

Press Ctrl-C to exit

192.168.128.1 - - [23/Oct/2024 11:35:18] 192.168.128.1: Plain non-SSL (ws://) WebSocket connection
192.168.128.1 - - [23/Oct/2024 11:35:18] 192.168.128.1: Path: '/websockify'
192.168.128.1 - - [23/Oct/2024 11:35:18] connecting to: localhost:5900
192.168.128.1 - - [23/Oct/2024 11:35:23] 192.168.128.1: Plain non-SSL (ws://) WebSocket connection
192.168.128.1 - - [23/Oct/2024 11:35:23] 192.168.128.1: Path: '/websockify'
192.168.128.1 - - [23/Oct/2024 11:35:23] connecting to: localhost:5900
handler exception: [Errno 107] Transport endpoint is not connected
192.168.128.1 - - [23/Oct/2024 11:38:46] 192.168.128.1: Plain non-SSL (ws://) WebSocket connection
192.168.128.1 - - [23/Oct/2024 11:38:46] 192.168.128.1: Path: '/websockify'
192.168.128.1 - - [23/Oct/2024 11:38:46] connecting to: localhost:5900
computeruse@0cdbf3ca7193:~$ ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
compute+       1  0.0  0.0   4496  3636 pts/0    Ss+  11:34   0:00 /bin/bash ./entrypoint.sh
compute+       9  0.0  0.1 232784 91200 pts/0    S+   11:34   0:00 Xvfb :1 -ac -screen 0 1024x768x24 -retro -dpi 96 -nolisten tcp -nolisten unix
compute+      18  0.0  0.0 222312 23344 pts/0    S+   11:34   0:00 tint2 -c /home/computeruse/.config/tint2/tint2rc
compute+      79  0.7  0.2 3007844 141044 pts/0  Sl+  11:35   0:02 mutter --replace --sm-disable
compute+     205  0.0  0.0   4496  3180 pts/0    S+   11:35   0:00 bash /opt/noVNC/utils/novnc_proxy --vnc localhost:5900 --listen 6080 --web /opt/noVNC
compute+     216  0.4  0.0 600828 36300 pts/0    S+   11:35   0:01 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+     260  0.0  0.0  25364 19192 pts/0    S+   11:35   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python http_server.py
compute+     261  1.0  0.3 1381488 198952 pts/0  Sl+  11:35   0:03 /home/computeruse/.pyenv/versions/3.11.6/bin/python -m streamlit run computer_use_demo/streamlit.py
compute+     262  0.0  0.0   2824  1532 pts/0    S+   11:35   0:00 tail -f /dev/null
compute+     402 34.4  0.0   2892  1596 ?        Ss   11:35   1:36 sh -c firefox-esr -new-window
compute+     504 40.3  0.0   2892  1596 ?        Ss   11:36   1:35 sh -c firefox-esr -new-window
compute+     552  5.9  0.6 3254148 450412 ?      Sl   11:37   0:10 /usr/lib/firefox-esr/firefox-esr -new-window
compute+     647  0.0  0.0 208152 47132 ?        Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -parentBuildID 20241008180508 -prefsLen 20200 -prefMapSize 2334
compute+     673  0.1  0.1 2439440 105448 ?      Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -childID 1 -isForBrowser -prefsLen 20595 -prefMapSize 233450 -j
compute+     691  0.2  0.2 2460660 136152 ?      Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -childID 2 -isForBrowser -prefsLen 21795 -prefMapSize 233450 -j
compute+     731  0.1  0.1 2432572 119856 ?      Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -childID 3 -isForBrowser -prefsLen 21561 -prefMapSize 233450 -j
compute+     819  0.0  0.1 2382736 79416 ?       Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -childID 4 -isForBrowser -prefsLen 27146 -prefMapSize 233450 -j
compute+     821  0.0  0.1 2382736 79284 ?       Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -childID 5 -isForBrowser -prefsLen 27146 -prefMapSize 233450 -j
compute+     825  0.0  0.1 2382736 79276 ?       Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -childID 6 -isForBrowser -prefsLen 27146 -prefMapSize 233450 -j
compute+    1296  0.1  0.2 2518044 136712 ?      Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -new-window
compute+    1372  0.0  0.0 208152 45712 ?        Sl   11:38   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -parentBuildID 20241008180508 -prefsLen 19059 -prefMapSize 2328
compute+    1426  0.0  0.0   4496  3400 pts/0    S+   11:38   0:00 /bin/bash /home/computeruse/x11vnc_startup.sh
compute+    1435  0.0  0.0 600828 24968 pts/0    S+   11:38   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+    1436  0.0  0.0 600828 24948 pts/0    S+   11:38   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+    1437  0.0  0.0 600828 24948 pts/0    S+   11:38   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+    1438  0.0  0.0 600828 24948 pts/0    S+   11:38   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+    1439  0.0  0.0 600828 24948 pts/0    S+   11:38   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+    1440  0.0  0.0 600828 24960 pts/0    S+   11:38   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+    1494  0.0  0.0   4728  3636 pts/1    Ss   11:39   0:00 /bin/bash
compute+    1599  0.0  0.0  25480  8476 pts/0    S+   11:40   0:00 x11vnc -display :1 -forever -shared -wait 50 -timeout 60 -noxrecord -noxfixes -noxdamage -rfbport 5900
compute+    1602  0.0  0.0   2792  1500 pts/0    S+   11:40   0:00 sleep 1
compute+    1603  0.0  0.0   7064  2968 pts/1    R+   11:40   0:00 ps aux
computeruse@0cdbf3ca7193:~$ kill 25480
bash: kill: (25480) - No such process
computeruse@0cdbf3ca7193:~$ ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
compute+       1  0.0  0.0   4496  3636 pts/0    Ss+  11:34   0:00 /bin/bash ./entrypoint.sh
compute+       9  0.0  0.1 237972 94272 pts/0    S+   11:34   0:00 Xvfb :1 -ac -screen 0 1024x768x24 -retro -dpi 96 -nolisten tcp -nolisten unix
compute+      18  0.0  0.0 222312 23344 pts/0    S+   11:34   0:00 tint2 -c /home/computeruse/.config/tint2/tint2rc
compute+      79  0.8  0.2 3007844 141044 pts/0  Sl+  11:35   0:02 mutter --replace --sm-disable
compute+     205  0.0  0.0   4496  3180 pts/0    S+   11:35   0:00 bash /opt/noVNC/utils/novnc_proxy --vnc localhost:5900 --listen 6080 --web /opt/noVNC
compute+     216  0.4  0.0 600828 36300 pts/0    S+   11:35   0:01 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+     260  0.0  0.0  25364 19192 pts/0    S+   11:35   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python http_server.py
compute+     261  1.0  0.3 1381488 198952 pts/0  Sl+  11:35   0:03 /home/computeruse/.pyenv/versions/3.11.6/bin/python -m streamlit run computer_use_demo/streamlit.py
compute+     262  0.0  0.0   2824  1532 pts/0    S+   11:35   0:00 tail -f /dev/null
compute+     402 32.3  0.0   2892  1596 ?        Ss   11:35   1:36 sh -c firefox-esr -new-window
compute+     504 37.5  0.0   2892  1596 ?        Ss   11:36   1:35 sh -c firefox-esr -new-window
compute+     552  5.4  0.6 3254148 449776 ?      Sl   11:37   0:10 /usr/lib/firefox-esr/firefox-esr -new-window
compute+     647  0.0  0.0 208152 47132 ?        Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -parentBuildID 20241008180508 -prefsLen 20200 -prefMapSize 2334
compute+     673  0.1  0.1 2439440 105448 ?      Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -childID 1 -isForBrowser -prefsLen 20595 -prefMapSize 233450 -j
compute+     691  0.1  0.2 2460660 136152 ?      Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -childID 2 -isForBrowser -prefsLen 21795 -prefMapSize 233450 -j
compute+     731  0.1  0.1 2432572 119856 ?      Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -childID 3 -isForBrowser -prefsLen 21561 -prefMapSize 233450 -j
compute+     819  0.0  0.1 2382736 79416 ?       Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -childID 4 -isForBrowser -prefsLen 27146 -prefMapSize 233450 -j
compute+     821  0.0  0.1 2382736 79284 ?       Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -childID 5 -isForBrowser -prefsLen 27146 -prefMapSize 233450 -j
compute+     825  0.0  0.1 2382736 79276 ?       Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -childID 6 -isForBrowser -prefsLen 27146 -prefMapSize 233450 -j
compute+    1296  0.1  0.2 2518028 136440 ?      Sl   11:37   0:00 /usr/lib/firefox-esr/firefox-esr -new-window
compute+    1372  0.0  0.0 208152 45712 ?        Sl   11:38   0:00 /usr/lib/firefox-esr/firefox-esr -contentproc -parentBuildID 20241008180508 -prefsLen 19059 -prefMapSize 2328
compute+    1435  0.0  0.0 600828 24968 pts/0    S+   11:38   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+    1436  0.0  0.0 600828 24948 pts/0    S+   11:38   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+    1437  0.0  0.0 600828 24948 pts/0    S+   11:38   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+    1438  0.0  0.0 600828 24948 pts/0    S+   11:38   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+    1439  0.0  0.0 600828 24948 pts/0    S+   11:38   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+    1440  0.0  0.0 600828 24960 pts/0    S+   11:38   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 localhost:5900
compute+    1494  0.0  0.0   4728  3636 pts/1    Ss   11:39   0:00 /bin/bash
compute+    1599  0.0  0.0  34348 13368 pts/0    S+   11:40   0:00 x11vnc -display :1 -forever -shared -wait 50 -timeout 60 -noxrecord -noxfixes -noxdamage -rfbport 5900
compute+    1609  0.0  0.0   4496  1976 pts/0    S+   11:40   0:00 /bin/bash /home/computeruse/x11vnc_startup.sh
compute+    1613  0.0  0.0   2792  1500 pts/0    S+   11:40   0:00 sleep 5
compute+    1614  0.0  0.0   7064  2972 pts/1    R+   11:40   0:00 ps aux
computeruse@0cdbf3ca7193:~$ ls
computer_use_demo  http_server.py  mutter_startup.sh  start_all.sh    tint2_startup.sh   xvfb_startup.sh
entrypoint.sh      index.html      novnc_startup.sh   static_content  x11vnc_startup.sh
computeruse@0cdbf3ca7193:~$ ls /tmp
Temp-253b8fc8-6d76-4b3d-9929-b81446b6bee3  firefox-esr-esr115  outputs                              security_state   streamlit_stdout.log  x11vnc_stderr.log
Temp-dfbe767b-6b15-4591-8046-64207c0bf9f9  novnc.log           python-build.20241023113200.118.log  server_logs.txt  tmpaddon
computeruse@0cdbf3ca7193:~$ cat /tmp/x11vnc_stderr.log 

Main docker container logs:

~/workspace/anthropic-quickstarts/computer-use-demo main $ docker run \
    -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
    -v $HOME/.anthropic:/home/computeruse/.anthropic \
    -p 5900:5900 \
    -p 8501:8501 \
    -p 6080:6080 \
    -p 8080:8080 \
    -it computer-use-demo:local
Xvfb started successfully on display :1
Xvfb PID: 9
starting tint2 on display :1 ...
starting mutter
starting vnc
PORT=5900
starting noVNC
noVNC started successfully
✨ Computer Use Demo is ready!
➡  Open http://localhost:8080 in your browser to begin
[GFX1-]: glxtest: libpci missing
[GFX1-]: glxtest: libpci missing
x11vnc process crashed, restarting...
x11vnc stderr output:
23/10/2024 11:36:50 Got connection from client 127.0.0.1
23/10/2024 11:36:50   0 other clients
23/10/2024 11:36:50 webSocketsHandshake: unknown connection error
23/10/2024 11:36:50 Client 127.0.0.1 gone
23/10/2024 11:36:50 Statistics             events    Transmit/ RawEquiv ( saved)
23/10/2024 11:36:50  TOTALS              :      0 |         0/        0 (  0.0%)
23/10/2024 11:36:50 Statistics             events    Received/ RawEquiv ( saved)
23/10/2024 11:36:50  TOTALS              :      0 |         0/        0 (  0.0%)
23/10/2024 11:38:21 Got connection from client 127.0.0.1
23/10/2024 11:38:21   0 other clients
23/10/2024 11:38:21 Normal socket connection
23/10/2024 11:38:21 Disabled X server key autorepeat.
23/10/2024 11:38:21   to force back on run: 'xset r on' (3 times)
23/10/2024 11:38:21 incr accepted_client=1 for 127.0.0.1:37292  sock=6
23/10/2024 11:38:21 No valid client after 63 secs.
23/10/2024 11:38:21 Client Protocol Version 3.8
23/10/2024 11:38:21 Protocol version sent 3.8, using 3.8
23/10/2024 11:38:21 deleted 32 tile_row polling images.
23/10/2024 11:38:21 Restored X server key autorepeat to: 1
starting vnc
PORT=5900
x11vnc process crashed, restarting...
x11vnc stderr output:
23/10/2024 11:40:12 Got connection from client 127.0.0.1
23/10/2024 11:40:12   0 other clients
23/10/2024 11:40:12 Normal socket connection
23/10/2024 11:40:12 Disabled X server key autorepeat.
23/10/2024 11:40:12   to force back on run: 'xset r on' (3 times)
23/10/2024 11:40:12 incr accepted_client=1 for 127.0.0.1:42416  sock=6
23/10/2024 11:40:12 Client Protocol Version 3.8
23/10/2024 11:40:12 Protocol version sent 3.8, using 3.8
23/10/2024 11:40:12 No valid client after 63 secs.
23/10/2024 11:40:12 rfbProcessClientSecurityType: executing handler for type 1
23/10/2024 11:40:12 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
23/10/2024 11:40:12 deleted 32 tile_row polling images.
23/10/2024 11:40:12 Restored X server key autorepeat to: 1
starting vnc
PORT=5900
x11vnc process crashed, restarting...
x11vnc stderr output:
23/10/2024 11:41:17 No client after 60 secs.
23/10/2024 11:41:17 deleted 32 tile_row polling images.
starting vnc
PORT=5900
x11vnc process crashed, restarting...
x11vnc stderr output:
23/10/2024 11:42:24 No client after 60 secs.
23/10/2024 11:42:24 deleted 32 tile_row polling images.
starting vnc
PORT=5900
x11vnc process crashed, restarting...
x11vnc stderr output:
23/10/2024 11:43:31 No client after 60 secs.
23/10/2024 11:43:31 deleted 32 tile_row polling images.
starting vnc
PORT=5900

Tried building from latest commit a306792de96e69d29f231ddcb6534048b7e2489e as well as latest docker image:

ghcr.io/anthropics/anthropic-quickstarts                     computer-use-demo-latest   e11803f5a79d   14 hours ago     2.8GB
jd7h commented 3 weeks ago

Ran into the same issue with computer-use-demo-latest (computer-use-demo-a306792). Restarting the docker service or container did not help, but this worked for me:

TL;DR

I killed the x11vnc and x11vnc_startup.sh processes. Then I restarted x11vnc with x11vnc -display :1 -forever -shared -nopw -rfbport 5900 directly in the docker container. After that I could succesfully connect in the demo app and via NoVNC.

Longer version:

Start docker container. Same as demo docs, but with added WIDTH and HEIGHT env variables.

sudo docker run \
     -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
     -v $HOME/.anthropic:/home/computeruse/.anthropic \
     -p 5900:5900 \
     -p 8501:8501 \
     -p 6080:6080 \
     -p 8080:8080 \
     -e WIDTH=1024 \
     -e HEIGHT=768 \
     -it \
     ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest

Open bash in the docker container:

$ docker ps
CONTAINER ID   IMAGE                                                               COMMAND             CREATED          STATUS          PORTS                                                                                                                                                                        NAMES
627080a1822b   ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest   "./entrypoint.sh"   4 minutes ago   Up 4 minutes   0.0.0.0:5900->5900/tcp, :::5900->5900/tcp, 0.0.0.0:6080->6080/tcp, :::6080->6080/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp, 0.0.0.0:8501->8501/tcp, :::8501->8501/tcp   funny_heisenberg

$ docker exec -it 627080a1822b /bin/bash

Kill the x11vnc and x11vnc_startup.sh processes that were triggered by docker run:

computeruse@627080a1822b:~$ ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
compute+       1  0.0  0.0   4496  3544 pts/0    Ss+  14:15   0:00 /bin/bash ./entrypoint.sh
compute+       9  0.0  0.1 219720 77080 pts/0    S+   14:15   0:00 Xvfb :1 -ac -screen 0 1024x768x24 -retro -dpi 96 -nolisten tcp -nolisten unix
compute+      18  0.0  0.0 221944 23488 pts/0    S+   14:15   0:00 tint2 -c /home/computeruse/.config/tint2/tint2rc
compute+      93  0.0  0.1 2628328 128364 pts/0  Sl+  14:15   0:00 mutter --replace --sm-disable
compute+     203  0.0  0.0   4496  3324 pts/0    S+   14:15   0:00 bash /opt/noVNC/utils/novnc_proxy --vnc localhost:5900 --listen 6080 --web /opt/noVNC
compute+     214  0.2  0.0 535312 36556 pts/0    S+   14:15   0:01 /home/computeruse/.pyenv/versions/3.11.6/bin/python3 -m websockify --web /opt/noVNC 6080 lo
compute+     256  0.0  0.0  25372 19384 pts/0    S+   14:15   0:00 /home/computeruse/.pyenv/versions/3.11.6/bin/python http_server.py
compute+     257  0.3  0.1 666152 74304 pts/0    Sl+  14:15   0:02 /home/computeruse/.pyenv/versions/3.11.6/bin/python -m streamlit run computer_use_demo/stre
compute+     258  0.0  0.0   2824  1628 pts/0    S+   14:15   0:00 tail -f /dev/null
compute+    1530  0.0  0.0  34348 13760 pts/0    S+   14:24   0:00 x11vnc -display :1 -forever -shared -wait 50 -timeout 60 -noxrecord -noxfixes -noxdamage -r
compute+    1542  0.0  0.0   4496  2000 pts/0    S+   14:24   0:00 /bin/bash /home/computeruse/x11vnc_startup.sh
compute+    1594  0.0  0.0   2792  1596 pts/0    S+   14:25   0:00 sleep 5
compute+    1601  0.0  0.0   7064  2960 pts/5    R+   14:25   0:00 ps aux

computeruse@627080a1822b:~$ kill 1530
computeruse@627080a1822b:~$ kill 1542

After that I ran x11vnc like this, with fewer flags and -nopw to skip the no password warning banner.

computeruse@627080a1822b:~$ x11vnc -display :1 -forever -shared -nopw -rfbport 5900
23/10/2024 14:28:51 passing arg to libvncserver: -rfbport
23/10/2024 14:28:51 passing arg to libvncserver: 5900
23/10/2024 14:28:51 x11vnc version: 0.9.16 lastmod: 2019-01-05  pid: 1994
23/10/2024 14:28:51 Using X display :1
23/10/2024 14:28:51 rootwin: 0x50d reswin: 0x800001 dpy: 0x3eab2670
23/10/2024 14:28:51
23/10/2024 14:28:51 ------------------ USEFUL INFORMATION ------------------
23/10/2024 14:28:51 X DAMAGE available on display, using it for polling hints.
23/10/2024 14:28:51   To disable this behavior use: '-noxdamage'
23/10/2024 14:28:51
23/10/2024 14:28:51   Most compositing window managers like 'compiz' or 'beryl'
23/10/2024 14:28:51   cause X DAMAGE to fail, and so you may not see any screen
23/10/2024 14:28:51   updates via VNC.  Either disable 'compiz' (recommended) or
23/10/2024 14:28:51   supply the x11vnc '-noxdamage' command line option.
23/10/2024 14:28:51
23/10/2024 14:28:51 Wireframing: -wireframe mode is in effect for window moves.
23/10/2024 14:28:51   If this yields undesired behavior (poor response, painting
23/10/2024 14:28:51   errors, etc) it may be disabled:
23/10/2024 14:28:51    - use '-nowf' to disable wireframing completely.
23/10/2024 14:28:51    - use '-nowcr' to disable the Copy Rectangle after the
23/10/2024 14:28:51      moved window is released in the new position.
23/10/2024 14:28:51   Also see the -help entry for tuning parameters.
23/10/2024 14:28:51   You can press 3 Alt_L's (Left "Alt" key) in a row to
23/10/2024 14:28:51   repaint the screen, also see the -fixscreen option for
23/10/2024 14:28:51   periodic repaints.
23/10/2024 14:28:51
23/10/2024 14:28:51 XFIXES available on display, resetting cursor mode
23/10/2024 14:28:51   to: '-cursor most'.
23/10/2024 14:28:51   to disable this behavior use: '-cursor arrow'
23/10/2024 14:28:51   or '-noxfixes'.
23/10/2024 14:28:51 using XFIXES for cursor drawing.
23/10/2024 14:28:51 GrabServer control via XTEST.
23/10/2024 14:28:51
23/10/2024 14:28:51 Scroll Detection: -scrollcopyrect mode is in effect to
23/10/2024 14:28:51   use RECORD extension to try to detect scrolling windows
23/10/2024 14:28:51   (induced by either user keystroke or mouse input).
23/10/2024 14:28:51   If this yields undesired behavior (poor response, painting
23/10/2024 14:28:51   errors, etc) it may be disabled via: '-noscr'
23/10/2024 14:28:51   Also see the -help entry for tuning parameters.
23/10/2024 14:28:51   You can press 3 Alt_L's (Left "Alt" key) in a row to
23/10/2024 14:28:51   repaint the screen, also see the -fixscreen option for
23/10/2024 14:28:51   periodic repaints.
23/10/2024 14:28:51
23/10/2024 14:28:51 XKEYBOARD: number of keysyms per keycode 7 is greater
23/10/2024 14:28:51   than 4 and 51 keysyms are mapped above 4.
23/10/2024 14:28:51   Automatically switching to -xkb mode.
23/10/2024 14:28:51   If this makes the key mapping worse you can
23/10/2024 14:28:51   disable it with the "-noxkb" option.
23/10/2024 14:28:51   Also, remember "-remap DEAD" for accenting characters.
23/10/2024 14:28:51
23/10/2024 14:28:51 X FBPM extension not supported.
Xlib:  extension "DPMS" missing on display ":1".
23/10/2024 14:28:51 X display is not capable of DPMS.
23/10/2024 14:28:51 --------------------------------------------------------
23/10/2024 14:28:51
23/10/2024 14:28:51 Default visual ID: 0x21
23/10/2024 14:28:51 Read initial data from X display into framebuffer.
23/10/2024 14:28:51 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/4096
23/10/2024 14:28:51
23/10/2024 14:28:51 X display :1 is 32bpp depth=24 true color
23/10/2024 14:28:51
23/10/2024 14:28:51 Listening for VNC connections on TCP port 5900
23/10/2024 14:28:51 Listening for VNC connections on TCP6 port 5900
23/10/2024 14:28:51 listen6: bind: Address already in use
23/10/2024 14:28:51 Not listening on IPv6 interface.
23/10/2024 14:28:51
23/10/2024 14:28:51 Xinerama is present and active (e.g. multi-head).
23/10/2024 14:28:51 Xinerama: number of sub-screens: 1
23/10/2024 14:28:51 Xinerama: no blackouts needed (only one sub-screen)
23/10/2024 14:28:51
23/10/2024 14:28:51 fb read rate: 1736 MB/sec
23/10/2024 14:28:51 fast read: reset -wait  ms to: 10
23/10/2024 14:28:51 fast read: reset -defer ms to: 10
23/10/2024 14:28:51 The X server says there are 10 mouse buttons.
23/10/2024 14:28:51 screen setup finished.
23/10/2024 14:28:51

The VNC desktop is:      627080a1822b:0
PORT=5900

******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval.  It should work with any VNC viewer.  Try it by running:

    x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

After that I had my first succesful connects in NoVNC at http://localhost:6080/vnc.html and the demo app at https://localhost:8080.

[continuation output from x11vnc]
23/10/2024 14:31:04 Got connection from client 127.0.0.1
23/10/2024 14:31:04   0 other clients
23/10/2024 14:31:04 Normal socket connection
23/10/2024 14:31:04 Disabled X server key autorepeat.
23/10/2024 14:31:04   to force back on run: 'xset r on' (3 times)
23/10/2024 14:31:04 incr accepted_client=1 for 127.0.0.1:59838  sock=10
23/10/2024 14:32:30 Got connection from client 127.0.0.1
23/10/2024 14:32:30   1 other clients
23/10/2024 14:32:30 Normal socket connection
23/10/2024 14:32:30 incr accepted_client=2 for 127.0.0.1:59850  sock=11
23/10/2024 14:32:30 Client Protocol Version 3.8
23/10/2024 14:32:30 Protocol version sent 3.8, using 3.8
23/10/2024 14:32:30 rfbProcessClientSecurityType: executing handler for type 1
23/10/2024 14:32:30 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
23/10/2024 14:32:30 Client Protocol Version 3.8
23/10/2024 14:32:30 Protocol version sent 3.8, using 3.8
23/10/2024 14:32:30 rfbProcessClientSecurityType: executing handler for type 1
23/10/2024 14:32:30 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
23/10/2024 14:32:30 Pixel format for client 127.0.0.1:
23/10/2024 14:32:30   32 bpp, depth 24, little endian
23/10/2024 14:32:30   true colour: max r 255 g 255 b 255, shift r 0 g 8 b 16
23/10/2024 14:32:30 Pixel format for client 127.0.0.1:
23/10/2024 14:32:30   32 bpp, depth 24, little endian
23/10/2024 14:32:30   true colour: max r 255 g 255 b 255, shift r 0 g 8 b 16
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type tightPng
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000015)
23/10/2024 14:32:31 Using image quality level 6 for client 127.0.0.1
23/10/2024 14:32:31 Using JPEG subsampling 0, Q79 for client 127.0.0.1
23/10/2024 14:32:31 Using compression level 2 for client 127.0.0.1
23/10/2024 14:32:31 Enabling NewFBSize protocol extension for client 127.0.0.1
23/10/2024 14:32:31 Enabling LastRect protocol extension for client 127.0.0.1
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEFE)
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEFB)
23/10/2024 14:32:31 Enabling ExtDesktopSize protocol extension for client 127.0.0.1
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEC8)
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEC7)
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFECD)
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xC0A1E5CE)
23/10/2024 14:32:31 Enabling NewFBSize protocol extension for client 127.0.0.1
23/10/2024 14:32:31 Enabling LastRect protocol extension for client 127.0.0.1
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEFE)
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEFB)
23/10/2024 14:32:31 Enabling ExtDesktopSize protocol extension for client 127.0.0.1
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEC8)
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEC7)
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFECD)
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xC0A1E5CE)
23/10/2024 14:32:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x574D5664)
23/10/2024 14:32:31 Enabling full-color cursor updates for client 127.0.0.1
23/10/2024 14:32:31 Using tight encoding for client 127.0.0.1
23/10/2024 14:32:31 Sending rfbEncodingExtDesktopSize for size (1024x768)
23/10/2024 14:32:31 Sending rfbEncodingExtDesktopSize for size (1024x768)
23/10/2024 14:32:34 client_set_net: 127.0.0.1  0.0003
23/10/2024 14:32:34 client_set_net: 127.0.0.1  0.0000
23/10/2024 14:32:34 created   xdamage object: 0x800024
23/10/2024 14:32:40 created selwin: 0x800025
23/10/2024 14:32:40 called initialize_xfixes()
^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A
23/10/2024 14:34:33 client_count: 1
23/10/2024 14:34:33 Client 127.0.0.1 gone
23/10/2024 14:34:33 Statistics             events    Transmit/ RawEquiv ( saved)
23/10/2024 14:34:33  ServerCutText       :      1 |         8/        8 (  0.0%)
23/10/2024 14:34:33  FramebufferUpdate   :      3 |         0/        0 (  0.0%)
23/10/2024 14:34:33  LastRect            :      1 |        12/       12 (  0.0%)
23/10/2024 14:34:33  tight               :     17 |     87771/  3145940 ( 97.2%)
23/10/2024 14:34:33  RichCursor          :      3 |      3444/     3444 (  0.0%)
23/10/2024 14:34:33  ExtendedDesktopSize :      1 |        32/       32 (  0.0%)
23/10/2024 14:34:33  TOTALS              :     26 |     91267/  3149436 ( 97.1%)
23/10/2024 14:34:33 Statistics             events    Received/ RawEquiv ( saved)
23/10/2024 14:34:33  FramebufferUpdate   :      5 |        50/       50 (  0.0%)
23/10/2024 14:34:33  SetEncodings        :      1 |        92/       92 (  0.0%)
23/10/2024 14:34:33  SetPixelFormat      :      1 |        20/       20 (  0.0%)
23/10/2024 14:34:33  TOTALS              :      7 |       162/      162 (  0.0%)
23/10/2024 14:35:51 Got connection from client 127.0.0.1
23/10/2024 14:35:51   1 other clients
23/10/2024 14:35:51 Normal socket connection
23/10/2024 14:35:51 incr accepted_client=3 for 127.0.0.1:60634  sock=11
23/10/2024 14:35:51 Client Protocol Version 3.8
23/10/2024 14:35:51 Protocol version sent 3.8, using 3.8
rburhum commented 3 weeks ago

@jd7h solution worked for me too. It is running slow, but it works. I am going to play with the memory settings. Thanks all!

x5a commented 3 weeks ago

Thanks @jd7h for the investigation - while I can't reproduce this on my side, can you check that vnc this image works out of the box: ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-db8eb41 (cc @rburhum @achristianson and anyone else in this thread who was experiencing this persistently?)

i.e.,:

docker run \
    -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
    -v $HOME/.anthropic:/home/computeruse/.anthropic \
    -p 5900:5900 \
    -p 8501:8501 \
    -p 6080:6080 \
    -p 8080:8080 \
    -it ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-db8eb41
achristianson commented 3 weeks ago

image

Still getting "Connecting..."

I can add another data point, though, the original ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest works 100% fine on our k8s cluster (fairly vanilla containerd).

My laptop is running arch (updated today):

~ $ uname -a
Linux *** 6.11.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 17 Oct 2024 20:53:41 +0000 x86_64 GNU/Linux
~ $ docker -v
Docker version 27.3.1, build ce1223035a
rursache commented 3 weeks ago

@jd7h's solution worked for me but i had to be real patient, took about 3 minutes to "boot". thanks!

Ubuntu Mate 24.10
Linux 6.11.0-061100-generic x86_64 x86_64 x86_64 GNU/Linux
Docker version 26.1.0, build 9714adc

i would also raise the issue that the iframes are targeting localhost/127.0.0.1 however that won't work if the container runs in a machine and my base url is a custom IP/port ScreenShot 2024-10-24 at 15 15 58 simply changing the iframe urls with the developer tools fixes it tho (until refresh of course)

jd7h commented 3 weeks ago
  1. I'm running Arch Linux just like @achristianson, with Docker version 27.3.1, build ce1223035a
  2. @x5a: can confirm that the docker image ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-db8eb41 works out of the box (for me)
  3. Connecting to the vnc server takes 2-3 minutes.
sdepablos commented 2 weeks ago
  1. Another running Arch Linux like @achristianson Linux *** 6.1.112-1-MANJARO #1 SMP PREEMPT_DYNAMIC Mon Sep 30 19:15:46 UTC 2024 x86_64 GNU/Linux with Docker version 27.2.1, build 9e34c9bb39
  2. @x5a, I can confirm it too that ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-db8eb41 works for me to
  3. Connecting to the vnc takes at least 3 minutes.
  4. I've also tried the latest image with the #93 fix by @jd7h applied without success
beliashou commented 1 week ago

My computer turned out to be too slow, so it took about half an hour for the virtual machine to boot up. During all that time I had this error, and then the desktop appeared. :-)