Skip to content

Sandbox error when compiling iOS with Hermes: "Operation not permitted" and "No such file or directory" (Apple Silicon/Xcode) #53915

@FredAzevedo

Description

@FredAzevedo

Bug Description

I'm experiencing sandbox errors when building a React Native project with Hermes enabled on iOS. The build fails with messages related to the Hermes framework, such as:

Sandbox: rsync(...) deny(1) file-read-data .../hermes.framework/Info.plist
Sandbox: rsync(...) deny(1) file-write-create .../hermes.framework/.hermes.XXXX
hermes.framework/hermes: utimensat (2): No such file or directory
Operation not permitted

Environment:

  1. macOS: [Sonoma 14.2]
  2. Xcode: [15.3]
  3. React Native: 0.81.4
  4. Hermes: default (bundled with React Native)
  5. Apple Silicon: [M1]

What I have tried:

  1. Gave Full Disk Access to Xcode in System Preferences.
  2. Cleaned Xcode cache (rm -rf ~/Library/Developer/Xcode/DerivedData).
  3. Ran pod deintegrate and pod install in the ios folder.
  4. Updated all dependencies with yarn upgrade and pod update.
  5. Built the project directly in Xcode.
  6. Tried running Xcode under Rosetta.
  7. Checked folder permissions with chown.

Detailed log:

Sandbox: rsync(7116) deny(1) file-read-data /Users/fredazevedo/Library/Developer/Xcode/DerivedData/associanet-fnbakryxbfssxlbjmkzzrxdalzcl/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/hermes-engine/Pre-built/hermes.framework/Info.plist
Sandbox: rsync(7117) deny(1) file-write-create /Users/fredazevedo/Library/Developer/Xcode/DerivedData/associanet-fnbakryxbfssxlbjmkzzrxdalzcl/Build/Products/Debug-iphonesimulator/associanet.app/Frameworks/hermes.framework/.hermes.h0TkeTJQAi
hermes.framework/hermes: utimensat (2): No such file or directory
Operation not permitted

Question:

How can I resolve this sandbox error? Is there any extra configuration for Hermes or a workaround for Apple Silicon/Xcode builds?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugNeeds: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions