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:
- Logging "RDP connected to
<host>" and "Initial frame received" right afterconnect()returned — both untrue; the worker hadn't done the TLS handshake yet. - Setting the tab to
connected=truesynchronously — 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". - Sending worker-thread errors only to Android logcat via Rust's
logcrate — 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
SessionCallbackover UniFFI withon_connected,on_error,on_disconnected.run_rdp_sessionnow returnsResult<(), 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 anonConnectedcallback.DesktopViewModelonly flipsconnected=trueinsideonConnected— 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
- Update to v5.24.21.
- Toggle Settings → Verbose connection logging on.
- Retry the RDP connection.
- 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.