This question is about a network issue when Running Expo builds on your own infrastructure with Expo EAS CLI.
I am trying to run eas build --platform android --non-interactive --local
but I am facing a network error:
...
[PREBUILD] [5/5] Building fresh packages...
[PREBUILD] success Saved lockfile.
[PREBUILD] Done in 36.84s.
[PREPARE_CREDENTIALS] Writing secrets to the project's directory
[PREPARE_CREDENTIALS] Injecting signing config into build.gradle
[CONFIGURE_EXPO_UPDATES] Using default release channel for 'expo-updates' (default)
[RUN_GRADLEW] Running 'gradlew :app:assembleRelease' in /tmp/root/eas-build-local-nodejs/f1c1ab1b-fe51-4bc9-a46a-bfab5cc8c2f7/build/01_App/frontend/android
[RUN_GRADLEW] Downloading https://services.gradle.org/distributions/gradle-7.3.3-all.zip
[RUN_GRADLEW] Exception in thread "main"
[RUN_GRADLEW] java.io.IOException: Downloading from https://services.gradle.org/distributions/gradle-7.3.3-all.zip failed: timeout
...
However, calling wget https://services.gradle.org/distributions/gradle-7.3.3-all.zip
works! Therefore, this network issue only happens from within the eas build
command.
I am running this from a corporate network, and it is not the first time I encounter weird network issues that are hard and tiring to debug. It might be something with DNS resolution, with Docker, with firewall rules, with TLS certificates, I don't know. I've even found another machine from which it works, but I need to run this on this machine.
I'd like to work around this, instead of finding the root cause of the network issue. Since I can download this zip file myself very easily, I was hoping for a way for me to give it to eas build
so that it doesn't try to download it.
- Maybe by putting the zip file in a specific folder?
- Maybe by doing something with the zip file (unzipping, installing somehow)?
- Something else?
The goal is to make eas build
decide it does not need to do this. How can I achieve this?
Thanks!