Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Can't create workspace from local built OpenHands container #6353

Open
1 task done
louria opened this issue Jan 19, 2025 · 5 comments
Open
1 task done

[Bug]: Can't create workspace from local built OpenHands container #6353

louria opened this issue Jan 19, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@louria
Copy link
Contributor

louria commented Jan 19, 2025

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

Fork the repo and build the container in my local environment. Win11.

docker-compose up
Try to select a GitHub repo and then got the error. First I tried to select OpenHands repo. Thought it was too big. Then tried a smaller repo. But still got same error. Also ran into the same error when I try to create a project from scratch.

13:17:39 - openhands:INFO: docker_runtime.py:146 - [runtime c17d8ea9e12b45498fc8b20165d7dfdb] Container started: openhands-runtime-c17d8ea9e12b45498fc8b20165d7dfdb. VSCode URL: None
2025-01-19 21:17:39 openhands-app- | 13:17:39 - openhands:INFO: docker_runtime.py:157 - [runtime c17d8ea9e12b45498fc8b20165d7dfdb] Waiting for client to become ready at http://host.docker.internal:32469...
2025-01-19 21:17:43 openhands-app- | 13:17:43 - openhands:INFO: docker_runtime.py:163 - [runtime d868cc09acc94cd28622cde9d2c4b1af] Runtime is ready.
2025-01-19 21:17:43 openhands-app- | 13:17:43 - openhands:INFO: base.py:249 - [runtime d868cc09acc94cd28622cde9d2c4b1af] Selected repo: None, loading microagents from /workspace/.openhands/microagents (inside runtime)
2025-01-19 21:17:43 openhands-app- | 13:17:43 - openhands:WARNING: agent_session.py:312 - State could not be restored: [Errno 2] No such file or directory: '/.openhands-state/sessions/d868cc09acc94cd28622cde9d2c4b1af/agent_state.pkl'
2025-01-19 21:17:43 openhands-app- | 13:17:43 - openhands:INFO: agent_controller.py:447 - [Agent Controller d868cc09acc94cd28622cde9d2c4b1af] Setting agent(CodeActAgent) state from AgentState.LOADING to AgentState.INIT
2025-01-19 21:18:04 openhands-app- | 13:18:04 - openhands:INFO: docker_runtime.py:163 - [runtime c17d8ea9e12b45498fc8b20165d7dfdb] Runtime is ready.
**2025-01-19 21:18:04 openhands-app- | 13:18:04 - openhands:ERROR: session.py:128 - Error creating agent_session: 500 Server Error: Internal Server Error for url: http://host.docker.internal:32469/execute_action
2025-01-19 21:18:04 openhands-app- | Details: Traceback (most recent call last):
2025-01-19 21:18:04 openhands-app- | File "/openhands/code/openhands/events/serialization/action.py", line 75, in action_from_dict
2025-01-19 21:18:04 openhands-app- | decoded_action = action_class(args)
2025-01-19 21:18:04 openhands-app- | ^^^^^^^^^^^^^^^^^^^^
2025-01-19 21:18:04 openhands-app- | TypeError: CmdRunAction.init() got an unexpected keyword argument 'is_input'
2025-01-19 21:18:04 openhands-app- |

OpenHands Installation

Development workflow

OpenHands Version

main

Operating System

WSL on Windows

Logs, Errors, Screenshots, and Additional Context

No response

@louria
Copy link
Contributor Author

louria commented Jan 20, 2025

here is more detail.

openhands:ERROR: action_execution_server.py:525 - Error processing command: action={'message': 'Running command: export GITHUB_TOKEN="xxxxx";', 'action': 'run', 'args': {'command': 'export GITHUB_TOKEN="xxx";', 'is_input': False, 'thought': '', 'blocking': False, 'hidden': False, 'confirmation_state': 'confirmed'}, 'timeout': 120} has the wrong arguments: CmdRunAction.init() got an unexpected keyword argument 'is_input'

@enyst
Copy link
Collaborator

enyst commented Jan 20, 2025

This is due to this addition of an argument https://github.com/All-Hands-AI/OpenHands/pull/6318/files#diff-88c1aaf7d3b989bf3224f28b17f5feaac93de1a1bb8e9e021edad6e21950880c

It's a bit strange though, because your logs show it's running the newer command, but the runtime seems to expect the old one. Can you please make sure you are running on main fully, the latest commit, clean up all containers from docker and try again?

@louria
Copy link
Contributor Author

louria commented Jan 21, 2025

This is due to this addition of an argument https://github.com/All-Hands-AI/OpenHands/pull/6318/files#diff-88c1aaf7d3b989bf3224f28b17f5feaac93de1a1bb8e9e021edad6e21950880c

It's a bit strange though, because your logs show it's running the newer command, but the runtime seems to expect the old one. Can you please make sure you are running on main fully, the latest commit, clean up all containers from docker and try again?

Thanks. I re-pulled and built but still got the same error. Seems the docker-compose file still points to the old run time container

SANDBOX_RUNTIME_CONTAINER_IMAGE=${SANDBOX_RUNTIME_CONTAINER_IMAGE:-docker.all-hands.dev/all-hands-ai/runtime:0.20-nikolaik}

Image

Could this be the reason? How to update the runtime container

@enyst
Copy link
Collaborator

enyst commented Jan 21, 2025

Ah, yes, sure. Please use instead the docker run command in the README to start.

@donaldkuck
Copy link

donaldkuck commented Jan 22, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants