OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: Using a port other than 3000 on the client breaks LLM setup on :main

Open jriff opened this issue 1 year ago • 2 comments

Is there an existing issue for the same bug?

  • [X] I have checked the existing issues.

Describe the bug and reproduction steps

When running the docker command with eg. -p 3001:3000, the LLM setup breaks as seen on this screenshot:

Screenshot 2024-10-11 at 08 28 25

I can't choose anything in the drop-downs. I just see "verified" and "others" but none of them are clickable. I don't know if this is a known issue. It happens both in Safari and Chrome on Mac.

OpenHands Installation

Docker command in README

OpenHands Version

main

Operating System

MacOS

Logs, Errors, Screenshots, and Additional Context

No response

jriff avatar Oct 11 '24 15:10 jriff

If hostname is localhost, the server fallback URL to communicate with the backend is always localhost:3000. This is incorrect in your scenario since the server is now running on localhost:3001.

https://github.com/All-Hands-AI/OpenHands/blob/caa77cf7a6c1a94ea2b51357967c4646d00edad8/frontend/src/utils/get-valid-fallback-host.ts#L12-L20

For now, you can run OpenHands locally (pull and run make build && make run). Feel free to set the environment variable to whichever URL you need here: https://github.com/All-Hands-AI/OpenHands/blob/caa77cf7a6c1a94ea2b51357967c4646d00edad8/frontend/.env.sample#L1

Note that in this mode, the frontend is expected to be served on localhost:3001, another limitation but its because: https://github.com/All-Hands-AI/OpenHands/blob/caa77cf7a6c1a94ea2b51357967c4646d00edad8/openhands/server/listen.py#L79

Will create an issue for this soon, feel free to submit a PR to fix these if you're up for it 😃

amanape avatar Oct 11 '24 17:10 amanape

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Nov 12 '24 01:11 github-actions[bot]

This issue was closed because it has been stalled for over 30 days with no activity.

github-actions[bot] avatar Nov 19 '24 02:11 github-actions[bot]