orca icon indicating copy to clipboard operation
orca copied to clipboard

[Bug]: Mobile custom network address / reverse-proxy remote access still fragile; web client Local PTYs + unavailableReason crash

Open AmethystLiang opened this issue 4 months ago • 4 comments

Operating system

Mobile client + browser web client (remote server access)

Orca version

Unknown

Details

Summary

Separate community report from the pure “no pairing code on headless server” case: when reaching a remote Orca host off the same LAN, users rely on mobile custom network address (reverse proxy / wss:// endpoint). That path still feels incomplete, and the web client surfaces hard failures after connect.

This may be the client/UI side of remote access, not the same bug as missing server-side pairing output — filing separately for triage. Cross-link with the headless pairing issue if investigation shows one root cause.

Symptoms

1. Mobile: custom network address / reverse proxy required

Mobile UI exposes Custom network address for when the phone is not on the same Wi‑Fi (e.g. Tailscale hostname or static IP). Reporter notes:

  • Reverse proxy is still necessary for off-LAN use
  • Protocol/port customization is limited / awkward
  • Example endpoint entered: wss://www.<domain>:443
Custom network address wss endpoint dialog

2. Web client: Local PTYs unavailable

After connecting via web, UI shows:

Local PTYs are unavailable in the web client.
If this persists, please file an issue.

Local PTYs are unavailable in the web client

Note: Detailed host-ownership / local-PTY routing analysis already lives in #9047. Including here only as the symptom users hit on the remote-access path.

3. Web client console crash while showing the error

Browser console:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'unavailableReason')
TypeError reading unavailableReason

This looks like a client-side null-safety bug when rendering an unavailable state — separate from whether PTY routing itself is wrong.

Expected behavior

  • Off-LAN mobile access via custom wss:// / reverse-proxied endpoint should be documented and reliable (or point clearly at official relay when available).
  • Web client should not throw on unavailableReason when a host/PTY capability is missing.
  • Errors should explain next steps (use runtime-owned workspaces, check reverse proxy WebSocket upgrade, etc.) without a console crash.

Related

  • #9047 — web client Local PTYs / host ownership on headless serve (primary for PTY routing)
  • Headless pairing code / orca://pair connectivity (server-side reports — separate issue)
  • Relay / zero-knowledge remote access feature requests (#8147, #7208, #2471)

Possible split for maintainers

Area Likely owner
Custom network address + reverse proxy UX Mobile transport / pairing
Local PTYs unavailable for server worktrees Web client host routing (#9047)
unavailableReason TypeError Renderer null-safety bug

AmethystLiang avatar Jul 21 '26 18:07 AmethystLiang

Related server-side pairing reports (no pairing code / pair link fails): #9759

AmethystLiang avatar Jul 21 '26 18:07 AmethystLiang

This looks fixed on current main by https://github.com/stablyai/orca/pull/9776.

That merge covers the custom network address and reverse-proxy pairing path this report was on, so this issue can probably be closed. If a current build still reproduces it, post the exact pairing URL and whether the failure is on the server, the web client, or both.

rodboev avatar Jul 21 '26 22:07 rodboev

Triage result — @rodboev's assessment was two-thirds right:

  • The unavailableReason TypeError and the paired-runtime ownership piece of Local PTYs are unavailable were indeed fixed by #9776 (first in v1.4.150-rc.0). Deeper web-client PTY routing stays tracked in #9047.
  • The custom network address path was not fully fixed. Since #9776 the server side passes a full ws(s):// override through verbatim — scheme, port, and path — but the desktop Custom network address dialog still rejected URL input client-side. wss://www.<domain>:443 (the exact endpoint in this report) could not be entered, and a reverse-proxied endpoint with a path (wss://host/orca/runtime) had no way in at all.

#9800 closes that gap: the dialog now accepts full ws:///wss:// URLs (path supported; credentials/query/fragment rejected as typos), and the headless-server guide now documents the --pairing-address wss://… form plus a reverse-proxy troubleshooting note. This issue will auto-close when it merges.

If a build with #9800 still fails on this path, check that the proxy forwards WebSocket upgrade requests (Upgrade/Connection headers) for the pairing path to the port Orca listens on, then post the exact pairing URL here.

brennanb2025 avatar Jul 22 '26 00:07 brennanb2025

Both parts of this are fixed on main. #9776 fixed the unavailableReason crash and the paired-runtime PTY ownership problem. #9912 made the custom network address field accept full ws:// and wss:// URLs with a port and path, which reverse-proxy setups need. The deeper web-client PTY routing work is tracked in #9047. Closing this one. If a current build still fails on this path, reopen with the exact pairing URL you used.

OrcaWin avatar Oct 09 '26 06:10 OrcaWin