react-native icon indicating copy to clipboard operation
react-native copied to clipboard

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

Open FredAzevedo opened this issue 3 months ago • 8 comments

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?

FredAzevedo avatar Sep 23 '25 19:09 FredAzevedo

Hi, unfortunately this (the packaging and how it is consumed by Xcode) is not something that the Hermes team maintains and we can't help. I will ask around.

tmikov avatar Sep 23 '25 21:09 tmikov

[!WARNING] Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:


You can read more about about it on our website: How to report a bug.

react-native-bot avatar Sep 24 '25 07:09 react-native-bot

cc @cipolleschi

cortinico avatar Sep 24 '25 07:09 cortinico

Project - > under Build Settings -> in Build Options, user script sandboxing, change to No.

Sirojiddin96 avatar Oct 12 '25 05:10 Sirojiddin96

this setting gets defined/updated when you run the "Update Recommended Settings" in xcode, and it will enable it, and then you have to disable it.

robert-barclay-allio avatar Oct 16 '25 14:10 robert-barclay-allio

Project - > under Build Settings -> in Build Options, user script sandboxing, change to No.

This worked! (Sept 2025)

overpassconnect avatar Oct 28 '25 11:10 overpassconnect

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

react-native-bot avatar Nov 22 '25 05:11 react-native-bot

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

react-native-bot avatar Dec 16 '25 05:12 react-native-bot

This issue was closed because it has been stalled for 7 days with no activity.

react-native-bot avatar Dec 23 '25 05:12 react-native-bot