`GOOGLE_APPLICATION_CREDENTIALS` environment variable is ignored
patricks opened this issue · 2 comments
I have upgraded the the plugin from version 0.7.4
to 0.8.1
and since then the upload from our CI pipeline always failed with the following error:
[14:19:23]: App Distribution could not generate credentials from the refresh token specified.
The strange thing is that the plugin tries to use cached Firebase CLI credentials now?
[14:19:23]: 🔐 Authenticating with cached Firebase CLI credentials
which wasn’t the case with version 0.7.4
.
[15:23:16]: 🔐 Authenticating with GOOGLE_APPLICATION_CREDENTIALS environment variable: ./gcloud-api-key.json
Version 0.7.4
used the environment variable GOOGLE_APPLICATION_CREDENTIALS
, we stored our api-key.json
path location there.
It looks like the behavior changed with version 0.8.1
.
If I set the api-key.json
file via the property service_credentials_file: "./gcloud-api-key.json"
everything works fine again. Is the environment variable now ignored?
Hey @patricks,
It looks like v0.8.0
included a change that modified the order that we check the various login options. Now, we look for cached Firebase CLI credentials before we check application default credentials (i.e. GOOGLE_APPLICATION_CREDENTIALS
). We should have included this change in the release notes. I've retroactively updated the release notes to note this change.
To fix the issue you're seeing, you can use the service_credentials_file
parameter as you mentioned or clear your Firebase CLI credentials on your CI computer by running firebase logout
.