Closed GuilhE closed 4 months ago
Hey @GuilhE, thanks for filing a detailed report. I’m currently trying to replicate this, but I’m unable to reproduce the error you mentioned. I created a GitHub Action similar to your example, but no errors were raised and the application was uploaded to App Distribution.
Based on just the error message, my best guess is that the contents of service_credentials_content.json
is empty. Could you try adding cat service_credentials_content.json
to verify? Something like:
- name: Distribute APK to Firebase App Distribution
run: |
echo "$FIREBASE_SERVICE_ACCOUNT" > service_credentials_content.json
export GOOGLE_APPLICATION_CREDENTIALS=service_credentials_content.json
echo "service_credentials_content.json contents"
cat service_credentials_content.json
firebase --version
firebase appdistribution:distribute ./app/build/outputs/apk/debug/app-debug.apk --app "$FIREBASE_APP_ID" --debug
env:
FIREBASE_SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
If the contents of service_credentials_content.json is the same as your Service Account key JSON file, GitHub Actions should automatically mask the output of cat service_credentials_content.json
.
Hello, I'm also suspecting that, I've tried using a base64 encoded secret to decode in that step but it also fails. I'm using the same approach with the keystore and it works. Regarding cat
if I try to print the service_credentials_content
contents the output is empty. I believe github actions is hiding the result as a default safety measure? I've tried to cat
the keystore base64 and nothing is printed also.
Damn it, I was using the wrong environment (not repository level) where the secrets were configured 🤦🏼
[REQUIRED] Environment info
firebase-tools: 13.9.0
Platform: ubuntu-latest
[REQUIRED] Test case
I'm trying
firebase appdistribution:distribute
using Github Actions:[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
Successful distribution
[REQUIRED] Actual behavior
Always fails with:
I've validated and the
.json
file is valid.