Repository navigation
fix(host): run Tailscale through its real path - #703
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With Tailscale 1.104.2 (Standalone), the app binary crashes with
Tailscale/BundleIdentifiers.swift:49: Fatal error: The current bundleIdentifier is unknown to the registrywhen it is run through a symlink, such as the root-owned/usr/local/bin/tailscalethat points toTailscale.app. You can reproduce it in Terminal:TAILSCALE_BE_CLI=1 /usr/local/bin/tailscale status --jsonexits 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 withparentProc: Ace Helper.executable()now resolves the found path withrealpathSync, so wrapper scripts and the direct app binary keep working.How I checked it: I loaded
apps/host/src/tailnet.tsunder the helper's adopted login-shell PATH, against live Tailscale.diagnostics()returned{ state: "error", error: "tailscale status failed" }anddomain()returned nothing.diagnostics()returned{ state: "running", ... }anddomain()returned the tailnet.Commands run, all passing:
bun run typesinapps/host,oxlinton the file,dprint checkon the file, andgit 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 pushinstead oflane push, becauselaneisn't installed on this machine. The commit has aWhy:trailer thatlanecan promote later.