Error: Failed to authenticate, have you run firebase login?
Opened this issue · 3 comments
Like many, I am facing a problem with the action.
I have followed the example at https://github.com/wzieba/Firebase-Distribution-Github-Action/blob/master/.github/workflows/main.yml and the instructions.
Here is my setup:
First I fetch the credentials that I have stored as a base64 string file at the secrets of the GitHub project.
- name: 'Fetch credential file for mobile projects from secrets'
id: fetch_credential_file_mobile
uses: timheuer/base64-to-file@v1.2
with:
encodedString: ${{ secrets.FIREBASE_GCP_CREDENTIALS_FOR_MOBILE_PROJECTS }}
fileName: 'credential_file_for_mobile_projects.json'
At the output of the GitHub action, I can see the following:
Run timheuer/base64-to-file@v1.2
with:
encodedString: ***
fileName: credential_file_for_mobile_projects.json
env:
SHORT_SHA: 10c48e9
JAVA_HOME: /opt/hostedtoolcache/Java_Zulu_jdk/11.0.19-7/x64
JAVA_HOME_11_X64: /opt/hostedtoolcache/Java_Zulu_jdk/11.0.19-7/x64
At the logs, I can see that the location where the new json file was created is at /home/runner/work/_temp/
.
Then, I try to upload an apk that I have previously build with the following:
- name: 'Upload to Firebase App Distribution the mobile variant'
uses: wzieba/Firebase-Distribution-Github-Action@v1.5.0
with:
appId: ${{ inputs.fadIdForMobile }}
serviceCredentialsFile: /home/runner/work/_temp/credential_file_for_mobile_projects.json
groups: 'developers'
releaseNotes: 'These are some test release notes'
file: ${{ inputs.apkPath }}
debug: true
At the logs I can see that all parameters are fine:
Run wzieba/Firebase-Distribution-Github-Action@v1.5.0
with:
appId: 1:XYX:android:XYZ
serviceCredentialsFile: /home/runner/work/_temp/credential_file_for_mobile_projects.json
groups: developers
releaseNotes: These are some test release notes
file: apps/***-app/build/outputs/apk/debug/***-app-debug.apk
debug: true
env:
SHORT_SHA: 10c48e9
JAVA_HOME: /opt/hostedtoolcache/Java_Zulu_jdk/11.0.19-7/x64
JAVA_HOME_11_X64: /opt/hostedtoolcache/Java_Zulu_jdk/11.0.19-7/x64
Nevertheless, an error occurs:
/usr/bin/docker run --name ed866eb80efcf058354aab9bc875af15b7d263_0f2729 --label ed866e --workdir /github/workspace --rm -e "SHORT_SHA" -e "JAVA_HOME" -e "JAVA_HOME_11_X64" -e "INPUT_APPID" -e "INPUT_SERVICECREDENTIALSFILE" -e "INPUT_GROUPS" -e "INPUT_RELEASENOTES" -e "INPUT_FILE" -e "INPUT_DEBUG" -e "INPUT_TOKEN" -e "INPUT_SERVICECREDENTIALSFILECONTENT" -e "INPUT_TESTERS" -e "INPUT_RELEASENOTESFILE" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/oneapp-android/oneapp-android":"/github/workspace" ed866e:b80efcf058354aab9bc875af15b7d263
Error: Failed to authenticate, have you run firebase login?
Where is the problem with my code?
Even though I am setting all the parameters properly, I get an error that the authentication failed.
At which directory does the json get created? What is the full path of it? Should I actually use the full path?
Any help will be greatly appreciated.
Hi, did you solve this? I need help
This is still a problem for me in the latest build.
any update?