Repository navigation
fix(macos): detect the App Sandbox; the updater refuses, MCP and extensions say why (#1593) - #1702
Merged
Merged
Conversation
…sandboxed app, MCP and extensions say why they cannot work (#1593)
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.
Closes #1593.
The release builds are not sandboxed (#1592), but a debug build (
DebugProfile.entitlements) and any store-style build are. In the sandbox the in-place update, extensions and MCP fail without a word.MacOsSandbox(lib/core/platform/macos_sandbox.dart):detect(environment)is true whenAPP_SANDBOX_CONTAINER_IDis set orHOMEis inside~/Library/Containers/;isActiveis that on macOS, false elsewhere, with adebugOverridefor tests;unavailable(feature)is the one message.UpdateInstallContext.macAppBundleReplaceProblemForreports the sandbox before the translocation and writable checks from fix(updater): macOS in-place update can quit the app and leave a broken bundle #1587, so the update is refused with "download the new version from the release page" instead of the replace script quitting the app. This is the same pre-flight fix(updater): macOS in-place update can quit the app and leave a broken bundle #1587 added, so it runs both before the download and right before the replace.Verified on Linux only: the detection is pure and covered by tests, and the UI path runs through the override. I have no Mac to check that a debug run really sets these variables, but both are what the sandbox documents.
Tests: detection for the container id, a container
HOME, an empty id and an ordinary environment; the override; the updater message for a sandboxed context; the Extensions notice with and without the sandbox.