Hive Hive
Sign in

Sandboxing is failing build unexpectedly on Github Actions

GitHub issue · Open

Metadata
Source
tuist/tuist #8206
Updated
Jun 11, 2026
Domains
Compute
Details

What happened?

When trying to run our builds with Xcode 26 on Github actions. The sandboxing seems to be failing unexpectedly. Specifically when we run Xcode-select to select a specific Xcode version (sudo xcode-select -s /Applications/Xcode_26.0.0.app/Contents/Developer)

How do we reproduce it?

This is where I’m struggling a bit to be certain on the exact steps, and whether this is a bug with Tuist’s implementation or with how Github actions is maybe symlinking Xcode versions? I haven’t been able to recreate this on a local machine. So the fault may lie with Github. But I thought I’d come here first

What I have is a project with an action to run on github. One of the first steps we run is to select the specific Xcode version we want. Currently we’re using…

sudo xcode-select -s /Applications/Xcode_26.0.0.app/Contents/Developer

I have worked around the issue by using the Mac OS 26 image and removing the call to xcode-select and just accepting the default version of Xcode tools in the image. Since Xcode 26 is the default in that image.

So it seems to me that this is the key to recreating the issue, selecting some Xcode folder that isn’t just the default version.

Error log

Error
The command `sandbox-exec -p '(version 1)
; Deny all operations by default unless explicitly allowed
(deny default)
; Import base system rules
(import "system.sb")
; Allow process operations (fork, exec, etc.)
(allow process*)
; Allow querying information about the current process
(allow process-info* (target self))
; Allow reading file metadata (permissions, size, etc.)
(allow file-read-metadata)
; Allow reading and writing temporary and intermediate build files and caches
(allow file-read* file-write* (subpath "/private/tmp/"))
(allow file-read* file-write* (subpath "/private/var/"))
; Allow reading from specified paths
(allow file-read* (subpath "/Library/Preferences/com.apple.dt.Xcode.plist"))
(allow file-read* (subpath "/Users/runner/work/dwell-ios/dwell-ios/Project.swift"))
(allow file-read* (subpath "/Applications/Xcode_26.0.0.app"))
(allow file-read* (subpath "/Users/runner/.local/share/mise/installs/tuist/4.68.0/bin"))
(allow file-read* (subpath "/Users/runner/.cache/tuist/ProjectDescriptionHelpers/8325d122678db4f2d54c6746d900279a"))' /usr/bin/xcrun swift -suppress-warnings -I /Users/runner/.local/share/mise/installs/tuist/4.68.0/bin -L /Users/runner/.local/share/mise/installs/tuist/4.68.0/bin -F /Users/runner/.local/share/mise/installs/tuist/4.68.0/bin -lProjectDescription -framework ProjectDescription -I /Users/runner/.cache/tuist/ProjectDescriptionHelpers/8325d122678db4f2d54c6746d900279a -L /Users/runner/.cache/tuist/ProjectDescriptionHelpers/8325d122678db4f2d54c6746d900279a -F /Users/runner/.cache/tuist/ProjectDescriptionHelpers/8325d122678db4f2d54c6746d900279a -lProjectDescriptionHelpers /Users/runner/work/dwell-ios/dwell-ios/Project.swift --tuist-dump` exited with error code 1 and message:
xcrun: error: unable to load libxcrun (dlopen(/Applications/Xcode_26.0.0.app/Contents/Developer/usr/lib/libxcrun.dylib, 0x0005): tried: '/Applications/Xcode_26.0.0.app/Contents/Developer/usr/lib/libxcrun.dylib' (file system sandbox blocked open()), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode_26.0.0.app/Contents/Developer/usr/lib/libxcrun.dylib' (no such file), '/Applications/Xcode_26.0.0.app/Contents/Developer/usr/lib/libxcrun.dylib' (file system sandbox blocked open())).

macOS version

26

Tuist version

4.68.0

Xcode version

26

Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments
D
dosubot[bot] Sep 15, 2025

Hi @braker1nine! I’m Dosu and I’m helping the tuist team.

This issue happens because Tuist’s sandbox profile allows read access to the selected Xcode app directory, but that isn’t always enough for Xcode’s internal libraries like libxcrun.dylib—especially on CI runners where Xcode installs may be symlinked or have different permissions. When you switch Xcode versions with xcode-select, Tuist dynamically updates the sandbox to include the new Xcode path, but if the sandbox doesn’t explicitly allow access to all required subpaths, you can hit errors like “file system sandbox blocked open()” for dylibs inside the Xcode bundle (source).

Workarounds:

  • The quickest fix is to disable sandboxing in your manifest using disableSandbox in Tuist.GenerationOptions, but this is discouraged because it can slow down generation and break manifest caching (docs, issue).
  • The preferred approach is to avoid file system operations in your manifests and use environment variables for configuration data instead (issue).
  • If you must select a non-default Xcode, try to ensure the runner’s Xcode install isn’t symlinked and has standard permissions, or stick to the default Xcode version provided by the runner image.

No recent Tuist changes address this directly, so if you need broader access, disabling the sandbox is the only immediate workaround.

To reply, just mention @dosu.


Share context across your team and agents. Try Dosu.

Leave Feedback Learn about tuist with Dosu Add Dosu to your team

J
justinvallely Sep 17, 2025

@dosu

We’re seeing a similar issue in our CI environment but we can’t produce it locally. The full output from tuist generate is below, but perhaps the most telling line is error: cannot open file '/Users/vagrant/.local/share/mise/installs/tuist/4.74.1/bin/ProjectDescription.framework/Modules/module.modulemap': Operation not permitted

If we disable the sandbox in our manifest, everything works as expected.

Loading and constructing the graph
It might take a while if the cache is empty
✖ Error
The command `sandbox-exec -p '(version 1)
; Deny all operations by default unless explicitly allowed
(deny default)
; Import base system rules
(import "[system.sb](https://system.sb/)")
; Allow process operations (fork, exec, etc.)
(allow process*)
; Allow querying information about the current process
(allow process-info* (target self))
; Allow reading file metadata (permissions, size, etc.)
(allow file-read-metadata)
; Allow reading and writing temporary and intermediate build files and caches
(allow file-read* file-write* (subpath "/private/tmp/"))
(allow file-read* file-write* (subpath "/private/var/"))
; Allow reading from specified paths
(allow file-read* (subpath "/Applications/[Xcode-26.0.0.app](https://xcode-26.0.0.app/)"))
(allow file-read* (subpath "/Users/vagrant/git/Workspace.swift"))
(allow file-read* (subpath "/Users/vagrant/.local/share/mise/installs/tuist/4.74.1/bin"))
(allow file-read* (subpath "/Library/Preferences/[com.apple](https://com.apple/).dt.Xcode.plist"))
(allow file-read* (subpath "/Users/vagrant/.cache/tuist/ProjectDescriptionHelpers/afcae3bff2bd317a327834f5d0c74361"))' /usr/bin/xcrun swift -suppress-warnings -I /Users/vagrant/.local/share/mise/installs/tuist/4.74.1/bin -L /Users/vagrant/.local/share/mise/installs/tuist/4.74.1/bin -F /Users/vagrant/.local/share/mise/installs/tuist/4.74.1/bin -lProjectDescription -framework ProjectDescription -I /Users/vagrant/.cache/tuist/ProjectDescriptionHelpers/afcae3bff2bd317a327834f5d0c74361 -L /Users/vagrant/.cache/tuist/ProjectDescriptionHelpers/afcae3bff2bd317a327834f5d0c74361 -F /Users/vagrant/.cache/tuist/ProjectDescriptionHelpers/afcae3bff2bd317a327834f5d0c74361 -lProjectDescriptionHelpers /Users/vagrant/git/Workspace.swift --tuist-dump` exited with error code 1 and message:
<unknown>:0: error: cannot open file '/Users/vagrant/.local/share/mise/installs/tuist/4.74.1/bin/ProjectDescription.framework/Modules/module.modulemap': Operation not permitted
/Users/vagrant/git/Workspace.swift:1:8: error: no such module 'ProjectDescription'
1 | import ProjectDescription
| `- error: no such module 'ProjectDescription'
2 | import ProjectDescriptionHelpers
3 |
Sorry this didn’t work. Here’s what to try next:
▸ If the error is actionable, address it
▸ If the error is not actionable, let's discuss it in the <Troubleshooting & how to: https://community.tuist.dev/c/troubleshooting-how-to/6>
▸ If you are very certain it's a bug, <file an issue: https://github.com/tuist/tuist>
▸ Check out the logs at /Users/vagrant/.local/state/tuist/logs/C6B6D862-3BE9-4534-9CCA-9E0E0197135E.log
Tuist project generation failed
F
fortmarek Sep 18, 2025

Hey folks 👋

disableSandbox is the best workaround for now, although it should not be needed. @hiltonc any ideas why this is happening?

H
hiltonc Sep 21, 2025

I would not expect to see this:

'/Applications/Xcode_26.0.0.app/Contents/Developer/usr/lib/libxcrun.dylib' (file system sandbox blocked open())

with this in the sandbox profile:

(allow file-read* (subpath "/Applications/Xcode_26.0.0.app"))

or this:

cannot open file '/Users/vagrant/.local/share/mise/installs/tuist/4.74.1/bin/ProjectDescription.framework/Modules/module.modulemap': Operation not permitted

with this in the sandbox profile:

(allow file-read* (subpath "/Users/vagrant/.local/share/mise/installs/tuist/4.74.1/bin"))

I’m not an expert on sandbox profiles, there may be a straightforward setting that we need that I’m not aware of.

If we wanted sandbox to be opt out, we could automatically disable it for CI, since we’d probably get most of the benefit locally anyway.