Before submitting#
Area#
apps/desktop
Steps to reproduce#
- Use a Mac with an inactive Thunderbolt Bridge that retains an IPv4 address and appears before Wi-Fi in
os.networkInterfaces().
- Connect the Mac and another device to the same Wi-Fi.
- Open T3 Code → Settings → Connections and enable Network access.
- Select Local network and create a pairing link.
- 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.
- 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