question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ENOSPC (Android 9.0 emulator)

See original GitHub issue

Environment

  React Native Environment Info:
    System:
      OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
      CPU: (4) x64 Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz
      Memory: 1.12 GB / 15.29 GB
      Shell: 4.4.19 - /bin/bash
    Binaries:
      Node: 8.3.0 - ~/.nvm/versions/node/v8.3.0/bin/node
      npm: 6.4.1 - ~/.nvm/versions/node/v8.3.0/bin/npm
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz => 0.57.1

Description

I received the following error message after following the quick start instructions, using expo, and choosing the blank template:

[03:17:09] fs.js:1384
[03:17:09]     throw error;
[03:17:09]     ^
[03:17:09] 
[03:17:09] Error: watch /home/eric/repos/TestReact3/node_modules/asap ENOSPC
[03:17:09]     at _errnoException (util.js:1022:11)
[03:17:09]     at FSWatcher.start (fs.js:1382:19)
[03:17:09]     at Object.fs.watch (fs.js:1408:11)
[03:17:09]     at NodeWatcher.watchdir (/home/eric/repos/TestReact3/node_modules/sane/src/node_watcher.js:175:20)                                                                                                   
[03:17:09]     at Walker.<anonymous> (/home/eric/repos/TestReact3/node_modules/sane/src/common.js:116:12)
[03:17:09]     at emitTwo (events.js:125:13)
[03:17:09]     at Walker.emit (events.js:213:7)
[03:17:09]     at /home/eric/repos/TestReact3/node_modules/walker/lib/walker.js:69:16
[03:17:09]     at go$readdir$cb (/home/eric/repos/TestReact3/node_modules/graceful-fs/graceful-fs.js:162:14)                                                                                                        
[03:17:09]     at FSReqWrap.oncomplete (fs.js:135:15)

This error appeared in the console after attempting to run the app on an Android emulator. The Android emulator displayed a blank white screen, or on some attempts a spinning loading indicator.

Using the solution on this StackOverflow thread fixed the problem, which is why I emphasised “ENOSPC” in the issue title: https://stackoverflow.com/questions/22475849/node-js-what-is-enospc-error-and-how-to-solve/32600959#32600959

and because I know somebody is going to ask, my hard-drive is not full. I have 156GB of free space.

Reproducible Demo

Specific issue is reproduced by following the quickstart instructions instructions on Node.js 8.3, which was installed using nvm, and npm 6.4.1, which was upgraded from the version nvm installed, and then running a new expo project (choosing blank template when prompted) in an Android 9.0 emulator (cold-booted from Android Studio).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
fsoncommented, Dec 28, 2018

Running npm start with sudo is not recommended and should not be necessary.

This error is related to the limit on the total number of inotify watches on Linux and can be fixed by configuring these settings that are required for Watchman to work correctly. To fix the problem, try running this command:

echo fs.inotify.max_user_instances=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
echo fs.inotify.max_queued_events=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

I’ve also created an issue in the Expo CLI repository to show a better error message in this case. (https://github.com/expo/expo-cli/issues/277)

3reactions
fazalWahid56commented, Dec 19, 2018

running npm start command with sudo helped me resolve the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ENOSPC (expo, Android 9.0 emulator) · Issue #22554 - GitHub
This error appeared in the console after attempting to run the app on an Android emulator. The Android emulator displayed a blank white...
Read more >
Android 9.+ emulator does not start - Stack Overflow
I am using Android Emulator version 29.0.11 . However, when I start these up, I see the device frame with a black screen....
Read more >
Emulator release notes - Android Developers
Tested with Android Studio Dolphin and Electric Eel Canary 10. This update includes the following improvements and fixes: [Bug Fix] Embedded Emulator AVD...
Read more >
Android 9 Pie - Xamarin | Microsoft Learn
Create a new Xamarin.Android project that targets Android 9.0. Configure an emulator or device for testing Android Pie apps.
Read more >
Android Emulator - No space left on device
I got this error message when trying to run my app in the Android 1.6 emulator. [ERROR] /Developer/android-sdk/tools/adb failed to copy '/Developer/Appcelerator ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found