I’m trying to submit a build to the App Store with the same version but incremented buildNumber (which is set in app.json and visible in the build summary on expo.dev). I submit the build using
eas build --platform ios --profile production --non-interactive --auto-submit --wait
but this fails with the error
You've already submitted this version of the app.
Versions are identified by Build Numbers (expo.ios.buildNumber in app.json).
If you're submitting an Expo project built with EAS Build, increment the build number in app.json and build the project again
Looking at the submission log, it seems the buildNumber is not being passed to Fastlane which is submitting with buildNumber “1”:
Any ideas what I’m doing wrong?
I’m using:
- Managed workflow
- eas-cli/0.38.3 darwin-x64 node-v16.11.1
Is the any additional information I can provide to help diagnose the problem?
I think I figured out where things are going wrong -
My config is dynamic, using an environment variable in app.config.json:
export default ({ config }) => {
const cfg = ({
...config,
ios: {
...config.ios,
buildNumber: process.env.GITHUB_RUN_NUMBER
},
});
console.log("Dynamic Config:", cfg);
return cfg;
}
eas build
uses the dynamic config correctly and generates a build with buildNumber set to my GITHUB_RUN_NUMBER env var, however the submission step does not, presumably because it’s happening on expo servers where the env var does not exist.
If I disable auto-submit and run the submission manually from my local machine it also fails:
GITHUB_RUN_NUMBER=10 eas submit --platform ios
So, I’m not sure if this is a bug, but it does seem like we’re unable to configure submissions dynamically in the same way as a build.