on a project I setup with fastlane a lane to build an android app and publish it on appcenter.
Here a snippet of the lane, where, for the sake of simplicity, I surround by curly brackets protected data:
lane :buildAndDeploy do
gradle(task: "clean assembleRelease")
appcenter_upload(
app_name: "{myappname}",
api_token: "{token}",
owner_name: "{ownername}",
owner_type: "user",
file: "{filePath}"
)
Everything worked like a charm till two weeks ago, when suddently it stops working. When the lane cruise to the appcenter upload step I receive this from the plugin.
------------------------------
--- Step: appcenter_upload ---
------------------------------
App with name {appname} not found, create one? (y/n)
as indicated in the documentation the app name and owner name are populated like this:
https://appcenter.ms/users/{ownername}/apps/{appname}
Any idea of what could have happened in the past two weeks? I didn't change anything both on the Fastfile and the Appcenter project.
Finally I discover where was the issue.
Running this command with appcenter cli
appcenter apps list --token <MY_TOKEN> --debug
I found out that the token I was using didn't belong to the owner of the project, instead it belonged to a different user who has been removed from the project.
Adding a new API token resolved the issue.