Skip to content

[Bug]: Remote Orca Server on same tailnet times out at app layer though WebSocket handshake succeeds #14210

Description

@louis-marshall

Summary

Connecting to a Remote Orca Server (desktop-app sharing mode) on the same Tailscale tailnet times out at the application layer, even though transport-level checks all pass:

  • Both machines are on the same tailnet, both running Orca 1.4.180
  • TCP to <tailnet-ip>:6768 is reachable
  • A raw WebSocket upgrade from the client to ws://<tailnet-ip>:6768 returns HTTP/1.1 101 Switching Protocols
  • The server's orca-runtime.json runtimeId matches the saved environment's runtimeId on the client
  • The server listens on 0.0.0.0:6768
  • The server logs show no record of the inbound connection at all (no hello, no auth attempt, no rejection)

The UI then shows the generic fallback error:

Timed out waiting for the remote Orca runtime to respond. The server may be offline on your tailnet, or its Tailscale Funnel reverted to tailnet-only. Confirm it's reachable; re-pair only when adding a new device, since already-paired devices reconnect with their saved token.

Environment

Client Server
OS macOS arm64 macOS 26.2 (Tahoe) arm64
Orca 1.4.180 1.4.180
Mode desktop app desktop app, "Generate Access Link" (Remote Orca Servers)
Network Tailscale tailnet, 100.x addresses same tailnet, daemon protocol v32
  • Transport: ws://<tailnet-ip>:6768 (endpoint from a freshly generated orca://pair link, v:2, scope: "runtime")

Steps to reproduce

  1. Server (macOS 26.2 arm64): Settings → Remote Orca Servers → set the Connection address to the Tailscale address (100.x) → Generate Access Link → copy the orca://pair?code=... link. The decoded JSON contains "endpoint": "ws://<tailnet-ip>:6768" (Tailscale address, not a LAN IP).
  2. Client: save the environment from the pairing link, e.g.
    orca environment add --name <name> --pairing-code "orca://pair?code=..."
  3. Connect to the remote runtime from the client.
  4. The connection times out after a short wait with the error above.

Expected behavior

The client connects and the remote runtime becomes reachable (both endpoints are on the same tailnet; the websocket endpoint is verified reachable from the client).

Actual behavior

  • Client reports a timeout at the app layer.
  • Server logs (daemon + main trace) contain no entry for the connection — it is as if the server never received the client's hello/authorization message, despite the transport-level 101 handshake succeeding.
  • Re-pairing with a brand-new access link (new deviceToken, tailnet endpoint) reproduces the same timeout.

