Comments (5)
Hey,
I suspect that you get this error because when resolving credentials for your project you don't have APP_NAME
env var set locally when running eas build
and we use the fallback value from package.json
. Secrets are only available during cloud builds and are not accessible in EAS CLI when resolving stuff.
What I think you can do is add APP_NAME
to the env
section of your eas.json. I don't think that app name is a secret, is it? I would also remove it from secrets.
{
"build": {
"production": {
"env": {
"APP_NAME": "myappname"
}
}
}
}
from eas-cli.
@szdziedzic Thanks for the response. I'm on the same page with you.
But there are two questions then:
- If I'm developing a multi-tenat app (same codebase, multiple Expo projects and apps in AppStore/PlayStore) - I have to store two unique identifiers (project id and project slug) for each project outside of Expo. And now it turned out that I also need to store app name for each project. I'm curious why having just project id isn't enough (for submitting a build).
- I'm also curious why it doesn't work the same way for app identifiers then? Even if I don't have
ios.bundleIdentifier
andandroid.package
and provide fallback (see the screenshot) - I'm able to submit a build and an identifier will be taken from the EAS Secrets and used for my build.
![image](https://private-user-images.githubusercontent.com/37838803/313667320-ff263043-f19c-4aa7-b53d-98c8cbbc533e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzNDc1MTAsIm5iZiI6MTcxODM0NzIxMCwicGF0aCI6Ii8zNzgzODgwMy8zMTM2NjczMjAtZmYyNjMwNDMtZjE5Yy00YWE3LWI1M2QtOThjOGNiYmM1MzNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE0VDA2NDAxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmYmFlZTZkNWQ5NGFlMmU2NzU4MDBlNWQ4OTlmZTIwNDE1ZTNjZjIyNjFlMTk0MDdlYzE3NTBkYjVhNDgyZTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.xjtoEFwbVVEuZwQcc5Cihl1jkhkCKGeJayzyR5vHx5M)
from eas-cli.
I'm curious why having just a project ID isn't enough (for submitting a build)
The reason is that the EAS CLI is the place where the resolution of all credentials and other settings for a build. It happens based on the app.json
contents and other project configurations (like whether you have ios
and android
directories in your project, what are the tooling versions installed, and so on). The Xcode build scheme used by the build is resolved based on the name
from app.json
in CLI and is used during the build process. The name
+ other stuff need to be correctly defined (if it doesn't match the credentials may not match during the build process, and so on) when running the eas build
command, so the CLI can resolve the best build configuration for you.
Additionally, it is allowed to have multiple different sets of credentials per one project, so credentials to the project aren't 1:1 mapping.
I'm also curious why it doesn't work the same way for app identifiers then? Even if I don't have ios.bundleIdentifier and android.package and provide fallback (see the screenshot) - I'm able to submit a build and an identifier will be taken from the EAS Secrets and used for my build.
It's interesting that it even works for you because provisioning profiles are per (Apple) project 🤔 https://docs.expo.dev/app-signing/app-credentials/#provisioning-profiles
However, what I can recommend to you is using the GitHub build trigger for EAS builds. During GH-triggered builds the credentials are resolved on the server side, so you should get correct results using your current setup and it doesn't matter what you have specified for EAS CLI (because it is not used to trigger the build)
https://docs.expo.dev/build/building-from-github/
from eas-cli.
Does it make sense to you?
from eas-cli.
@szdziedzic Probably unrelated, but how can I manage secrets/environment variables for different profiles(dev, staging and production) remotely? I have configured app.config.ts
and eas.json
to an extent at least but figured I don't know to deal with this.
from eas-cli.
Related Issues (20)
- error: SHA-1 for file /var/folders... is not computed. HOT 15
- Could not read bundle identifier from Xcode project (target = XXXX, build configuration = Release). HOT 1
- React Navigate Drawer Button behaves differently when using eas build and eas update HOT 1
- eas build fails when using .yarnrc.yml that contains relative path to files HOT 1
- EAS build in CI fails with Husky and git v2.45.1 HOT 2
- eas submit error "Cannot read properties of undefined" HOT 8
- Running EAS Build with `--local` can't access EAS Secrets but also can't access `.env.local` HOT 2
- Build no longer working [Could not locate a valid AppDelegate at root] HOT 5
- [EAS Build] EAS Build should adhere to the package manager version set in package.json HOT 3
- Getting error: "Error: GraphQL request failed." while running "eas login" HOT 1
- Resign command doesn't filter builds by profile HOT 7
- Build request failed: Unexpected server error HOT 4
- eas-build-pre-install hook with `node ./scripts/our-script.js` errors HOT 2
- EAS on CI, iOS submit "Set ascAppId in the submit profile (eas.json) or re-run this command in interactive mode." even if ascAppId is present HOT 2
- `eas update` command failed HOT 8
- Unable to submit new build after accepting new Apple Developer Program License Agreement HOT 1
- IOS local build fail - ARCHIVE FAILED HOT 5
- Submission Failed - Cannot read properties of undefined (reading 'attributes') HOT 7
- react-native-element and react-native-paper icons no longer showing in eas build HOT 4
- Babel is not running to compile and transform NativeWind styles only for Production Builds. Works fine for all other build types HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eas-cli.