Hello, i have a problem with EAS Build.
I’m running the command:
“eas build --platform android”
Linux-x64
EXPO SDK: 45
EAS-CLI: 2.1.0
EXPO-CLI: 6.0.6
Workflow: Managed
Apparently the problem is not in the project configuration, since I tried to run it with a version that worked before and it still didn’t run giving the same message.
See logs for the “Run gradlew”:
This doesn’t seem to me to be an error in my project:
“[stderr] error EMFILE: too many open files, open '/tmp/metro-cache…”
and yes in “eas build”
wkozyra
September 30, 2022, 1:32pm
2
Can you try adding
"scripts": {
"eas-build-pre-install": "sysctl -w fs.inotify.max_user_watches=524288",
in your package.json?
Note this is just to test, it will probably break iOS build, you will need to check for platform to use that as a workaround.
1 Like
I added this line in my package.json
scripts as suggested
{
...
"scripts": {
...
"eas-build-pre-install": "sysctl -w fs.inotify.max_user_watches=524288",
...
}
...
}
But I got the build error in “Run gradlew” apparently the error persists:
wkozyra
September 30, 2022, 2:23pm
4
sorry forgot about sudo
sudo sysctl -w fs.inotify.max_user_watches=524288
The “Pre-install hook” ran successfully with “sudo”
But the “Run gradlew” the error persists
I did some research, it seems that it is related to this, but I couldn’t change it.
I have no idea what could be happening, I tried to change the limits but it seems that the configuration is not maintained between the steps
@nappsolutions did you find the solution, we are facing the same issues
@ wkozyra any thing else we can do to get this fixed, we are blocked due to this.
We are working on a fix, in the meantime you can try switching to newer ubuntu, it seems that low limit to nofiles
is only happening on ubuntu 18
note that sudo sysctl -w fs.inotify.max_user_watches=524288
in preinstall hook might still be necessary.
1 Like
@wkozyra Thanks a lot, I used the latest image and it worked for us.
In eas.json added the latest image for the preview profile
"preview": {
"distribution": "internal",
"android": {
"buildType": "apk",
"image": "latest"
},
}
@wkozyra
Switching to newer ubuntu (from ubuntu-18.04-jdk-11-ndk-r19c to ubuntu-20.04-jdk-11-ndk-r21e) worked for me even without the Pre-install hook in the package.json
{
...
"scripts": {
...
"eas-build-pre-install": "sudo sysctl -w fs.inotify.max_user_watches=524288",
...
}
...
}
Just changing the eas.json
solved it for me
{
...
"build": {
...
"profile-name": {
"android": {
"image": "default"
},
...
}
...
},
...
}
As they are already working on a fix I will keep this temporary solution…
Thank you very much to you and all of the Expo Team.
system
Closed
October 23, 2022, 12:35pm
14
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.