Additional observations (possibly related, found during debugging)

  1. Misleading Tailscale guidance. When a pairing link was originally generated with a LAN address (ws://192.168.x.x:6768) instead of the Tailscale address, the client fails with "If the server is on another network, connect both devices to Tailscale and pair using its Tailscale address" — even though both devices are already on the tailnet. The real problem was the unreachable LAN endpoint embedded in the link, not Tailscale. The error should surface the actual endpoint being dialed instead of implying Tailscale is down.

  2. orca environment rm crashes the running client. Removing an environment with orca environment rm <id> while the app still holds a shared-control connection to that environment triggers a main-process uncaught exception:
    RuntimeEnvironmentStoreError: Unknown environment: <id> → main_uncaught_exception. The CLI removal should invalidate the in-memory reference gracefully instead of crashing the app.

  3. "Unsupported remote platform" on version mismatch. Connecting an older client (1.4.146) to a newer server (1.4.156) via SSH worktree reports Unsupported remote platform. Orca relay supports: linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64, win32-arm64 — even though the remote is darwin-arm64, which is in the supported list. The real cause was a client/server version gap; the message should distinguish "unknown platform" from "protocol/version mismatch".

  4. Minor CLI UX: orca environment add requires --name; omitting it yields only Missing required --name without listing the flag.

What I already verified

  • nc -z <tailnet-ip> 6768 → succeeds
  • Raw WebSocket upgrade handshake → HTTP/1.1 101 Switching Protocols
  • Client env runtimeId == server orca-runtime.json runtimeId
  • Server listener: TCP *:6768 (LISTEN) owned by the Orca process
  • Server logs: no inbound connection trace for the failing attempts

Activity

  1. added
    bug
    on Sep 19, 2026
  2. added theissue type on Sep 19, 2026
  3. nwparker commented on Oct 26, 2026

    @nwparker
    Contributor

    @hoangngochuong24947-gif sorry for the slow reply. The remote connection layer has changed a lot since 1.4.180. Could you retest on v1.4.241 on both machines? If it still times out, please share:

    1. Whether the server is the desktop app or orca serve, and each machine's OS.
    2. The server's and client's main.trace.ndjson lines from the minute you connect (macOS ~/Library/Application Support/Orca/logs/, Linux ~/.config/Orca/logs/, Windows %APPDATA%\Orca\logs\), redacted.

    We'll close this in two weeks if we don't hear back.

  4. louis-marshall commented on Oct 28, 2026

    @louis-marshall
    Author

    @nwparker Thanks for following up. We retested on the latest builds and the connection timeout still persists.

    1. Environment & Setup

    • Client: macOS 26.4 (arm64), Desktop App (Orca 1.4.240)
    • Server: macOS 26.2 (arm64), Desktop App (Orca 1.4.222)
    • Network / Tailscale Setup: Both devices are on the same Tailscale tailnet. Notably, our tailnet does not rely on official public Tailscale DERP relays; instead, relay traffic is handled via a private self-hosted relay on our cloud server. Baseline connectivity over Tailscale (SSH, pings, internal services) is fully verified and solid, but Orca's remote runtime connection repeatedly times out / drops at the application layer.

    2. Trace Logs (main.trace.ndjson)

    Client trace (main.trace.ndjson):

    {"type":"effect-span","name":"remote-runtime.control-socket-close","attributes":{"environmentId":"<redacted-id>","cause":"socket_error","errorCode":"remote_runtime_unavailable","closeCode":null,"state":"awaiting_ready","lastRttMs":null,"socketUptimeMs":12010,"readyUptimeMs":null,"reconnectAttempt":42,"pendingRequestCount":0,"subscriptionCount":1},"exit":{"_tag":"Success"}}
    {"type":"effect-span","name":"remote-runtime.control-socket-close","attributes":{"environmentId":"<redacted-id>","cause":"socket_error","errorCode":"remote_runtime_unavailable","closeCode":null,"state":"awaiting_ready","lastRttMs":null,"socketUptimeMs":12008,"readyUptimeMs":null,"reconnectAttempt":43,"pendingRequestCount":0,"subscriptionCount":3},"exit":{"_tag":"Success"}}

    The client socket repeatedly drops after ~12s uptime while in the awaiting_ready state with remote_runtime_unavailable.

    Server trace (main.trace.ndjson & daemon.log):
    Similar to previous observations, the server trace shows no inbound connection traces, handshakes, or hello/auth attempts from the client during these reconnect windows.

    Could the remote connection layer / socket handshake have specific expectations around standard DERP ping intervals or WebSocket transport characteristics that might be affected when running through a custom relay? Let us know if you'd like us to collect additional diagnostics.

  5. nwparker commented on Nov 10, 2026

    @nwparker
    Contributor

    Thanks for retesting, @hoangngochuong24947-gif. Your server is still on 1.4.222. Please update it to the latest release (v1.4.255) so both machines run the same version, then retest.

    What your trace shows: the ~12 s in awaiting_ready is the client's connect timeout. The client never completed a TCP connection to the server's address, so it never reached the encrypted handshake. That also explains why the server logged nothing. A self-hosted DERP relay works below the IP layer, so it shouldn't affect Orca by itself. It looks like something between the two machines is silently dropping TCP to the server's port.

    If it still fails after updating, could you send:

    1. Client: the full error text in the host status popover (it names the ws://HOST:PORT being dialed), and the endpoint shown for this server in Settings. Is HOST a 100.x Tailscale address, a MagicDNS name, or a LAN IP?
    2. Server: the output of lsof -nP -iTCP -sTCP:LISTEN | grep -i orca. Does it show *:6768 or 127.0.0.1:6768?
    3. From the client: nc -vz -G 5 HOST PORT and curl -v --max-time 15 http://HOST:PORT/. A reachable server answers immediately with a 404.
    4. tailscale ping <server>, and whether your tailnet ACLs allow TCP to that port. Working SSH and ping don't prove that.
    5. Server: in System Settings → Network → Firewall, is "Block all incoming connections" or stealth mode on, and is Orca allowed?
    6. On the server, generate a fresh pairing link, re-pair the client, and retest. After a restart the server may listen only on localhost until a pairing link is generated or a device reconnects.
    7. From ~/Library/Application Support/Orca/logs/ on both machines: main.trace.ndjson, plus the console lines starting [remote-runtime.shared-control] socket closed. Please remove any pairing tokens first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions