Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firebaseAppDistribution doesn't supply quota project when using ADC with user account #6730

Open
breathe opened this issue Feb 27, 2025 · 2 comments
Labels
api: appdistribution type: bug Something isn't working

Comments

@breathe
Copy link

breathe commented Feb 27, 2025

Describe your environment

  • Android Studio version: 2024.2.2 Patch 2
  • Firebase Component: AppDistribution (gradle plugin)
  • Component version: id 'com.google.firebase.appdistribution' version '5.1.1' apply false

Describe the problem

  • gradle plugin fails to determine or communicate the quota project
  • appdistribution api rejects the request with 403

Steps to reproduce:

# ensure firebase cli is not logged in because plugin will use those creds if they exist (you'll be unable to reproduce from a machine with (old-style) firebase cli login creds in place!)
rm ~/.config/configstore/firebase-tools.json

# ensure logged into ADC
gcloud auth application-default login

# ensure quota project set
gcloud auth application-default set-quota-project PROJ

# gradle build
env GOOGLE_APPLICATION_CREDENTIALS=/Users/<redact>/.config/gcloud/application_default_credentials.json ./gradlew --console plain --no-daemon assembleFullDebug uploadCrashlyticsSymbolFileFullDebug appDistributionUploadFullDebug --debug --stacktrace

There are several successful network transactions in the logs and then this (looks like while trying to see operation status)

2025-02-27T04:49:45.323-0700 [INFO] [com.google.api.client.http.HttpTransport] -------------- REQUEST  --------------
GET https://firebaseappdistribution.googleapis.com/v1/projects/PROJECT_NUMBER/apps/1:PROJECT_NUMBER:android:<redact>/releases/-/operations/<redact>
Accept-Encoding: gzip
Authorization: <Not Logged>
User-Agent: Firebase App Distro Client/5.1.1
x-client-version: gradle/5.1.1

2025-02-27T04:49:45.367-0700 [INFO] [com.google.api.client.http.HttpTransport] Total: 1,153 bytes
2025-02-27T04:49:45.367-0700 [INFO] [com.google.api.client.http.HttpTransport] {
  "error": {
    "code": 403,
    "message": "Your application is authenticating by using local Application Default Credentials. The firebaseappdistribution.googleapis.com API requires a quota project, which is not set by default. To learn how to set your quota project, see https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds .",
    "status": "PERMISSION_DENIED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "SERVICE_DISABLED",
        "domain": "googleapis.com",
        "metadata": {
          "consumer": "projects/764086051850",
          "service": "firebaseappdistribution.googleapis.com"
        }
      },
      {
        "@type": "type.googleapis.com/google.rpc.LocalizedMessage",
        "locale": "en-US",
        "message": "Your application is authenticating by using local Application Default Credentials. The firebaseappdistribution.googleapis.com API requires a quota project, which is not set by default. To learn how to set your quota project, see https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds ."
      }
    ]
  }
}

Relevant Code:

  • gradle deploy as above works if I log into firebase ci with legacy FIREBASE_TOKEN
  • same deploy works with firebase cli -- with firebase cli's implementation of ADC
@google-oss-bot
Copy link
Contributor

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@lehcar09
Copy link
Contributor

lehcar09 commented Mar 3, 2025

Hi @breathe, thank you for reaching out. I was able to reproduce the behavior you raised. I’ll raise this to our engineers and see what we can do here.Thanks!

@lehcar09 lehcar09 added the type: bug Something isn't working label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: appdistribution type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants