Closed robshox closed 7 months ago
Hmm...this should be solved since we started running Devin as root.
Are there any error messages besides this?
Also--it would be helpful if you could fill out the issue template
I was playing a bit eith this and getting the same error, I am not sure who is the responsible to run the command, the planner or the code agent, I had modified the templates to set examples and explicit instructions to use sudo
when system packages installation is required, but not luck. I am not sure if it would be better to just set the user of the sandbox as superuser so the prompt can be simpler assuming that capability comes from the system.
somehow this approach feels better to me because if I want to give privileges to the ai assitant it should come from the system as an permission or so... but having an assitant that can become super user when it wants... it is kind of dangerous.
same issue.
@andrescevp @AmerDinar Are you also running on Windows like the OP?
Using it with Ubuntu
Maybe this helps? This is the error message I observe with Ubuntu.
ACTION:
CmdRunAction(command='sudo apt-get update && sudo apt-get install -y cppcheck', background=False, action=<ActionType.RUN: 'run'>)
13:02:00 - opendevin:ERROR: sandbox.py:227 - Command timed out, killing process...
13:04:00 - opendevin:ERROR: sandbox.py:227 - Command timed out, killing process...
OBSERVATION:
Command: "sudo apt-get update && sudo apt-get install -y cppcheck" timed out. Sending SIGINT to the process: sudo: unable to resolve host opendevin_sandbox: Temporary failure in name resolution
[sudo] password for opendevin:
sudo: a password is required
A fix for that has just been merged, @andrewparry , please update.
Ok updated, I see the command now being run without sudo, but fall into this error, from Opendevin terminal:
$ apt update && apt install clang-tidy -y
Reading package lists... 0Reading package lists... 0Reading package lists... 3Reading package lists... Done
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)
Out of interest
parallels@ubuntu-linux-22-04-02-desktop:~/OpenDevin$ ls -l /var/lib/apt/lists
total 183932
...
drwx------ 2 _apt root 12288 Apr 8 15:56 partial
...
Same error for me, trying to install sqlite3
:
ACTION:
CmdRunAction(command='apt update && apt install sqlite3 -y', background=False, action=<ActionType.RUN: 'run'>)
OBSERVATION:
Reading package lists... Done
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)
@andrewparry @kroggen Apparently this is a Docker problem. I'm having some success editing the docker file and adding:
ARG SSL_KEYSTORE_PASSWORD USER root USER 1001
Looks like:
FROM ubuntu:22.04 ARG SSL_KEYSTORE_PASSWORD USER root '#' install basic packages RUN apt-get update && apt-get install -y \ curl \ wget \ git \ vim \ nano \ unzip \ zip \ python3 \ python3-pip \ python3-venv \ python3-dev \ build-essential \ openssh-server \ sudo \ && rm -rf /var/lib/apt/lists/* USER 1001 RUN service ssh start
Also, adding in sandbox.py:
USER_ID = 1001
before commenting out:
if config.get_or_none('SANDBOX_USER_ID') is not None: USER_ID = int(config.get_or_default('SANDBOX_USER_ID', '')) elif hasattr(os, 'getuid'): USER_ID = os.getuid()
working for me on Ubuntu, thanks guys!
@andrewparry @kroggen Apparently this is a Docker problem. I'm having some success editing the docker file and adding:
ARG SSL_KEYSTORE_PASSWORD USER root USER 1001
Looks like:
FROM ubuntu:22.04 ARG SSL_KEYSTORE_PASSWORD USER root '#' install basic packages RUN apt-get update && apt-get install -y curl wget git vim nano unzip zip python3 python3-pip python3-venv python3-dev build-essential openssh-server sudo && rm -rf /var/lib/apt/lists/* USER 1001 RUN service ssh start
Also, adding in sandbox.py:
USER_ID = 1001
before commenting out:
if config.get_or_none('SANDBOX_USER_ID') is not None: USER_ID = int(config.get_or_default('SANDBOX_USER_ID', '')) elif hasattr(os, 'getuid'): USER_ID = os.getuid()
Thanks, that fixed it for me, but it was exec_box.py and not sandbox.py.
I believe this is fixed now that everything is running in a consistent sandbox with RUN_AS_DEVIN=false
I'm getting these kinds of 127 errors
Command
sudo apt update && sudo apt install nodejs npm -y
executed with exit code 127.ODevin Can write to the file system on my machine but anything got to do with downloading or running packages I believe in the sandbox won't work. I think this has got to do with the fact I'm on Windows but I thought the backend had it's own Docker setup with Linux.