Fastlane distribution failed with error "App Distribution could not find your app"

Viewed 5204

I am developing react-native project for Android and iOS.

I use Fastlane to distribute my Android app to Firebase App Distribution. I have followed firebase instruction and fastlane instruction to set up those tools.

In fastlane part, here is my Fastfile :

desc "Submit a new Beta Build to firebase app distribute"
  lane :beta do
    gradle(task: "clean assembleRelease")

    firebase_app_distribution(
      app: "1:4823523451:android:fb106cd9iu76gr3ededc0",
      firebase_cli_token: "1//0cDO6RQESnRMvCgYIACAAgAwSNwF-L9IrPk97hOEsuXxXNHXUfpKQRsiAsqu_mmGhGmOPoIfdfThgjHoKlJS4X4auLr_d2QoLSXg",
      groups: "qa-team, trusted-testers",
      release_notes: "my 1st release",
      testers: "n1cer4@gmail.com",
      debug: true)
  end

The firebase_cli_token above is the refresh token I take by run command bundle exec fastlane run firebase_app_distribution_login

The app id is correct as well.

When I run fastlane beta, I end up with the following error which says App Distribution could not find your app. Make sure to onboard your app by pressing the "Get started" button on the App Distribution page in the Firebase console (I hide some sensitive information in the screenshot ):

enter image description here

I don't see the error message mentioned "Get started" button. And when I go to my firebase console, the apk file is uploaded there:

enter image description here

So, why I got that error when run fastlane beta ?

(BTW, in above screenshot, you can see it indicates one tester is invited, actually I added that tester manually on the firebase console, as you can see my Fastfile has testers defined but they are not added as testers by fastlane, I guess it is because of the error I am encountering.)

4 Answers

When you click on the app distribution tab, there is a drop down menu next to the header for android and iOS projects. You have to click the "get started" for both.

If you have multiple flavors/apps in your project, make sure to press the "get started" button for each of them (check in the dropdown near the "App Distribution" title)

If you still encounter the issue, check the API responses given with debug=true, since the "could not find your app" message is very misleading and happens with every 404 response. In my case, I was putting the wrong "groups" parameter.

In my case, I had authenticated Fastlane using Firebase service account credentials. I encountered the same error

App Distribution could not find your app. Make sure to onboard your app by pressing the "Get started" button on the App Distribution page in the Firebase console

I noticed there was an additional service account I had configured wrongly. After deleting the account, I was able to distribute.

I had the same error. I solved it updating the plugins:

bundle exec fastlane update_plugins

Also, the fastlane help recommended the last version. I installed it executing:

sudo gem install fastlane
Related