t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Mobile manual pairing silently turns scheme-less hosts into https:// — the Host field's own placeholder shape fails against plain-HTTP backends

Open fkxr-dev opened this issue 4 months ago • 1 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate. (#2031 covers the desktop advertising the wrong NIC/IP; this report is only about the mobile client's manual Host entry.)
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/mobile (not in the issue-form dropdown; filed via CLI)

Steps to reproduce

  1. Run a backend reachable over plain HTTP on an address the desktop does not advertise (my case: Network access on, phone connecting to the Mac's WireGuard IP).
  2. In the mobile app: Connections → add connection → enter Host as 10.0.0.5:3773 — i.e. exactly the shape of the field's own placeholder (192.168.1.100:8080) — plus a valid pairing code.
  3. Tap connect.

Expected behavior

Pairs over http://10.0.0.5:3773 — or at minimum a clear error stating which scheme was assumed.

Actual behavior

buildPairingUrl in apps/mobile/src/features/connection/pairing.ts prepends https:// whenever the input has no scheme, so the app attempts TLS against the plain-HTTP backend and pairing fails with a generic connection error. Nothing in the UI indicates the assumed scheme, and the placeholder demonstrates precisely the input shape that fails.

Typing http://10.0.0.5:3773 explicitly works fine (ATS allows it; this is purely the default-scheme choice in manual entry).

Impact

Minor bug or occasional failure — but it bites exactly the users who have no alternative: manual entry is the only pairing path for any address the desktop does not advertise (VPN/WireGuard interfaces, multi-NIC hosts — see #2031).

Version or commit

main @ 3513fa04f (mobile app built from source)

Environment

iPhone 15 Pro Max, iOS 18.6.2; backend on macOS 15.7.4; phone → backend over WireGuard; port 3773

Workaround

Type the scheme explicitly: http://<ip>:3773.

Possible directions, smallest first: mention the assumed scheme in the connection error; default bare ip:port to http:// for private-range addresses (the QR/link flows already carry explicit schemes, so this only affects manual typing); or try https and fall back to http. The accepted #2031 would also reduce how often users need manual entry at all.


Found during an agent-assisted setup session (Claude Code); behavior verified on a from-source iOS build on the commit noted.

fkxr-dev avatar Jul 15 '26 06:07 fkxr-dev

please dont just send agents over a random codebase and file issues you haven't even encountered jfc

juliusmarminge avatar Jul 15 '26 10:07 juliusmarminge