Skip to content
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

"Too many open files" error when bundling - watchman installed, ulimit=2048 #28761

Closed
dancherb opened this issue Apr 27, 2020 · 3 comments
Closed
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.

Comments

@dancherb
Copy link

dancherb commented Apr 27, 2020

I have a lot of images to bundle with my app (a few thousand, as part of an emoji pack), and recently (after further images were added) I'm receiving the following output and error when attempting to create a bundle with the following command:

react-native bundle --platform=android --dev=false --entry-file=index.js --bundle-output=android/app/src/main/assets/index.android.bundle --assets-dest=android/app/src/main/res

result

Loading dependency graph, done.
Loading dependency graph...info Writing bundle output to:, android/app/src/main/assets/index.android.bundle
info Done writing bundle output
error EMFILE: too many open files, open 'C:\App\node_modules\bugsnag-react-native\package.json'.
Run CLI with --verbose flag for more details.
Error: EMFILE: too many open files, open 'C:\App\node_modules\bugsnag-react-native\package.json'

I can see that the latest images have not been added to res and do not show in release builds of the app.

I'm using Git Bash on VSCode on Windows 10.

I have tried increasing the ulimit open files count with ulimit -n 2048. Before increasing the limit, the error showed a different file for the "too many open files" example (unrelated to Bugsnag, the file currently shown).

Watchman is installed, and I have tried re-installing it. Running watchman.exe -v returns 4.9.4. Maybe it's relevant that watchman is not accessible via watchman -v without the .exe? This seems to be how Bash works on Windows.

React Native version:

System:
    OS: Windows 10 10.0.17763
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 2.35 GB / 7.82 GB
  Binaries:
    Node: 10.15.2 - C:\Program Files\nodejs\node.EXE
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
    Watchman: 4.9.4 - C:\AppData\Local\watchman\watchman.EXE
  SDKs:
    Android SDK:
      API Levels: 23, 25, 26, 27, 28
      Build Tools: 23.0.1, 25.0.0, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3, 29.0.0, 29.0.1, 29.0.2
      System Images: android-22 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: Version  3.6.0.0 AI-192.7142.36.36.6308749
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.5 => 0.61.5
@react-native-bot react-native-bot added the Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used. label Apr 27, 2020
@fabOnReact
Copy link
Contributor

@stale
Copy link

stale bot commented Aug 23, 2020

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.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 23, 2020
@stale
Copy link

stale bot commented Aug 31, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 31, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.
Projects
None yet
Development

No branches or pull requests

3 participants