#51070: fix: remove vestigial MachServices from ShipIt launchd job
Description of Change
🚨 Note: This should be considered a high risk change, and should be tested in the 42 beta before being merged in stable branches.
The MachServices key in the ShipIt launchd job dictionary is a leftover from when ShipIt was an XPC service (removed in Squirrel/Squirrel.Mac@d6ca1c2 in October 2013). Since then, nothing connects to the registered Mach port.
When a macOS system update is pending, launchd puts the user domain into "on-demand-only mode", where only jobs with an on-demand trigger (like a MachServices connection) are started. Since nothing connects to ShipIt's Mach port, launchd pends the spawn indefinitely with: "pending spawn, domain in on-demand-only mode"
This prevents ShipIt from running, causing an Electron app's auto-updates to fail whenever a macOS update is staged. By the time the domain exits on-demand-only mode (after reboot/update completion), the staged update bundle is often stale, leading to "Too many attempts to install" errors.
Removing the MachServices key eliminates the on-demand trigger, so launchd falls back to evaluating KeepAlive.SuccessfulExit which correctly starts ShipIt immediately on submission.
Checklist
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
-
npm testpasses - tests are changed or added
- relevant API documentation, tutorials, and examples are updated and follow the documentation style guide
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed an issue where an Electron auto-update job would occasionally fail if a macOS system update is pending.
Backports
Semver Impact
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron