mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-10-07 16:38:34 +08:00
* fix: use dual-stack (::) binding for static-server to fix Docker e2e connection errors The Docker e2e tests suffered frequent ECONNREFUSED errors because static-server.mjs defaulted to 0.0.0.0 (IPv4-only), while localhost can resolve to ::1 (IPv6) on CI runners. Meanwhile, ingress.mjs (used by the npm path) already bound to :: (dual-stack) and never had this problem. Changes: - static-server.mjs: default host from 0.0.0.0 → :: (dual-stack) - docker/entrypoint.sh: --host 0.0.0.0 → --host :: for both static-server instances - playwright.mock-llm-docker.config.ts: switch URLs from 127.0.0.1 to localhost (now safe since the server accepts both IPv4 and IPv6) - playwright.mock-llm.config.ts: drop explicit --host 0.0.0.0 from public-mode server (inherits the new :: default) - dev-static.mjs, dev-with-automation.mjs: drop explicit --host 0.0.0.0 (inherits the new :: default) - AGENTS.md: replace IPv4-only guidance with dual-stack documentation Co-authored-by: openhands <openhands@all-hands.dev> * fix: skip partial-stack/cross-connect tests when build/ is absent (Docker e2e) The partial-stack and cross-connect tests spawn bin/agent-canvas.mjs locally, which requires a pre-built build/ directory. In the Docker e2e workflow there is no host-side build — the frontend lives inside the Docker image. These tests are already covered by the npm e2e workflow. Convert the hard expect(existsSync(...)).toBe(true) assertions to test.skip() so they are gracefully skipped instead of failing. Co-authored-by: openhands <openhands@all-hands.dev> * fix: add test.skip to port-conflict test for missing build dir The port-conflict test also spawns bin/agent-canvas.mjs --frontend-only, which fails before reaching the port conflict when no build/ exists. Co-authored-by: openhands <openhands@all-hands.dev> * fix: handle EPIPE/socket errors in static-server proxy to prevent crashes The static-server reverse proxy crashed with an unhandled 'error' event (EPIPE) when a client disconnected mid-response — e.g. during browser navigation or health-check probes. This killed the entire process and caused cascading ECONNREFUSED in subsequent Docker e2e tests. Add error handlers on all piped sockets (req, res, proxySocket, socket) so write errors from client disconnects are absorbed instead of crashing the server process. Also add test.skip for the port-conflict test when build/ is missing. Co-authored-by: openhands <openhands@all-hands.dev> --------- Co-authored-by: openhands <openhands@all-hands.dev>