OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: Devin starts but "Initializing agent" never completes

Open cope opened this issue 9 months ago • 24 comments

Is there an existing issue for the same bug?

  • [X] I have checked the troubleshooting document at https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting
  • [X] I have checked the existing issues.

Describe the bug

I've created a minimal docker-compose.yml file with nginx, ollama and opendevin. nginx works fine ollama works fine and is accessible through a defined url

devin is also accessible through a defined url, but does not work :(

The Initializing agent message stays forever.

Current Version

image: ghcr.io/opendevin/opendevin:main

Installation and Configuration

docker-compose.yml:


version: '3'
services:
  nginx:
    image: nginx:stable
    volumes:
      - /var/deploy/ai/ssl:/etc/nginx/ssl:ro
      - /var/deploy/ai/default.conf:/etc/nginx/conf.d/default.conf
      - /var/deploy/ai/nginx_error_ollama.log:/var/log/nginx/nginx_error_ollama.log
      - /var/deploy/ai/nginx_access_ollama.log:/var/log/nginx/nginx_access_ollama.log
    ports:
      - 80:80
      - 443:443

  ollama:
    image: ollama/ollama
    depends_on:
      - nginx
    volumes:
      - /var/deploy/ai/.ollama:/root/.ollama
    ports:
      - 11434:11434

  devin:
    image: ghcr.io/opendevin/opendevin:main
    depends_on:
      - nginx
      - ollama
    environment:
      - SANDBOX_USER_ID=1003
      - LLM_API_KEY=ollama
      - LLM_BASE_URL=https://ollama.myurl.com
      - WORKSPACE_MOUNT_PATH=/var/deploy/ai/.devin
    volumes:
      - /var/deploy/ai/.devin:/opt/workspace_base
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 3000:3000


### Model and Agent

- Model: ollama/codellama:7b
- Agent: CoderAgent (but same was with CodeActAgent)

### Reproduction Steps

docker stack deploy --compose-file docker-compose.yml ollama

Ollama is running on the URL defined in docker-compose.yml
![image](https://github.com/OpenDevin/OpenDevin/assets/112515/ceebb02b-6318-4889-aaeb-f4181b3dd233)


### Logs, Errors, Screenshots, and Additional Context

2024-05-08T15:16:47.695410463Z Docker socket group id: 999 2024-05-08T15:16:49.901018887Z /app/.venv/lib/python3.12/site-packages/pydantic/_internal/fields.py:160: UserWarning: Field "model_group_retry_policy" has conflict with protected namespace "model". 2024-05-08T15:16:49.901070661Z 2024-05-08T15:16:49.901081936Z You may be able to resolve this warning by setting model_config['protected_namespaces'] = (). 2024-05-08T15:16:49.901092201Z warnings.warn( 2024-05-08T15:16:53.798649397Z INFO: Started server process [34] 2024-05-08T15:16:53.798694935Z INFO: Waiting for application startup. 2024-05-08T15:16:53.798706036Z INFO: Application startup complete. 2024-05-08T15:16:53.799321574Z INFO: Uvicorn running on http://0.0.0.0:3000 (Press CTRL+C to quit) 2024-05-08T15:17:23.575123303Z INFO: 10.0.2.4:57952 - "GET /index.html HTTP/1.1" 304 Not Modified 2024-05-08T15:17:24.152844419Z INFO: 10.0.2.4:57954 - "GET /api/refresh-files HTTP/1.1" 200 OK 2024-05-08T15:17:24.161525313Z INFO: 10.0.2.4:57956 - "GET /api/litellm-models HTTP/1.1" 200 OK 2024-05-08T15:17:24.163580033Z INFO: 10.0.2.4:57958 - "GET /api/messages/total HTTP/1.1" 200 OK 2024-05-08T15:17:24.309306619Z INFO: 10.0.2.4:57960 - "GET /api/agents HTTP/1.1" 200 OK 2024-05-08T15:18:18.404004223Z INFO: 10.0.2.4:57962 - "GET /index.html HTTP/1.1" 200 OK 2024-05-08T15:18:18.600520737Z INFO: 10.0.2.4:57964 - "GET /assets/index-9kp8GIUN.js HTTP/1.1" 200 OK 2024-05-08T15:18:18.617938472Z INFO: 10.0.2.4:57968 - "GET /assets/index-ctxjF_hh.css HTTP/1.1" 200 OK 2024-05-08T15:18:20.366408998Z INFO: 10.0.2.4:57970 - "GET /locales/en/translation.json HTTP/1.1" 200 OK 2024-05-08T15:18:20.397252776Z INFO: 10.0.2.4:57972 - "GET /favicon-32x32.png HTTP/1.1" 200 OK 2024-05-08T15:18:20.532211497Z INFO: 10.0.2.4:57976 - "GET /api/refresh-files HTTP/1.1" 200 OK 2024-05-08T15:18:20.540485648Z INFO: 10.0.2.4:57978 - "GET /api/litellm-models HTTP/1.1" 200 OK 2024-05-08T15:18:20.542335080Z INFO: 10.0.2.4:57980 - "GET /api/messages/total HTTP/1.1" 200 OK 2024-05-08T15:18:20.689050575Z INFO: 10.0.2.4:57982 - "GET /api/agents HTTP/1.1" 200 OK 2024-05-08T15:18:23.308812766Z 15:18:23 - opendevin:ERROR: listen.py:143 - Error opening file : [Errno 21] Is a directory: '/opt/workspace_base' 2024-05-08T15:18:23.309469028Z INFO: 10.0.2.4:57984 - "GET /api/select-file?file= HTTP/1.1" 500 Internal Server Error

cope avatar May 08 '24 15:05 cope

Looks like you're using docker-compose--does it work if you use docker run like in the README?

rbren avatar May 08 '24 19:05 rbren

I'm trying to run with docker run like in README and getting into the same issue. Browser console is showing error connecting to websocket:

Firefox can’t establish a connection to the server at ws://0.0.0.0:3000/ws?Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. [web-client-content-script.js:2:366371](moz-extension://65f3acf7-5607-470d-8e0a-145affea7152/web-client-content-script.js)
Firefox can’t establish a connection to the server at ws://localhost:3000/ws?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiI0MDA4ZjNlOC1hM2Q0LTQ5ZDQtOWM1MS0yOWQwOWIyOGMxZDQifQ.KoMiz4AzJ2QSV45Dtv7PBVRyihdFcyQ6wKSR248rG5E. [index-BNujsEV6.js:318:33607](http://localhost:3000/assets/index-BNujsEV6.js)
Feature Policy: Skipping unsupported feature name “clipboard-write”. [web-client-content-script.js:2:41997](moz-extension://65f3acf7-5607-470d-8e0a-145affea7152/web-client-content-script.js)
Feature Policy: Skipping unsupported feature name “clipboard-write”. [web-client-content-script.js:2:42222](moz-extension://65f3acf7-5607-470d-8e0a-145affea7152/web-client-content-script.js)
Feature Policy: Skipping unsupported feature name “clipboard-write”. [web-client-content-script.js:2:294033](moz-extension://65f3acf7-5607-470d-8e0a-145affea7152/web-client-content-script.js)
Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. [webclient-infield.html](moz-extension://65f3acf7-5607-470d-8e0a-145affea7152/webclient-infield.html)
MouseEvent.mozInputSource is deprecated. Use PointerEvent.pointerType instead. [index-BNujsEV6.js:48:17153](http://localhost:3000/assets/index-BNujsEV6.js)
stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior. 15 [index-BNujsEV6.js:48:41127](http://localhost:3000/assets/index-BNujsEV6.js)

Command to run OpenDevin:

docker run \
    --add-host host.docker.internal:host-gateway \
    -e SANDBOX_USER_ID=$(id -u) \
    -e LLM_API_KEY="ollama" \
    -e LLM_BASE_URL="http://host.docker.internal:11434/" \
    -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
    -v $WORKSPACE_BASE:/opt/workspace_base \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -p 3000:3000 \
    --name devin \
    ghcr.io/opendevin/opendevin:main
Docker socket group id: 0
/app/.venv/lib/python3.12/site-packages/pydantic/_internal/_fields.py:160: UserWarning: Field "model_group_retry_policy" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
  warnings.warn(
INFO:     Started server process [33]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:3000 (Press CTRL+C to quit)

Tried with the same command but different image versions - same result:

ghcr.io/opendevin/opendevin:0.5
ghcr.io/opendevin/opendevin
ghcr.io/opendevin/opendevin:main

Running on mac

% uname -a
Darwin nmbp-m3.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:11:08 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8122 arm64

Communication ok from the container to ollama:

docker exec devin curl http://host.docker.internal:11434/api/generate -d '{"model":"codellama:7b","prompt":"howday"}'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   717    0   675  100    42    131      8  0:00:05  0:00:05 --:--:--   172
{"model":"codellama:7b","created_at":"2024-05-09T10:12:18.712224Z","response":" ","done":false}
{"model":"codellama:7b","created_at":"2024-05-09T10:12:18.764667Z","response":" Hello","done":false}
{"model":"codellama:7b","created_at":"2024-05-09T10:12:18.811201Z","response":"!","done":false}
{"model":"codellama:7b","created_at":"2024-05-09T10:12:18.862914Z","response":"","done":true,"context":[518,25580,29962,3532,14816,29903,29958,5299,829,14816,29903,6778,13,13,3525,3250,518,29914,25580,29962,13,29871,15043,29991],"total_duration":5115542666,"load_duration":4766585083,"prompt_eval_count":22,"prompt_eval_duration":194876000,"eval_count":4,"eval_duration":150648000}

test with websocat

Commands:

docker exec devin websocat 'ws://localhost:3000/ws?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiI0MDA4ZjNlOC1hM2Q0LTQ5ZDQtOWM1MS0yOWQwOWIyOGMxZDQifQ.KoMiz4AzJ2QSV45Dtv7PBVRyihdFcyQ6wKSR248rG5E'

 websocat 'ws://localhost:3000/ws?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiI0MDA4ZjNlOC1hM2Q0LTQ5ZDQtOWM1MS0yOWQwOWIyOGMxZDQifQ.KoMiz4AzJ2QSV45Dtv7PBVRyihdFcyQ6wKSR248rG5E'
^C

output

INFO:     ('127.0.0.1', 45218) - "WebSocket /ws?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiI0MDA4ZjNlOC1hM2Q0LTQ5ZDQtOWM1MS0yOWQwOWIyOGMxZDQifQ.KoMiz4AzJ2QSV45Dtv7PBVRyihdFcyQ6wKSR248rG5E" [accepted]
INFO:     connection open
10:48:23 - opendevin:INFO: session.py:40 - WebSocket disconnected, sid: 4008f3e8-a3d4-49d4-9c51-29d09b28c1d4
INFO:     connection closed
INFO:     ('192.168.65.1', 26686) - "WebSocket /ws?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiI0MDA4ZjNlOC1hM2Q0LTQ5ZDQtOWM1MS0yOWQwOWIyOGMxZDQifQ.KoMiz4AzJ2QSV45Dtv7PBVRyihdFcyQ6wKSR248rG5E" [accepted]
INFO:     connection open
10:48:52 - opendevin:INFO: session.py:40 - WebSocket disconnected, sid: 4008f3e8-a3d4-49d4-9c51-29d09b28c1d4
INFO:     connection closed

navado avatar May 09 '24 10:05 navado

Getting the exact same error on exact same setup

adityathakker avatar May 10 '24 01:05 adityathakker

Thanks for all that info @navado! Super helpful

So IIRC, the container runs, and starts the server. You can load the FE, but the FE claims it can't connect to the websocket. And websocat does connect to the websocket

If that's right, I'd say next order of business is to investigate the /ws call in your browser's networking tab. Can you grab some screenshots of everything there?

rbren avatar May 10 '24 02:05 rbren

Well, no ws calls happen.

navado avatar May 10 '24 07:05 navado

@navado thank you for this info, it clarifies my problem, I believe. @rbren I didn't have a chance to try until today, but given @navado's findings I think the problem is clear since I was opening "devin.myurl.com" in my browser and the frontend is trying to connect to localhost instead...

Regarding the ws 0.0.0.0 problem, maybe the issue is that the backend is listening on 127 and should probably listen on 0.0.0.0 instead?

However, it would be GREAT if we had something like BACKEND_BASE_URL to set at startup (or whatever other naming is prefered, i don't care) to tell the frontend what to use? Default may be localhost or 127.0.0.1, but I would like to use my full url, instead.

cope avatar May 10 '24 10:05 cope

port 3000 listening on 0.0.0.0 in Devin container

# netstat -an |grep 3000
tcp        0      0 0.0.0.0:3000            0.0.0.0:*               LISTEN 

I'd bid on a problem in front-end that is not tracking base URL properly at all the parts, but didn't dig to the code base yet (my JS/TS abilities very limited)

navado avatar May 10 '24 11:05 navado

similar issue. I get error "/app/.venv/lib/python3.12/site-packages/pydantic/_internal/fields.py:160: UserWarning: Field "model_group_retry_policy" has conflict with protected namespace "model".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = (). warnings.warn(". The interface is accessible, and I can chat with it, but it can't access the workspace (which is visible in the interface).

In the log I see "11:49:33 - opendevin:INFO: mixin.py:40 - Plugin swe_agent_commands initialized successfully :WARNING: The directory '/home/opendevin/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag."

ArielAssaf avatar May 10 '24 11:05 ArielAssaf

@cope @navado , FYI, you can run it without the front end using the command python opendevin/main.py -d ./workspace1 -t "Write a bash script to print 5" by appending with the docker command or run it in the container shell using docker exec

SmartManoj avatar May 10 '24 13:05 SmartManoj

# python opendevin/core/main.py  -d ./workspace1 -t "Write a bash script to print 5" 2>&1 |tee output.log

/app/.venv/lib/python3.12/site-packages/pydantic/_internal/_fields.py:160: UserWarning: Field "model_group_retry_policy" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
  warnings.warn(
13:41:16 - opendevin:INFO: llm.py:82 - Initializing LLM with model: gpt-3.5-turbo-1106
13:41:16 - opendevin:INFO: ssh_box.py:69 - SSHBox is running as opendevin user with USER_ID=501 in the sandbox
13:41:16 - opendevin:INFO: ssh_box.py:395 - Container stopped
13:41:16 - opendevin:WARNING: ssh_box.py:407 - Using port forwarding for Mac OS. Server started by OpenDevin will not be accessible from the host machine at the moment. See https://github.com/OpenDevin/OpenDevin/issues/897 for more information.
13:41:16 - opendevin:INFO: ssh_box.py:416 - Mounting workspace directory: /Users/borissorochkin/code/workspace
13:41:17 - opendevin:INFO: ssh_box.py:437 - Container started
13:41:18 - opendevin:INFO: ssh_box.py:453 - waiting for container to start: 1, container status: running
13:41:18 - opendevin:INFO: ssh_box.py:210 - Connecting to [email protected] via ssh. If you encounter any issues, you can try `ssh -v -p 57311 [email protected]` with the password '9ff63116-318d-4491-aaf7-879e34ce6c90' and report the issue on GitHub. If you started OpenDevin with `docker run`, you should try `ssh -v -p 57311 opendevin@localhost` with the password '9ff63116-318d-4491-aaf7-879e34ce6c90 on the host machine (where you started the container).
13:41:19 - opendevin:INFO: mixin.py:24 - Copied files from [/app/opendevin/runtime/plugins/jupyter] to [/opendevin/plugins/jupyter] inside sandbox.
13:41:19 - opendevin:INFO: mixin.py:32 - Initializing plugin [jupyter] by executing [/opendevin/plugins/jupyter/setup.sh] in the sandbox.
13:41:21 - opendevin:INFO: mixin.py:40 - Plugin jupyter initialized successfully
:Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: jupyterlab in /usr/local/lib/python3.10/dist-packages (4.1.8)
Requirement already satisfied: notebook in /usr/local/lib/python3.10/dist-packages (7.1.3)
Requirement already satisfied: jupyter_kernel_gateway in /usr/local/lib/python3.10/dist-packages (3.0.1)
Requirement already satisfied: async-lru>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (2.0.4)
Requirement already satisfied: httpx>=0.25.0 in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (0.27.0)
Requirement already satisfied: ipykernel>=6.5.0 in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (6.29.4)
Requirement already satisfied: jinja2>=3.0.3 in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (3.1.3)
Requirement already satisfied: jupyter-core in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (5.7.2)
Requirement already satisfied: jupyter-lsp>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (2.2.5)
Requirement already satisfied: jupyter-server<3,>=2.4.0 in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (2.14.0)
Requirement already satisfied: jupyterlab-server<3,>=2.27.1 in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (2.27.1)
Requirement already satisfied: notebook-shim>=0.2 in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (0.2.4)
Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (24.0)
Requirement already satisfied: tomli>=1.2.2 in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (2.0.1)
Requirement already satisfied: tornado>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (6.4)
Requirement already satisfied: traitlets in /usr/local/lib/python3.10/dist-packages (from jupyterlab) (5.14.3)
Requirement already satisfied: jupyter-client>=8.6 in /usr/local/lib/python3.10/dist-packages (from jupyter_kernel_gateway) (8.6.1)
Requirement already satisfied: requests>=2.31 in /usr/local/lib/python3.10/dist-packages (from jupyter_kernel_gateway) (2.31.0)
Requirement already satisfied: typing-extensions>=4.0.0 in /usr/local/lib/python3.10/dist-packages (from async-lru>=1.0.0->jupyterlab) (4.11.0)
Requirement already satisfied: anyio in /usr/local/lib/python3.10/dist-packages (from httpx>=0.25.0->jupyterlab) (4.3.0)
Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx>=0.25.0->jupyterlab) (2024.2.2)
Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.10/dist-packages (from httpx>=0.25.0->jupyterlab) (1.0.5)
Requirement already satisfied: idna in /usr/local/lib/python3.10/dist-packages (from httpx>=0.25.0->jupyterlab) (3.7)
Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx>=0.25.0->jupyterlab) (1.3.1)
Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.10/dist-packages (from httpcore==1.*->httpx>=0.25.0->jupyterlab) (0.14.0)
Requirement already satisfied: comm>=0.1.1 in /usr/local/lib/python3.10/dist-packages (from ipykernel>=6.5.0->jupyterlab) (0.2.2)
Requirement already satisfied: debugpy>=1.6.5 in /usr/local/lib/python3.10/dist-packages (from ipykernel>=6.5.0->jupyterlab) (1.8.1)
Requirement already satisfied: ipython>=7.23.1 in /usr/local/lib/python3.10/dist-packages (from ipykernel>=6.5.0->jupyterlab) (8.24.0)
Requirement already satisfied: matplotlib-inline>=0.1 in /usr/local/lib/python3.10/dist-packages (from ipykernel>=6.5.0->jupyterlab) (0.1.7)
Requirement already satisfied: nest-asyncio in /usr/local/lib/python3.10/dist-packages (from ipykernel>=6.5.0->jupyterlab) (1.6.0)
Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from ipykernel>=6.5.0->jupyterlab) (5.9.8)
Requirement already satisfied: pyzmq>=24 in /usr/local/lib/python3.10/dist-packages (from ipykernel>=6.5.0->jupyterlab) (26.0.3)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2>=3.0.3->jupyterlab) (2.1.5)
Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from jupyter-client>=8.6->jupyter_kernel_gateway) (2.9.0.post0)
Requirement already satisfied: platformdirs>=2.5 in /usr/local/lib/python3.10/dist-packages (from jupyter-core->jupyterlab) (4.2.1)
Requirement already satisfied: argon2-cffi>=21.1 in /usr/local/lib/python3.10/dist-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (23.1.0)
Requirement already satisfied: jupyter-events>=0.9.0 in /usr/local/lib/python3.10/dist-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (0.10.0)
Requirement already satisfied: jupyter-server-terminals>=0.4.4 in /usr/local/lib/python3.10/dist-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (0.5.3)
Requirement already satisfied: nbconvert>=6.4.4 in /usr/local/lib/python3.10/dist-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (7.16.4)
Requirement already satisfied: nbformat>=5.3.0 in /usr/local/lib/python3.10/dist-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (5.10.4)
Requirement already satisfied: overrides>=5.0 in /usr/local/lib/python3.10/dist-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (7.7.0)
Requirement already satisfied: prometheus-client>=0.9 in /usr/local/lib/python3.10/dist-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (0.20.0)
Requirement already satisfied: send2trash>=1.8.2 in /usr/local/lib/python3.10/dist-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (1.8.3)
Requirement already satisfied: terminado>=0.8.3 in /usr/local/lib/python3.10/dist-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (0.18.1)
Requirement already satisfied: websocket-client>=1.7 in /usr/local/lib/python3.10/dist-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (1.8.0)
Requirement already satisfied: babel>=2.10 in /usr/local/lib/python3.10/dist-packages (from jupyterlab-server<3,>=2.27.1->jupyterlab) (2.14.0)
Requirement already satisfied: json5>=0.9.0 in /usr/local/lib/python3.10/dist-packages (from jupyterlab-server<3,>=2.27.1->jupyterlab) (0.9.25)
Requirement already satisfied: jsonschema>=4.18.0 in /usr/local/lib/python3.10/dist-packages (from jupyterlab-server<3,>=2.27.1->jupyterlab) (4.22.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.31->jupyter_kernel_gateway) (3.3.2)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.31->jupyter_kernel_gateway) (2.2.1)
Requirement already satisfied: exceptiongroup>=1.0.2 in /usr/local/lib/python3.10/dist-packages (from anyio->httpx>=0.25.0->jupyterlab) (1.2.1)
Requirement already satisfied: argon2-cffi-bindings in /usr/local/lib/python3.10/dist-packages (from argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->jupyterlab) (21.2.0)
Requirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab) (5.1.1)
Requirement already satisfied: jedi>=0.16 in /usr/local/lib/python3.10/dist-packages (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab) (0.19.1)
Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.41 in /usr/local/lib/python3.10/dist-packages (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab) (3.0.43)
Requirement already satisfied: pygments>=2.4.0 in /usr/local/lib/python3.10/dist-packages (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab) (2.17.2)
Requirement already satisfied: stack-data in /usr/local/lib/python3.10/dist-packages (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab) (0.6.3)
Requirement already satisfied: pexpect>4.3 in /usr/local/lib/python3.10/dist-packages (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab) (4.9.0)
Requirement already satisfied: attrs>=22.2.0 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->jupyterlab) (23.2.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->jupyterlab) (2023.12.1)
Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->jupyterlab) (0.35.1)
Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->jupyterlab) (0.18.0)
Requirement already satisfied: python-json-logger>=2.0.4 in /usr/local/lib/python3.10/dist-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (2.0.7)
Requirement already satisfied: pyyaml>=5.3 in /usr/local/lib/python3.10/dist-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (6.0.1)
Requirement already satisfied: rfc3339-validator in /usr/local/lib/python3.10/dist-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (0.1.4)
Requirement already satisfied: rfc3986-validator>=0.1.1 in /usr/local/lib/python3.10/dist-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (0.1.1)
Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.10/dist-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (4.12.3)
Requirement already satisfied: bleach!=5.0.0 in /usr/local/lib/python3.10/dist-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (6.1.0)
Requirement already satisfied: defusedxml in /usr/local/lib/python3.10/dist-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (0.7.1)
Requirement already satisfied: jupyterlab-pygments in /usr/local/lib/python3.10/dist-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (0.3.0)
Requirement already satisfied: mistune<4,>=2.0.3 in /usr/local/lib/python3.10/dist-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (3.0.2)
Requirement already satisfied: nbclient>=0.5.0 in /usr/local/lib/python3.10/dist-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (0.10.0)
Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.10/dist-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (1.5.1)
Requirement already satisfied: tinycss2 in /usr/local/lib/python3.10/dist-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (1.3.0)
Requirement already satisfied: fastjsonschema>=2.15 in /usr/local/lib/python3.10/dist-packages (from nbformat>=5.3.0->jupyter-server<3,>=2.4.0->jupyterlab) (2.19.1)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->jupyter-client>=8.6->jupyter_kernel_gateway) (1.16.0)
Requirement already satisfied: ptyprocess in /usr/local/lib/python3.10/dist-packages (from terminado>=0.8.3->jupyter-server<3,>=2.4.0->jupyterlab) (0.7.0)
Requirement already satisfied: webencodings in /usr/local/lib/python3.10/dist-packages (from bleach!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (0.5.1)
Requirement already satisfied: parso<0.9.0,>=0.8.3 in /usr/local/lib/python3.10/dist-packages (from jedi>=0.16->ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab) (0.8.4)
Requirement already satisfied: fqdn in /usr/local/lib/python3.10/dist-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (1.5.1)
Requirement already satisfied: isoduration in /usr/local/lib/python3.10/dist-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (20.11.0)
Requirement already satisfied: jsonpointer>1.13 in /usr/local/lib/python3.10/dist-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (2.4)
Requirement already satisfied: uri-template in /usr/local/lib/python3.10/dist-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (1.3.0)
Requirement already satisfied: webcolors>=1.11 in /usr/local/lib/python3.10/dist-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (1.13)
Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from prompt-toolkit<3.1.0,>=3.0.41->ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab) (0.2.13)
Requirement already satisfied: cffi>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from argon2-cffi-bindings->argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->jupyterlab) (1.16.0)
Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.10/dist-packages (from beautifulsoup4->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (2.5)
Requirement already satisfied: executing>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from stack-data->ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab) (2.0.1)
Requirement already satisfied: asttokens>=2.1.0 in /usr/local/lib/python3.10/dist-packages (from stack-data->ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab) (2.4.1)
Requirement already satisfied: pure-eval in /usr/local/lib/python3.10/dist-packages (from stack-data->ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab) (0.2.2)
Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->jupyterlab) (2.22)
Requirement already satisfied: arrow>=0.15.0 in /usr/local/lib/python3.10/dist-packages (from isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (1.3.0)
Requirement already satisfied: types-python-dateutil>=2.8.10 in /usr/local/lib/python3.10/dist-packages (from arrow>=0.15.0->isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (2.9.0.20240316)
JupyterKernelGateway started with PID: 91
Execution server started with PID: 92
Jupyter kernel ready.
13:41:21 - opendevin:INFO: mixin.py:24 - Copied files from [/app/opendevin/runtime/plugins/swe_agent_commands] to [/opendevin/plugins/swe_agent_commands] inside sandbox.
13:41:21 - opendevin:INFO: mixin.py:32 - Initializing plugin [swe_agent_commands] by executing [/opendevin/plugins/swe_agent_commands/setup_default.sh] in the sandbox.
13:41:22 - opendevin:INFO: mixin.py:40 - Plugin swe_agent_commands initialized successfully
:Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: flake8 in /usr/local/lib/python3.10/dist-packages (7.0.0)
Requirement already satisfied: mccabe<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from flake8) (0.7.0)
Requirement already satisfied: pycodestyle<2.12.0,>=2.11.0 in /usr/local/lib/python3.10/dist-packages (from flake8) (2.11.1)
Requirement already satisfied: pyflakes<3.3.0,>=3.2.0 in /usr/local/lib/python3.10/dist-packages (from flake8) (3.2.0)
13:41:22 - opendevin:INFO: mixin.py:50 - Sourced ~/.bashrc successfully
13:41:22 - opendevin:INFO: browser_env.py:38 - Starting browser env...
Setting workspace base to /app/workspace1
Running agent CodeActAgent (model: gpt-3.5-turbo-1106) with task: "Write a bash script to print 5"
13:41:22 - opendevin:INFO: agent_controller.py:192 - Setting agent state from AgentState.LOADING to AgentState.INIT
13:41:22 - opendevin:INFO: agent_controller.py:192 - Setting agent state from AgentState.INIT to AgentState.RUNNING


==============
STEP 0

13:41:22 - PLAN
Write a bash script to print 5
13:41:22 - opendevin:ERROR: agent_controller.py:149 - Error in loop
Traceback (most recent call last):
  File "/app/.venv/lib/python3.12/site-packages/litellm/llms/openai.py", line 427, in completion
    raise e
  File "/app/.venv/lib/python3.12/site-packages/litellm/llms/openai.py", line 386, in completion
    response = openai_client.chat.completions.create(**data, timeout=timeout)  # type: ignore
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/openai/_utils/_utils.py", line 277, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/openai/resources/chat/completions.py", line 590, in create
    return self._post(
           ^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 1240, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 921, in request
    return self._request(
           ^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 1020, in _request
    raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: 404 page not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/.venv/lib/python3.12/site-packages/litellm/main.py", line 1053, in completion
    raise e
  File "/app/.venv/lib/python3.12/site-packages/litellm/main.py", line 1026, in completion
    response = openai_chat_completions.completion(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/litellm/llms/openai.py", line 433, in completion
    raise OpenAIError(status_code=e.status_code, message=str(e))
litellm.llms.openai.OpenAIError: 404 page not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/opendevin/controller/agent_controller.py", line 144, in _run
    finished = await self.step(i)
               ^^^^^^^^^^^^^^^^^^
  File "/app/opendevin/controller/agent_controller.py", line 260, in step
    action = self.agent.step(self.state)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/agenthub/codeact_agent/codeact_agent.py", line 223, in step
    response = self.llm.completion(
               ^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 330, in wrapped_f
    return self(f, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 467, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 368, in iter
    result = action(retry_state)
             ^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 390, in <lambda>
    self._add_action_func(lambda rs: rs.outcome.result())
                                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 470, in __call__
    result = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "/app/opendevin/llm/llm.py", line 155, in wrapper
    resp = completion_unwrapped(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/litellm/utils.py", line 3222, in wrapper
    raise e
  File "/app/.venv/lib/python3.12/site-packages/litellm/utils.py", line 3116, in wrapper
    result = original_function(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/litellm/main.py", line 2226, in completion
    raise exception_type(
          ^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/litellm/utils.py", line 9233, in exception_type
    raise e
  File "/app/.venv/lib/python3.12/site-packages/litellm/utils.py", line 8041, in exception_type
    raise NotFoundError(
litellm.exceptions.NotFoundError: OpenAIException - 404 page not found
Model: gpt-3.5-turbo-1106
API Base: https://api.openai.com
Messages: [{'role': 'system', 'content': 'A chat between a curious user and an artificial intelligence assista
13:41:22 - opendevin:INFO: agent_controller.py:192 - Setting agent state from AgentState.RUNNING to AgentState.ERROR
/app/.venv/lib/python3.12/site-packages/pydantic/_internal/_fields.py:160: UserWarning: Field "model_group_retry_policy" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
  warnings.warn(

Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.

13:41:24 - opendevin:INFO: browser_env.py:51 - Browser env started.
Setting workspace base to /app/workspace1

I had to run playwright install before

this on the image ghcr.io/opendevin/opendevin:main

navado avatar May 10 '24 13:05 navado

I suspect I need proper config.toml, but yet can't get through it to run with local ollama

navado avatar May 10 '24 13:05 navado

Run this to check whether LLM is working properly.

import tomllib as toml
from litellm import completion
from datetime import datetime
file_path=r'config.toml'
config = toml.load(open(file_path,'rb'))

messages = [{ "content": "If there are 10 books in a room and I read 2, how many books are still in the room?","role": "user"}]
dt = datetime.now()
response = completion(model=config['LLM_MODEL'], 
                        api_key=config['LLM_API_KEY'],
                        base_url=config.get('LLM_BASE_URL'),
                      messages=messages)

content = response.choices[0].message.content
print(content)

if '8' in content:
    print('--> Correct answer! 🎉')
    print('There are still 10 books in the room; reading them does not reduce the count. Consider exploring more accurate models for better results.')

dt2 = datetime.now()
print('Used model:',config['LLM_MODEL'])
print(f"Time taken: {(dt2-dt).total_seconds():.1f}s")

SmartManoj avatar May 10 '24 13:05 SmartManoj

I think we are not on the same page here.

My problem is setting up ollama and opendevin on a VM behind a DNS entry, a custom URL if you will.

If OpenDevin frontend always attempts to connect to a localhost ws/ this will not work. There should be a setting to tell the frontent how to access the backend, with localhost being the default, of course.

cope avatar May 10 '24 16:05 cope

I just got into strange and sily observation. Specifying properly environment variables in docker run eliminates the problem with the web socket. It also works only when model specified in env and not from the UI. That don't make everything work, but brought me step forward.

docker run \
    --add-host host.docker.internal:host-gateway \
    -e SANDBOX_USER_ID=$(id -u) \
    -e LLM_API_KEY=ollama \
    -e LLM_BASE_URL=http://host.docker.internal:11434 \
    -e LLM_MODEL=ollama/codellama:latest \
    -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
    -v $WORKSPACE_BASE:/opt/workspace_base \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -p 3000:3000 \
    --name devin \
    ghcr.io/opendevin/opendevin:latest

the example in the docs include quotes around URL and the model, the working version (on MAC) don't need them,

# The directory you want OpenDevin to modify. MUST be an absolute path!
export WORKSPACE_BASE=$(pwd)/workspace

docker run \
    --add-host host.docker.internal:host-gateway \
    -e SANDBOX_USER_ID=$(id -u) \
    -e LLM_API_KEY="ollama" \
    -e LLM_BASE_URL="http://host.docker.internal:11434" \
    -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
    -v $WORKSPACE_BASE:/opt/workspace_base \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -p 3000:3000 \
    ghcr.io/opendevin/opendevin:main
    ```

navado avatar May 10 '24 22:05 navado

@cope When you run through docker, there is only one Python FastAPI server listening on 0.0.0.0:3000.

https://github.com/OpenDevin/OpenDevin/blob/6f408eee3404a91d2b2ab33dd74d7a9e0d2f8428/frontend/src/services/socket.ts#L44

since I was opening "devin.myurl.com" in my browser and the frontend is trying to connect to localhost instead...

It's not.

2024-05-08T15:18:23.308812766Z 15:18:23 - opendevin:ERROR: listen.py:143 - Error opening file : [Errno 21] Is a directory: '/opt/workspace_base'

This error happens when the following path is called. Did you open the URL like this?

image

Or there any other issues in the log?

SmartManoj avatar May 11 '24 01:05 SmartManoj

@cope I have OpenDevin running behind a custom URL...so there must be something going on in your setup

rbren avatar May 11 '24 15:05 rbren

@rbren can you share the basics of your setup, please?

cope avatar May 11 '24 15:05 cope

@SmartManoj I can only check on monday, my laptop is not with me atm 😞

I DO, however, have that same error Error opening file : [Errno 21] Is a directory: '/opt/workspace_base' on this machine, also windows.

cope avatar May 11 '24 15:05 cope

Just now I got docker.errors.APIError: 500 Server Error for http+docker://localhost/v1.45/containers/7ef864ee84b3f26782a7991f45de31fc444b72c0edd49f36c6ba4f41d79d81c1/start: Internal Server Error ("Ports are not available: exposing port TCP 0.0.0.0:50107 -> 0.0.0.0:0: listen tcp 0.0.0.0:50107: bind: An attempt was made to access a socket in a way forbidden by its access permissions.") so checking that...

cope avatar May 11 '24 16:05 cope

I think I found my problem: was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://devin.myurl.com/ws?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiI5M2QwMzBkYi0yNmJlLTRkMzItODZhZC0xYzAzZmExMTg4ZGYifQ.EqGAJ23AYzS1UUHHlTGmnpx1BAq_Ile4LydiDbA-_3Q'. This request has been blocked; this endpoint must be available over WSS.

cope avatar May 13 '24 10:05 cope

I am able to access devin via http, but there are still issues like opendevin:WARNING: llm.py:131 - Could not get model info for ollama/codellama:latest in the log...

And when I give it a task, I get file permission errors :(

2024-05-13T12:21:47.470603661Z FileWriteAction(path='/path/to/file.txt', content='Hello, world!', start=0, end=-1, thought='', action='write')
2024-05-13T12:21:47.470966973Z 12:21:47 - OBSERVATION
2024-05-13T12:21:47.470987425Z ErrorObservation(content='Malformed paths not permitted: /path/to/file.txt', observation='error')

Even though it seems to have written Hello World? image

But finally, it fails with:

2024-05-13T12:21:47.472877823Z ==============
2024-05-13T12:21:47.472887388Z STEP 1
2024-05-13T12:21:47.472927022Z
2024-05-13T12:21:47.470603661Z FileWriteAction(path='/path/to/file.txt', content='Hello, world!', start=0, end=-1, thought='', action='write')
2024-05-13T12:21:47.470966973Z 12:21:47 - OBSERVATION
2024-05-13T12:21:47.470987425Z ErrorObservation(content='Malformed paths not permitted: /path/to/file.txt', observation='error')
2024-05-13T12:22:47.532494889Z 12:22:47 - opendevin:ERROR: llm.py:164 - <html>
2024-05-13T12:22:47.532540228Z <head><title>504 Gateway Time-out</title></head>
2024-05-13T12:22:47.532552863Z <body>
2024-05-13T12:22:47.532563349Z <center><h1>504 Gateway Time-out</h1></center>
2024-05-13T12:22:47.532574299Z <hr><center>nginx/1.26.0</center>
2024-05-13T12:22:47.532584271Z </body>
2024-05-13T12:22:47.532593555Z </html>
2024-05-13T12:22:47.532602994Z . Attempt #1 | You can customize these settings in the configuration.
2024-05-13T12:23:50.469949381Z 12:23:50 - ACTION
2024-05-13T12:23:50.470022385Z NullAction(action='null')
2024-05-13T12:23:50.470035685Z 12:23:50 - OBSERVATION
2024-05-13T12:23:50.470045666Z ErrorObservation(content='Invalid JSON in response. Please make sure the response is a valid JSON object.', observation='error')
2024-05-13T12:23:50.471534488Z 12:23:50 - opendevin:INFO: session.py:40 - WebSocket disconnected, sid: 06c0f860-652b-4cb1-8613-85e1eabe56ea
2024-05-13T12:23:50.471660738Z INFO:     connection closed
2024-05-13T12:23:50.472165206Z
2024-05-13T12:23:50.472184297Z
2024-05-13T12:23:50.472194690Z ==============

image And WebSocket connection failed...

cope avatar May 13 '24 12:05 cope

Due to the quality of the model

Even though it seems to have written Hello World?

Step 0 did that?

SmartManoj avatar May 13 '24 12:05 SmartManoj

No idea, I just clicked on workspace_base and saw "Hello world" 😞

cope avatar May 13 '24 18:05 cope

@cop Did you check the latest version and the CodeActAgent?

SmartManoj avatar Jun 01 '24 15:06 SmartManoj

Hi cope. Do you mind testing the current main and see if the issue is resolved? Going to close this issue. Please feel free to re-open or open a new issue.

mamoodi avatar Jun 26 '24 14:06 mamoodi

@mamoodi as soon as I find the time, yes

cope avatar Jun 26 '24 16:06 cope