Work around broken MAS installs on recent macOS#560
Open
moreaki wants to merge 1 commit into
Open
Conversation
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.
Summary
This is an intermediate workaround for #514.
Latest currently handles Mac App Store updates by:
MacAppStoreUpdateCheckerOperationMacAppStoreUpdateOperation, which usesCKPurchaseControllerto start the CommerceKit install flowThat built-in install path now fails on recent macOS releases. The user-visible result is the
PKInstallErrorDomain Code=201failure discussed in #514, and in some cases damaged or duplicated apps after repeated retries.What this PR changes
For affected macOS versions, Latest now stops offering the built-in MAS update action and falls back to opening the app's App Store page instead.
The workaround is applied as a lower-bound gate, not just for the exact versions first reported in the issue:
14.8.2+15.7.2+26.1+That means later patch/minor releases on those branches, and future major releases after
26, also use the external App Store fallback until we have a proper replacement install path.Why broaden the gate
The current evidence suggests those versions are the start of Apple's new PackageKit behavior, not isolated broken releases:
CVE-2025-43411) described as adding entitlement checks.masproject hit the same breakage and converged on the same lower bounds for its workaround.Given that, a narrower "only these exact versions" check would likely miss later releases that keep the same restriction.
Verification
Built successfully with:
I also tried a focused
OSVersionTestrun, but the existing test target still fails to resolve the privateCommerceKitandStoreFoundationmodule dependencies, so I could not run that test bundle in this environment.Follow-up for the real fix
This is only a mitigation. The proper fix should replace the broken install step rather than redirecting users to the App Store.
The likely shape is:
.pkgand sibling receipt beforestoredownloaddremoves them/usr/sbin/installer -pkg ... -target /App.app/Contents/_MASReceipt/receiptroot:wheelmdimportReferences
masissue:purchase/install/upgradefail withPKInstallErrorDomain 201on macOS 26.1, 15.7.2 & 14.8.2 mas-cli/mas#1029masworkaround PR: Workaround installd/PackageKit access restriction introduced in macOS 26.1, 15.7.2 & 14.8.2 mas-cli/mas#1041