GithubHelp home page GithubHelp logo

exp socket hang up about appr HOT 4 CLOSED

formidablelabs avatar formidablelabs commented on July 20, 2024
exp socket hang up

from appr.

Comments (4)

aurbina83 avatar aurbina83 commented on July 20, 2024 8

I was able to bypass this issue by adding nonPersistant to the app.json

{
  "expo": {
    "sdkVersion": "20.0.0",
    "packagerOpts": {
      "nonPersistent": "--nonPersistent"
    }
  }
}

from appr.

AndrewSouthpaw avatar AndrewSouthpaw commented on July 20, 2024 2

For future googlers who came upon this problem... We tried the nonPersistent configuration options (both "nonPersistent": "--nonPersistent" and "nonPersistent": true) in packagerOpts` but none of them worked.

Try this: echo 'fs.inotify.max_user_watches=524288' | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Long version

We tried the nonPersistent configuration options in packagerOpts but none of them worked.

The ENOSPC error code was critical in solving the problem. It was fixed with this line:

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

inotify is the system that watchman (a file watcher made by Facebook) uses, and watchman is used by Expo. It appears for Travis we would hit the limit of watches and report we had no more space, but actually we just ran out of file descriptors. The line above increases that amount. More here. You could also probably try installing watchman, but that seemed pretty difficult to do on Ubuntu and the above command worked for us so whatever.

In our particular case, we were using default Travis builds, which it turns out runs on Ubuntu 14. It didn't particularly like the command above, so we switched to using Ubuntu 16 (Xenial) and had to enable sudo mode. So, for Travis folks, here's the salient details in our .travis.yml file:

dist: xenial

# We needed to specify PostgreSQL 10 once we switched to Ubuntu 16
# you might need this as well
addons:
  postgresql: "10"

# then add the script however you want

We also noticed that it would choke when we used the && with the command, so we split it into two separate operations:

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

Hope this is helpful to other people!

from appr.

Atheane avatar Atheane commented on July 20, 2024

Thank you so much for sharing.

from appr.

conrad-vanl avatar conrad-vanl commented on July 20, 2024

Should this be included in the project readme for setup? I can confirm that on a new CRNA project, setup fails without this option in app.json (with Travis CI atleast).

from appr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.