All-Hands-AI / OpenHands

🙌 OpenHands: Code Less, Make More
https://all-hands.dev
MIT License
36.09k stars 4.11k forks source link

[Bug]: Workspace not displaying properly and zip download doesn't work #4694

Open neubig opened 1 week ago

neubig commented 1 week ago

Is there an existing issue for the same bug?

Describe the bug and reproduction steps

Currently when using OpenHands the workspace directory is not being displayed properly. See the screenshot below, clearly there are files but they're not showing up in the workspace (even after clicking refresh). The agent has finished the task.

Screenshot 2024-11-01 at 6 20 54 PM

In addition, when trying to download the workspace files, I get an empty zip file

(exp) grahams-mbp:compare-quotes-task gneubig$ unzip workspace.zip 
Archive:  workspace.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of workspace.zip or
        workspace.zip.zip, and cannot find workspace.zip.ZIP, period.
(exp) grahams-mbp:compare-quotes-task gneubig$ ls -lh
total 8
-rw-r--r--@ 1 gneubig  staff    29B Nov  1 18:20 workspace.zip

OpenHands Installation

Docker command in README

OpenHands Version

No response

Operating System

None

Logs, Errors, Screenshots, and Additional Context

No response

Tomlili43 commented 1 week ago

reproduced bug just now bug reproduction : OS: mac m1 files in docker container(path:/workspace): calculator.py workspace.zip files in local machine: ./workspace: calculator.py

diff: workspace.zip solution : we should synchronize workspace folder(all kinds of files ) from container to lm. https://files.slack.com/files-pri/T06P212QSEA-F07UYQW534Z/image.png https://files.slack.com/files-pri/T06P212QSEA-F07V8U5HG80/image.png

Tomlili43 commented 1 week ago

i am working on it. openhands:0.11 version doesn't have this bug.

Tomlili43 commented 1 week ago

file mount of runtime container: docker.all-hands.dev/ works well ghcr.io/ didn't work I spent whole day, however get no clue. a temporary solution: docker cp $RUNTIME_CONTAINER_ID:/workspace ./workspace

image