My Android (React Native / Expo) build is failing with the following error:
Execution failed for task ':app:validateSigningRelease'.
> Keystore file '/Users/vagrant/git/android/app/release-key.jks' not found for signing config 'release'.
Environment:
Where did the issue happen?
Bitrise.io | Xcode 11.1.x, on macOS 10.14.6 (Mojave)
Which build Step causes the issue and which version of the step?
Android Build
Reproducibility
Happens on every build. This is a new app + build so not managed to successfully run the build yet.
Local reproduction
I can build the app locally (via Expo) without issue. I suspect the code signing keystore has not uploaded properly and / or is not referenced correctly.
Local reproduction: Linux / Android (docker based) stack builds
I’ve added a file downloader step to download the keystore from bitrise during the build which has got me past the immediate issue but now it’s complaining that the additional keystore info (password etc.) has not been specified:
Some problems were found with the configuration of task ':app:signingConfigWriterRelease'.
> No value has been specified for property 'signingConfig.keyAlias'.
> No value has been specified for property 'signingConfig.keyPassword'.
> No value has been specified for property 'signingConfig.storePassword'.
I recognise those entries from gradle.properties but as this is an unejected Expo build those files are not present in the repo and are generated at build time via the expo eject step.
NB. This is simply the minimal default app generated by expo init, no custom code of any description. I would expect to follow the Bitrise documentation and for it to “just work”…
Just posting this here, to anyone who might be stumbling into the same problem, @ds-developer figured this out:
The default env vars that the Android build looks for are ANDROID_KEYSTORE_PASSWORD, ANDROID_KEY_ALIAS & ANDROID_KEY_PASSWORD. I’ve had to re-export the BITRISE_ equivalents using “Set Environment Variable” steps before the “Android Build” step. I also had to ensure that the target filename that the “File Downloader” uses matches the default that the Android build expects: “release-key.jks”.