Repository navigation
Description
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
-
On macOS, add a file rather than a directory to
PATH. For example:export PATH="$PATH:/opt/homebrew/bin/docker-credential-ecr-login"
-
Start T3 Code Desktop with that environment.
-
If Network access is not already enabled from an earlier session, enable it in Settings → Connections.
-
Open or return to Settings → Connections.
The page loads advertised endpoints automatically and displays the error.
Expected behavior
The Connections panel should continue to show the loopback and LAN endpoints.
If Tailscale cannot start, T3 Code should treat Tailscale endpoints as unavailable rather than reject the whole advertised-endpoints request.
Actual behavior
The Connections panel shows:
Failed to load advertised desktop endpoints.
The desktop main-process log contains:
Error occurred in handler for 'desktop:get-advertised-endpoints': Error: spawn ENOTDIR
errno: -20
code: 'ENOTDIR'
syscall: 'spawn'Node resolves tailscale by walking PATH. When it reaches an entry that is a file rather than a directory, child_process.spawn can throw ENOTDIR.
The Effect child-process wrapper captures this synchronous throw as a defect. The Tailscale command code maps typed spawn failures, but it does not convert this defect into the existing TailscaleCommandSpawnError. The desktop fallback also handles typed failures only, so the defect escapes the IPC handler.
This affects both Tailscale status reads and Tailscale Serve commands, which use separate spawn paths.
Impact
Minor bug or occasional failure
The Connections endpoint list becomes unavailable for the affected environment, even though the loopback and LAN endpoints can still be calculated without Tailscale.
Version or commit
Observed in an installed macOS desktop build. The failure path was also validated against main at 61514c1294ff79e2a9924551b2042fcc0d1c3a34.
Environment
macOS, T3 Code Desktop, with a non-directory entry in PATH and Network access restored from saved settings.
Logs or stack traces
Error occurred in handler for 'desktop:get-advertised-endpoints': Error: spawn ENOTDIR
errno: -20
code: 'ENOTDIR'
syscall: 'spawn'Screenshots, recordings, or supporting files
None.
Workaround
Remove file entries from PATH, or ensure the directory containing the Tailscale executable appears before the invalid entry.
Disabling Network access also avoids the Tailscale status lookup, but removes the network-accessible endpoint.
Activity