Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Local network pairing advertises an inactive interface’s IP #17788

Closedacacuce(GitHub profile, opens in a new tab) opened this issue 0 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Use a Mac with an inactive Thunderbolt Bridge that retains an IPv4 address and appears before Wi-Fi in os.networkInterfaces().
  2. Connect the Mac and another device to the same Wi-Fi.
  3. Open T3 Code → Settings → Connections and enable Network access.
  4. Select Local network and create a pairing link.
  5. Observe that the link uses the inactive bridge’s address, 192.168.2.1, instead of the active Wi-Fi address, 192.168.1.xx.
  6. Open the generated link on the other device. The connection fails.

Expected behavior

The local network pairing link uses a reachable address from the active network interface, preferably the interface used by the default route.

Actual behavior

The generated link is:

http://192.168.2.1:3773/pair#token=<>

The installed build’s resolveLanAdvertisedHost() returns the first eligible IPv4 address without checking interface activity or the default route. On this Mac, the inactive bridge0 appears before active Wi-Fi en0.

Related: #7519, closed, describes the same function choosing Tailscale before Wi-Fi on Window

Impact

Minor bug or occasional failure

Version or commit

0.0.46-nightly.20261010.2922

Environment

macOS 26.6.2 (build 25G83), Apple Silicon (arm64), T3 Code Nightly desktop app.

Logs or stack traces

-

Screenshots, recordings, or supporting files

No response

Workaround

Manually tap correct ip during link on mobile device

  1. acacuce(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. juliusmarminge closed this

Sign in to join this conversation.