github GlassHaven/Haven v5.24.21

latest releases: v5.94.92, v5.94.91, v5.94.90...
7 months ago

Diagnostic fix for the RDP issue reported in #106 — the "tap an RDP connection, end up on an empty Desktop tab, nothing happens" symptom that two users hit on v5.24.19.

What was happening

The Rust RdpClient::connect() spawns a worker thread and returns immediately. The Kotlin side was:

  1. Logging "RDP connected to <host>" and "Initial frame received" right after connect() returned — both untrue; the worker hadn't done the TLS handshake yet.
  2. Setting the tab to connected=true synchronously — so if the worker later failed, the tab showed as "connected" with no frame, which rendered the generic empty-state placeholder ("Add a connection on the Connections tab") — indistinguishable from "you never started anything".
  3. Sending worker-thread errors only to Android logcat via Rust's log crate — they never crossed the UniFFI boundary back into Kotlin.

So when a real failure occurred (e.g. TLS handshake rejection, capability mismatch, CredSSP auth failure), the user saw a blank Desktop tab and no error message.

What's fixed

  • New SessionCallback over UniFFI with on_connected, on_error, on_disconnected. run_rdp_session now returns Result<(), String> and every worker-thread failure path propagates a context-tagged message ("TLS handshake failed: …", "Authentication failed: …") to Kotlin.
  • RdpSession.start() no longer lies in the logs. Removed the fake "connected" + "initial frame" lines. Added an onConnected callback.
  • DesktopViewModel only flips connected=true inside onConnected — no more premature success. Audit-log CONNECTED / FAILED events now fire from the right places.
  • Three-state RDP placeholder: Connecting… (spinner + hint to enable verbose logging), Connected — waiting for first frame… (spinner), Connection failed (red text + the actual error message in a card). A Close/Cancel button lets you abandon a stuck connection.

What's not fixed (yet)

The underlying TLS / protocol compatibility issue that may be behind some of the failures. My local xrdp reproduces the symptom after a recent OpenSSL 3.5 + xrdp 0.10.2 upgrade (rustls sends ClientHello, xrdp reports "unexpected eof"), but I want to see the real error strings from the reporters before deciding which layer to fix. This release makes those error strings visible for the first time.

If you're hitting #106

  1. Update to v5.24.21.
  2. Toggle Settings → Verbose connection logging on.
  3. Retry the RDP connection.
  4. If the connecting spinner resolves to a red error card, paste that error text on #106. The Settings → View connection log entry for the attempt will also have the full TLS handshake trace.

Build artifacts

Signed APKs for arm64 and x86_64 attached. arm64 is the one for phones and tablets.

Don't miss a new Haven release

NewReleases is sending notifications on new releases.