cua icon indicating copy to clipboard operation
cua copied to clipboard

Can't connect to computer-server in luma

Open Ivkaa opened this issue 6 months ago • 5 comments

Hello, I managed to run everything, but when trying to connect to computer-server at luma-ip:8000 it doesn't exist. I tried connecting to the server outside the app on my pc and in docker but it seems like it's not exposed by the luma itself. In luma VM though, the server at localhost:8000 work (I opened it up in safari through the screen share window).

I am running it through the setup script in readme:

# Requires Docker
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/scripts/playground-docker.sh)"

Getting this error:

result CompletedProcess(args="curl --connect-timeout 15 --max-time 20 -s -f 'http://host.docker.internal:7777/lume/vms/macos-sequoia-cua_latest'", returncode=0, stdout='{"cpuCount":4,"memorySize":8589934592,"status":"running","ipAddress":"192.168.64.2","vncUrl":"vnc:\\/\\/:[email protected]:62527","locationName":"default","name":"macos-sequoia-cua_latest","display":"1024x768","diskSize":{"allocated":43209637888,"total":85899345920},"os":"macOS"}', stderr='')
INFO:computer.providers.lume_api:Successfully parsed VM status: running
INFO:computer.providers.lume.provider:VM macos-sequoia-cua_latest status: running
INFO:computer.providers.lume.provider:Got valid VM IP address: 192.168.64.2
INFO:computer:VM macos-sequoia-cua_latest has IP address: 192.168.64.2
INFO:computer:VM is ready with IP: 192.168.64.2
INFO:computer:Initializing interface for macos at 192.168.64.2
Creating interface for OS: macos at IP: 192.168.64.2
INFO:cua.interface:Logger set to INFO level
INFO:computer.interface.macos:Logger set to INFO level
INFO:computer:Connecting to WebSocket interface...
INFO:computer.interface.macos:Waiting for Computer API Server to be ready (timeout: 30s)...
INFO:computer.interface.macos:Attempting WebSocket connection to ws://192.168.64.2:8000/ws
WARNING:computer.interface.macos:Computer API Server connection lost. Will retry automatically.
Mapping Qwen2.5-VL-7B-Instruct and ANTHROPIC to anthropic, claude-3-7-sonnet-20250219, anthropic
INFO:computer.interface.macos:Still waiting for Computer API Server... (elapsed: 10.0s, attempts: 11)
INFO:computer.interface.macos:Still waiting for Computer API Server... (elapsed: 20.0s, attempts: 21)

I'm trying to get this running whole weekend, please help.. it looks like such a cool project.

Ivkaa avatar Jun 29 '25 15:06 Ivkaa

@Ivkaa - the logs look fine - INFO:computer.interface.macos:Still waiting for Computer API Server... (elapsed: 20.0s, attempts: 21).. is expected unless running for many minutes - this is the client process from within the container trying to reach the computer-server /cc @ddupont808

f-trycua avatar Jul 01 '25 18:07 f-trycua

It never connected though, and the server isn't available when trying to reach it manually from docker itself, so it won't connect.

Ivkaa avatar Jul 02 '25 11:07 Ivkaa

Ping

Ivkaa avatar Jul 06 '25 14:07 Ivkaa

It seems the container is able to reach lume but there is either an issue with the computer-server not being available in the lume VM or lume isn't exposing the VM's port

Can you try accessing the VM through VNC / the screen share window and running this command within the VM?

. ~/run_computer_server.sh

And could you also verify that the computer-server is reachable from a Safari window on your host PC (the mac running lume)? This can be done by opening http://192.168.64.2:8000/ in Safari (you may have to do lume ls to get the correct IP)

ddupont808 avatar Jul 07 '25 16:07 ddupont808

I found that recently the computer server script has an issue importing the (very old and deprecated) pkg_resources module. You can work around this by adding setuptools to the pip install line in on_startup.sh.

Eventually the base mac_os image would have to be fixed upstream though.

ngaloppo avatar Jul 11 '25 17:07 ngaloppo