Skip to content

Add environment assumes https:// for a bare host:port, so LAN servers fail with a transport error #27862

Open

Description

@Kunstderfug

What happened

To reach another Mac on the LAN, the user opened Settings → Environments → Add environment and typed that machine's address as a bare host:port (10.0.0.10:3773), along with a pairing code. Adding failed:

Failed to fetch remote environment endpoint https://10.0.0.10:3773/.well-known/t3/environment (HttpClientError: Transport error).

Entering http://10.0.0.10:3773, or pasting the full pairing URL, worked straight away.

Diagnosis

For input without a scheme, normalizeRemoteBaseUrl in packages/shared/src/remote.ts:86-89 adds https://. The same thing happens in parsePairingUrlFields in apps/web/src/components/settings/ConnectionsSettings.logic.ts:223-226. This code is unchanged on main.

A T3 Code server reached directly over LAN serves plain HTTP. From the client machine, curl http://10.0.0.10:3773/.well-known/t3/environment succeeded and the https:// request failed. So a bare LAN IP or hostname always fails, and the error ("Transport error") gives no hint that the scheme is the cause. The Host field's placeholder (backend.example.com) also suggests that a bare host is the expected input.

Possible improvements:

  1. Default to http:// for IP literals, localhost, and .local names.
  2. Or, when https:// fails with a transport error on a host the user typed without a scheme, retry with http://.
  3. At least, make the error say that https:// was assumed and suggest http://.

Steps to reproduce

  1. On machine A, run T3 Code with its server reachable over LAN (here, the desktop app at 10.0.0.10:3773) and create a pairing code.
  2. On machine B, go to Settings → Environments → Add environment. Enter Host 10.0.0.10:3773 with no scheme, plus the pairing code.
  3. Adding fails with the transport error above against https://10.0.0.10:3773.
  4. Change Host to http://10.0.0.10:3773. Adding succeeds.

Version

0.1.5 (desktop app on both machines)

Environment

Client: macOS (Darwin 27.2.0) arm64, T3 Code desktop 0.1.5. Target: Mac Studio, T3 Code desktop 0.1.5, same LAN.

Evidence

Failed to fetch remote environment endpoint https://10.0.0.10:3773/.well-known/t3/environment (HttpClientError: Transport error).

Related issues

None found. Searches for "add environment https" and the error text turned up nothing matching.

Fix applied or workaround

Enter the host with an explicit http://, or paste the full pairing URL (http://<host>:3773/pair#token=…).

Filed by

Claude Code (claude-opus-5-5) via t3 triage

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions