-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when archiving in XCode: EMFILE #29915
Comments
Interesting development. If I manually run the xcodebuild command the archive succeeds:
Isn't this basically identical to Product > Archive in XCode? Are there any explanations for this? Another note: Another much smaller RN app archives successfully in XCode on my machine. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
same issue ... |
I am getting the same error. The program builds fine in the command line but has this error when built in xCode. |
Same issue here. |
I am also experiencing this issue. It occurs at the |
still exist RN 0.64. tried nodejs 14 / 16. Watchman installed. OS BigSur. chip M1 ulimit -a: Reinstalling watchman and changing kern.maxfilesperproc / kern.maxfiles not helps. |
Same issue on Macbook M1. The issue in my opinion is that the metro bundler does not start up inside a separate new terminal like it does when I am archiving in my intel macbook. The metro bundler attempts to start inside the xcode where it does not let watchman work properly so this error gets thrown. |
This got fixed recently in newest version of watchman. The problem was with bug in fsevents library for mac m1 which got fixed in latest release. Update your watchman, reinstall your project, pods everything and things should work |
@ekram21 I upgraded watchman, yarn install, and npx pod-install and I am still getting the same error. Am I missing something? |
I don't know your environment and what device you are using but I will list the things to keep in mind:
Also look at this thread: facebook/metro#668 These are the steps I followed to make the project archive in xcode. Note that the project would compile fine in simulator outside of xcode before but the above steps finally got it to archive in xcode where it was failing EDIT: Also if everything fails then please reset your device, install all latest versions of software needed, follow above steps and then create a clean react-native project using latest watchman and all tools and see if it archives properly. Some people I know have reported success in this method compared to working with existing projects. If this works you can then slowly start figuring out which module is causing problem in existing project. |
@ekram21 which watchman version are you using? |
any updates on this issue? I am getting the same issues `events.js:377 Error: EMFILE: too many open files, watch |
Works for me with same error on latest version of watchman error. |
Still Same issue on MacBook M1 |
still present EDIT:
|
I started having this issue after upgrading to yarn 2 |
Still |
same here, currently on Venture 13.1 trying to run yarn test |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
I was able to fix that issue by both installing watchman and setting the path to homebrew on XCode build phase "Bundle React Native code and images" before the react native xcode shell script, as follows:
Solution found on https://stackoverflow.com/a/70177808/17614397 |
I did this but issue is still there export NODE_BINARY=/opt/homebrew/opt/node@22/bin/node |
Having same issue on M1, building for debug is working without any problem. I've tried all mentioned solutions here, also suggested "working" fix from this stackoverflow but without any success. XCode at version 16. Using
I had no problems. |
This solution to add "export PATH=/opt/homebrew/bin:$PATH" worked for me. |
This error has been reported before, but the solution did not help me.
Description
I am seeing this error when archiving from XCode. I have not encountered this issue before and have tried reverting my code:
I have tried the following steps to fix:
sudo port uninstall watchman
,sudo port install watchman
, reboot) (this has been the solution on similar issues but has not helped me)If I run the bundle command manually from terminal it succeeds, it only seems to have a problem when archiving from XCode.
I also run
npx react-native doctor
and there is a ✅ next to WatchmanVersions:
Environment: macOS Catalina
React Native CLI Version: 4.10.1
Node Version 12.16.1
React Native Version: 0.63.2
Watchman Version: 4.9.0
The text was updated successfully, but these errors were encountered: