Repository navigation
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Problem Description
macOS Local Network privacy uses the main executable's LC_UUID to identify an app. From Apple's TN3179: "If your main executable has no UUID, or shares a UUID with other programs, local network privacy may behave weirdly. To fix that, make sure your main executable has a UUID and that it's unique."
Electron's prebuilt executable has the same LC_UUID for every app on the same version and arch, and packagers copy it unchanged. So macOS mixes up apps that share an Electron version. I ran into this with T3 Code (Nightly) and Signal, both on Electron 44.4.5. T3 Code never got a prompt, and its LAN connections failed with EHOSTUNREACH.
Repro on macOS 27.0 (arm64) with stock Electron 44.4.4:
- Make two copies of Electron.app with different bundle ids (A and B), sign them ad hoc, and have each connect to a LAN address.
- Launch A and click "Don't Allow".
- Launch B. There's no prompt, and its connections fail with
EHOSTUNREACH. The system log shows macOS resolving B to A by UUID:
LocalNetwork: found bundle id test.uuidcheck.B by PID
LocalNetwork: found bundle id test.uuidcheck.A by UUID 4C4C4403-5555-3144-A1BA-D4A9836F93B5
Proposed Solution
Give the main executable its own LC_UUID at package time, before signing, for example derived from the bundle id. I tested this with a third copy (C) where only the main executable was patched. macOS prompted for C, and after I allowed it, connections from both the main process and the network service helper worked, even though the helper kept the stock UUID. codesign --verify --deep --strict passes.
electron-builder asked me to file a issue here to get Electron's view before doing this (electron-userland/electron-builder#10297):
- Is Electron OK with packagers rewriting the main executable's LC_UUID?
- Should @electron/packager / Forge do it, so all packagers behave the same?
- If not, could Electron document it as a workaround?
Alternatives Considered
- Granting Local Network to the other app works, but gives that app LAN access.
- Electron can't fix this in its prebuilt binary, because every app ships the same one.
The patched executable no longer matches Electron's published dSYM. It's only the 53 KB launcher, though, and Electron Framework.framework is untouched, so only main() loses symbols. An opt-in setting would keep the default unchanged.
Additional Information
- Related: macOS: packaged apps share Electron's stock LC_UUID, which breaks Local Network privacy (follow-up to #9158) electron-userland/electron-builder#10297, macOS ignores the desktop app's Local Network permission because it ships Electron's stock executable UUID pingdotgg/t3code#18221
- This is unrelated to Chromium's Local Network Access feature (Local Network Access plans and default behavior #48655).
- Drafted with Claude Code and reviewed by me. The failure above happened on my own Mac.
Activity
fix(desktop): give the packaged app its own LC_UUID
fix: give the macOS launcher a unique LC_UUID
eric1932 commentedon Nov 23, 2026
Adding a real-world case involving shipping apps from three different vendors, plus a few details on how macOS handles the collision. Notably, this contradicts the "Granting Local Network to the other app works" point under Alternatives Considered above: here the colliding app was already allowed, yet the second app stayed blocked with no prompt and never appeared in System Settings.
Setup
com.google.antigravity, Google's IDE with a built-in coding agent that runs shell commands), OpenCode Desktop 2.3.2 (ai.opencode.desktop), and a third unrelated appLC_UUID4C4C447A-5555-3144-A121-6E56C3462D63. With code signatures stripped, the Antigravity and OpenCode main executables are byte-identical./Library/Preferences/com.apple.networkextension.uuidcache.plistmaps all three bundle IDs to that single UUID.What happens
In
/Library/Preferences/com.apple.networkextension.plist, OpenCode's rule was already allowed, while Antigravity's own rule was undetermined (DenyMulticast = true,MulticastPreferenceSet = false), so its traffic was denied.Antigravity never got a permission prompt, never appeared in System Settings → Privacy & Security → Local Network, and every LAN connection from it and its child processes (its integrated terminal and
sshcommands run by its agent) failed withEHOSTUNREACH.On every blocked connection, the unified log shows
UserEventAgentfirst identifying the right app by PID and then switching to OpenCode by UUID:With
ai.opencode.desktopalready having a decision, no prompt appeared — yet Antigravity stayed blocked under its own undetermined rule, even though OpenCode was allowed.Workaround and further observations
In chronological order:
/Applicationsand unregistering it from LaunchServices (lsregister -u) causednehelperto drop OpenCode's UUID mapping. The lookup then resolved tocom.google.antigravity, the prompt finally appeared, and allowing it fixed Antigravity. The third app stayed installed the whole time (its own rule remained undetermined, still mapped to the same UUID), so removing OpenCode alone was enough. (I don't know how macOS picks among several bundle IDs mapped to one UUID.)lsregister -f) causednehelperto rebuild its UUID mapping. Ten seconds later, a LAN connection from Antigravity produced a prompt labelled "OpenCode". Accepting it created anNEPathRulewithSigningIdentifier = ai.opencode.desktopandPath = /Applications/Antigravity.app/Contents/MacOS/Antigravity. (I can't tell from the log why macOS prompted again for an app that was already allowed.)Quick check for anyone affected
Takeaway
Strongly +1 on having packagers (
@electron/packager,electron-builder, etc.) write a uniqueLC_UUIDinto the main executable before signing, as proposed above — ideally by default rather than opt-in or docs-only. Every packaged macOS app using the stock Electron launcher is exposed whenever a user installs another vendor's app on the same Electron version, and most vendors will never notice.Alongside TN3179, Apple's TN3178: Checking for and resolving build UUID problems also states that every distinct Mach-O image should have its own unique UUID.
mmaietta commentedon Nov 23, 2026
+1 on this. The dependency on my side is that I need an upstream "electron-approved" approach so that
electron-builderimplements the same strategy thatpackagerwould take.