Skip to content

fix(host): run Tailscale through its real path - #703

Merged
iamnbutler merged 1 commit into
mainfrom
agorischek-fix-tailscale-symlink-crash
Oct 27, 2026
Merged

iamnbutler merged 1 commit into
mainfrom
agorischek-fix-tailscale-symlink-crash

Conversation

@agorischek

Copy link
Copy Markdown
Contributor

With Tailscale 1.104.2 (Standalone), the app binary crashes with Tailscale/BundleIdentifiers.swift:49: Fatal error: The current bundleIdentifier is unknown to the registry when it is run through a symlink, such as the root-owned /usr/local/bin/tailscale that points to Tailscale.app. You can reproduce it in Terminal: TAILSCALE_BE_CLI=1 /usr/local/bin/tailscale status --json exits with code 133.

Ace Helper adopts the login shell's PATH, so Bun.which("tailscale") finds that symlink. Every status check then crashes, and Ace reports "The team's services need Tailscale running on this Mac." and "Start Tailscale first: every channel belongs to a tailnet." even while Tailscale is connected. On the affected Mac, ~/Library/Logs/DiagnosticReports/ had a Tailscale crash report every 10 seconds with parentProc: Ace Helper.

executable() now resolves the found path with realpathSync, so wrapper scripts and the direct app binary keep working.

How I checked it: I loaded apps/host/src/tailnet.ts under the helper's adopted login-shell PATH, against live Tailscale.

  • Before: diagnostics() returned { state: "error", error: "tailscale status failed" } and domain() returned nothing.
  • After: diagnostics() returned { state: "running", ... } and domain() returned the tailnet.

Commands run, all passing: bun run types in apps/host, oxlint on the file, dprint check on the file, and git diff --check.

Related: #539 has the same symptom, but its cause (the tailnet appearing after the helper starts) is different.

Built in Ace

No. I debugged and wrote this in the GitHub Copilot app on the affected Mac. Ace couldn't be used there because of this bug: with no tailnet detected, it couldn't create channels or reach the team's services. This PR was pushed with git push instead of lane push, because lane isn't installed on this machine. The commit has a Why: trailer that lane can promote later.

Tailscale.app's binary crashes ("The current bundleIdentifier is unknown
to the registry") when invoked through a symlink such as
/usr/local/bin/tailscale. The helper adopts the login shell PATH, which
can resolve to that symlink, so every status check crashed and Ace
reported "The team's services need Tailscale running on this Mac."

Why: apps/host/src/tailnet.ts#function executable | Tailscale.app's binary must be run by its real path, never through a symlink, or it crashes
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1cbb2262-7e0b-45cd-a29e-d68510600884
@iamnbutler
iamnbutler merged commit bb02cbd into main Oct 27, 2026
1 check passed
@iamnbutler
iamnbutler deleted the agorischek-fix-tailscale-symlink-crash branch October 27, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants