-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EAS_BUILD_PROFILE
and EAS_BUILD_PLATFORM
are not always set when running EAS cloud builds
#2112
Comments
Hi, I tried to reproduce your issue based on the config that you gave me, but unfortunately, I failed to do so. I think I would need to get more details about your project to help you. Do you have the |
There is no {
"cli": {
"appVersionSource": "remote"
},
"build": {
"staging": {
"developmentClient": false,
"distribution": "store",
"autoIncrement": true
}
}
} |
I think that the issue for you can be that because you don't have these env vars in your env when running the EAS CLI locally to trigger the build, it can prepare credentials for a different target (probably dev one, because the values which you are relying on are undefined at this moment), but if the env vars are present on EAS. server the target bundle identifier etc. becomes different. |
Some of variables specified in the documentation (like |
I'm so sorry, but I truly can't replicate it in my project. I ran a couple of builds, and I was always able to use these vars in my Could you explain one more time what you expected that will happen in https://expo.dev/accounts/goveni/projects/fairytell/builds/4bafe95a-1542-488b-aa1f-8438c1f17d83 and what went wrong, please? Regarding documentation: It's documented that they are not available when evaluating |
The linked docs about built-in environment variables says:
But what does "when evaluating app.config.js locally" actually mean? I thought it meant that it won't evaluate when I run |
@carleberg can you take a look at expo/expo#24061, it's the same issue and comes with a minimally reproducible example. |
Build/Submit details page URL
here
Summary
We have encountered a recurring issue where the EAS_BUILD_PROFILE and EAS_BUILD_PLATFORM environment variables are not always being set during the execution of EAS cloud builds. Specifically, these variables appear to be missing or not populated in some instances when referenced within the app.config.ts file. This inconsistency is leading to configuration issues and unpredictable build behaviors.
Managed or bare?
Managed
Environment
expo-env-info 1.0.5 environment info:
System:
OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 20.1.0 - ~/n/bin/node
Yarn: 1.22.15 - ~/n/bin/yarn
npm: 9.6.4 - ~/n/bin/npm
SDKs:
Android SDK:
API Levels: 29, 31, 32, 33
Build Tools: 30.0.3, 32.0.0, 33.0.1
System Images: android-24 | Google Play Intel x86 Atom, android-30 | Google TV Intel x86 Atom
npmPackages:
expo: ~49.0.16 => 49.0.16
react: 18.2.0 => 18.2.0
react-native: 0.72.6 => 0.72.6
Expo Workflow: managed
npx expo-doctor
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that packages match versions required by installed Expo SDK
✔ Check that native modules use compatible support package versions for installed Expo SDK
Didn't find any issues with the project!
Error output
No response
Reproducible demo or steps to reproduce from a blank project
app.config.ts
file:Run the build over EAS, notice that the build profiles are not reliably read, this is causing inconsistencies in the
name
filed and causes the iOS build to fail.The text was updated successfully, but these errors were encountered: