Firebase - App Distribution failed to fetch app information: [403] The caller does not have permission [duplicate]
Asked Answered
L

1

14

I was working on Firebase App Distribution using gradle.

I already followed all steps from this firebase official link and it still doesn't work. When I run this ./gradlew assembleDemoDebug appDistributionUploadDemoDebug, it always return this error App Distribution failed to fetch app information: [403] The caller does not have permission .

Here's my gradle settings.

    buildTypes {
    debug {
        ...

        firebaseAppDistribution {
            appId = "1:12345678:android:12345678abc"
            releaseNotes = "test"
            groups = "android-qa"
            serviceCredentialsFile = "android-app-distribution-key.json"
        }
}

I already contacted the google support team, but maybe you guys have a similar experience with this issue. Am I missing something here?

Thanks

Litta answered 15/6, 2020 at 10:7 Comment(1)
same error hereDurr
G
33

A couple things to try. First, make sure the service account has the needed permission. To confirm:

  1. Find the client_email in the service account file
  2. Go to GCP > select your Firebase project > click IAM & admin > click IAM https://console.cloud.google.com/iam-admin/iam?project=_
  3. Make sure the IAM row for the client_email in step 1 has the Firebase App Distribution Admin role, or add it if it is missing. Check by clicking the "edit" pencil icon to the right-side of the row and a panel will show the current roles. If Firebase App Distribution Admin isn't there, press "+ ADD ANOTHER ROLE" and include it.

Also, double check that you're using the most up to date version of the Gradle plugin: https://firebase.google.com/docs/app-distribution/android/distribute-gradle#step_1_set_up_your_android_project

Generate answered 15/6, 2020 at 13:10 Comment(13)
Hi bro, will check it a.s.a.p. will get back to youLitta
this solved my problem! Thanks Alex!Durr
me too, it's solved. thanksLitta
Awesome. I'll see what we can do to make this clearerGenerate
Gradle is up to date and the role is set right, but I still get the error :/Narrowminded
same here @OleksandrNos, could you find a solution?Fortuneteller
@Fortuneteller still no, we decided to wait for a stable release of App DistributionNarrowminded
@Fortuneteller official support told me that they "can't find the service account [[email protected]] with a Firebase App Distribution Admin role." but it was there I swear :D will try that all again a bit later...Narrowminded
@OleksandrNos from what I found out it can be related to the hierarchy of gcloud projects (if there is a parent GCP environment specified for a firebase project). May be it tries to fetch some info from parent organization but it does not have enough permissions or something like that. All in all, we just deleted this firebase project and created a new one, not under a corporate account, and it worked right awayFortuneteller
I am getting same error. Account have correct access, Gradle version is upto date, It was working all fine a month back suddenly it stopped working now with the error > App Distribution failed to fetch app information: [403] The caller does not have permission My jenkins finally gives this errorRudolfrudolfo
Can you see if the service account key has expired? Head to console.cloud.google.com/iam-admin/serviceaccounts (select your project). For the service account under "Actions" click "Edit". Scroll down to "Keys" and check the expiration date.Generate
A few other things to check: 1) does the log output show that our gradle plugin is using the service credentials for auth? 2) is the service account for the right Firebase project, and is the google-services.json for the right project? 3) What happens if you make a new service account? Does it work? (could be related to my previous question about the expiration date, but maybe there's another issue we need to look into)Generate
Sorry, quick clarification on #1 above, you need v1.4.1 or above of the App Distribution plugin to show the auth output methodGenerate

© 2022 - 2025 — McMap. All rights reserved.