Remote builds require triggering a 1st build from UI
monaca remote build command requires triggering builds from UI before being able to build from command line in these cases:
- 1st iOS build of new project or 1st build after updating provisioning profiles (both debug and release builds): the remote build command always fails and prints the following error message:
Missing release provisioning file. Please upload it from remote build settings by executing
monaca remote build --browser.
The only workaround for this issue is to use a browser to trigger an iOS build in debug and/or release mode depending on the type of build you try to trigger, then the subsequent remote builds triggered from command line will work until the provisioning profiles are updated.
- 1st Android build in release mode: the 1st Android build triggered from command line returns the following error message:
Missing KeyStore configuration. Configure remote build by executing
monaca remote build --browser.
The only workaround for this issue is to use a browser to enter the Android keystore password and trigger an Android release build, then the subsequent remote builds triggered from command line will work until the keystore is updated.
These issues defeat the purpose of having a command line tool to trigger remote builds, and automating build processes with a tool that requires manipulation in UI in some scenario is pretty difficult.
I have already contacted Monaca support regarding this issue back in 2020 and nothing changed since then, the same behavior could be observed when using monaca-lib to trigger remote builds.
Hello @yong-asial @takuyaW @masahirotanaka, can you look into my issue please?
@Ju-NXH
Let me confirm if I understand you correctly:
When building for iOS or Android for the first time—specifically for build types that require a certificate/provisioning profile or keystore—you currently need to initiate the build from the browser first. After that, subsequent builds via the CLI work as expected.
Your request is to be able to perform the initial build directly from the CLI, without needing to go through the browser at all. Is that correct?
Hi @yong-asial, yes that's correct.
@Ju-NXH Got it. Thanks for your confirmation.
We're curious to learn a bit more about how you're currently using the Monaca CLI. Knowing what you're using it for will really help us understand your needs better. It's possible your particular workflow might involve using the browser for builds more than once.
Understanding how you're doing things will help us see if there's anything we can improve or if we can offer some more specific tips.
Hi @yong-asial,
We're using Monaca CLI to automate the build process for our Cordova app. The build process is roughly as following:
- Login to our Monaca account (
monaca login) - Upload our app code (
monaca upload) - Trigger remote build for target platform (either Android or iOS) and build type (debug or release) (
monaca remote build) - Log out (
monaca logout)
This process is used for automated tests running on our integration environment (tests are triggering builds for all target platforms and build types to make sure our mobile app is buildable), and it is used as well by developers when they need to build a development version of our app or when we build the release version before submitting an update to the app stores.
This automated process simplifies the way to build our mobile app as there's no need to access Monaca backend except when we need to install the app on a device after a successful build. The idea was to reduce as much as possible the need for any manual tinkering when someone in our dev team works on the mobile app code, so having to trigger builds manually due to the issue with provisioning profiles not being found or the Android keystore being locked is the only obstacle to achieve 100% unattended builds.
I hope this will help you understand the use of Monaca CLI in our context, please let me know in case you need some more information.
@Ju-NXH Thank you for sharing the details with us. We're now gaining a clearer understanding of your use case and will be discussing it further within our team.
Hi @yong-asial, do you have any update on this?
At present, there are no new developments regarding this matter. We fully recognize the importance of your request for complete build automation using CLI only, and we are actively sharing information and discussing this within our team. We sincerely apologize for any inconvenience this may cause and will keep you informed here as soon as we have further developments. Thank you for your continued patience and understanding.