Skip to content

fix(remote): handle TLS endpoint verification timeout gracefully in remote:beginPairing #87

Description

@sambitcreate

Description

When initiating remote pairing with remote:beginPairing, if the Tailscale HTTPS endpoint or local TLS port is unreachable or outdated (e.g. pointing to a port from a prior session), the TLS probe times out after 5 seconds:

Error occurred in handler for 'remote:beginPairing': Error: Aiden Remote TLS endpoint timed out.
    at Timeout._onTimeout (file:///home/sambit/projects/aiden-agent/build/main/index.js:55636:22)
    at listOnTimeout (node:internal/timers:605:17)
    at process.processTimers (node:internal/timers:541:7)

Steps to Reproduce

  1. Start Aiden when Tailscale Serve route points to an inactive port or when the TLS endpoint cannot be reached.
  2. In the UI or via client call, trigger remote:beginPairing.
  3. Wait 5 seconds.
  4. An unhandled exception is logged by the remote:beginPairing IPC handler.

Expected Behavior

The timeout in fetchTlsServerSpkiSha256 should be handled cleanly, returning a structured error outcome to the renderer (e.g. indicating the endpoint is unreachable or timed out) rather than bubbling as an unhandled rejection in the IPC handler.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions