Expo + linux mint 18.2


#1

Hi,

I downloaded the .AppImage, ran it and I get the front end, open the project and in the log it says “Project opened… Use Share device”. So it all looks good.

However, when I try to open it just fails straight away, not even the app loading screen.

With the tunnel it just goes red saying cant create a tunnel back to localhost:19001. With LAN it says “Uncaught Error: Packager is not running at http:/…:19001”

Whats confusing me a little is in the expo URL its saying 19000 not 19001. I hazard a guess expo runs 2 servers? one for the logs / connection (19000) at the react native packager on 19001?

If I netstat I can see a running process listening on 19000, but nothing on 19001. If I switch protocol to http in my browser I get a json blob from 19000 in my browser.

Any ideas? The switch to linux solved my adb problems / I get the same errors on my virtual devices as I do on my phone which is nice.

Are there any more logs? I’m thinking /guessing here the package manager is dying / not starting up on 19001 but I cant see any logs.

Thanks for any help.


#2

ah, found a ~/.expo directory with some more logs in, tailing it I see “packager process exited with code 11”


#3

Well that was fun, fathomed out how to run via NPM and it hung when starting react package manager, googled that and found this:

https://github.com/react-community/create-react-native-app/issues/234

So yeah, “sudo sysctl -w fs.inotify.max_user_watches=10000” fixed the issue, albeit until I reboot. To make it permanent it needs to be set in /etc/sysctl.d directory or /etc/sysctl.conf. Rather than rebooting to apply, “sudo sysctl -p --system” can apply it and then you just need to restart expo / terminal after.

Its also seems a common issue with intellij which is obviously doing alot with files / directory too https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit, there’s a bit more info about what the problem is there / how inotify works.

Seems expo tries to either open this all in parallel / doesnt check the package manager actually starts, which suppresses the issue.

But yeah, now it works :slight_smile:


Packager starting then stopping
#4

nice sleuthing, this is good to know