Repository navigation
Description
Summary
On a self-hosted Linux ARM64 orca serve runtime, the desktop client repeatedly flashes “Reconnecting to remote runtime” while work is active. The WebSocket closes when either side sends an empty heartbeat ping/pong frame. Automatic reconnection can make one-shot status requests appear healthy.
Environment
- Orca server 1.4.205, headless Linux ARM64 container
- Orca macOS client 1.4.212
- Server runtime: Electron 43.7.0 with embedded Node 24.21.0
- Installed
wspackage: 8.21.3
Reproduction and isolation
- A persistent client connection sent an empty WebSocket ping. It closed abnormally with code 1006 within 25–35 ms. Extending only the diagnostic client's ping interval removed those client-triggered closes, but the server's 15-second heartbeat still closed the connection.
- From inside the server container, a credential-free client connected directly to the Orca server on loopback. An empty ping closed with 1006 within about 4 ms; a ping containing ten bytes received the correct pong. The same result occurred through the local admission listener. This reproduction does not involve SSH, Tailscale, an external proxy, or a remote network.
- A disposable loopback test using the installed
ws8.21.3 reproduced the failure under the packaged Electron runtime. The same test passed under standalone Node 22.22.0 in the same container. - A separate raw TCP test under the packaged Electron runtime returned
EFAULTfornet.Socket.write(Buffer.alloc(0)), with or without socket corking. A header-only or nonempty write succeeded.
In the installed ws sender, an empty frame is sent as two socket writes: the complete frame header followed by a zero-length payload. The second write appears to cause this environment's socket failure. This identifies a runtime/dependency interaction, but does not establish which upstream component owns the underlying EFAULT defect.
Expected behavior
An empty WebSocket ping/pong is valid and should keep the connection open.
Observed impact and local workaround
Before the workaround, a two-minute persistent-connection test recorded 13–14 abnormal closes per path across two separate Orca server processes and their direct/alternate routes. The Orca processes did not restart or report OOM events.
A local image change skips the redundant zero-length payload write in ws/lib/sender.js when the frame header is already complete, and attaches the completion callback to the header write. Other frame paths remain unchanged. Regression probes passed for bidirectional empty ping/pong, empty text/binary messages, nonempty payloads, callbacks, and normal close. After deployment, four authenticated paths each completed 59 requests over two minutes with zero unexpected closes and bidirectional heartbeat replies. This is a bounded test, not a long-term stability claim.
Could Orca maintainers reproduce this on the packaged Linux ARM64 runtime and address the empty-frame write in the runtime, dependency, or Orca's sending path? Surfacing the underlying socket error would also make this easier to diagnose than a generic reconnect banner.
Activity
AmethystLiang commentedon Sep 27, 2026
thanks for reporting. looking into it