1

What I do:

> export FIREBASE_TOKEN=***
> export GOOGLE_APPLICATION_CREDENTIALS=/home/MyProject/app/serviceCredentialsFile.json
> ./gradlew --stop
> ./gradlew assembleDebug appDistributionUploadDebug

Result:

> Task :app:appDistributionUploadDebug FAILED
Found APK at /home/MyProject/app/build/outputs/apk/debug/debug.apk.
Uploading APK to Firebase App Distribution...
Getting appId from output of google services plugin

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:appDistributionUploadDebug'.
> App Distribution failed to fetch app information: [403] The caller does not have permission

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
190 actionable tasks: 2 executed, 188 up-to-date

How to resolve it

NickUnuchek
  • 11,794
  • 12
  • 98
  • 138
  • I suggest reaching out to Firebase support to get help with troubleshooting the App Distribution plugin. https://support.google.com/firebase/contact/support – Doug Stevenson Oct 21 '19 at 14:56
  • 2
    Is it possible that you've signed into a different account than the one that has permissions to take action on the Firebase project? I've seen that before with this particular error. – Kevin Kokomani Oct 30 '19 at 21:07
  • @KevinKokomani I have the same problem. I activate one of my service accounts in my CI flow to run Firebase Test Lab in one of my apps flavor, which is distributed correctly via Firebase Distribution, but the other flavors get the same error as OP. But in the docs there is no mention for the need to activate the service account, I thought it was done throught the various serviceCredentialsFile ( which I have for every different flavor) – Petermonteer Feb 14 '20 at 12:02
  • It could also be that you have the wrong service account specified. I realized that I had created a service account on a wrong project in Google Cloud Platform. – B W Feb 27 '20 at 20:40

0 Answers0