Giter Club home page Giter Club logo

firebase-distribution-github-action's Introduction

firebase-distribution-github-action's People

Contributors

amitav13 avatar charlesverge avatar chkfung avatar jongha avatar kaibolay avatar roskoff avatar shinriyo avatar tomaszczart avatar wzieba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

firebase-distribution-github-action's Issues

Referencing GOOGLE_APPLICATION_CREDENTIALS serviceCredentialsFile path doesn't work

I'm trying to use a Github Action secret to authenticate a Firebase push of an APK. Here's the relevant tasks:

- name: Print GOOGLE_APPLICATION_CREDENTIALS_JSON to file
      shell: bash
      run: 'echo "$GOOGLE_APPLICATION_CREDENTIALS_JSON" > "./firebase.json'
      env:
        GOOGLE_APPLICATION_CREDENTIALS_JSON: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }}

    - name: look in the directory
      shell: bash
      run: |
        ls -l
        pwd
        cat ./firebase.json

    - name: Firebase App Distribution
      uses: wzieba/[email protected]
      with:
        appId: ${{ secrets.FIREBASE_ANDROID_DEV_APP_ID }}
        token: ${{ secrets.FIREBASE_TOKEN }}
        file: app/build/outputs/apk/debug/app-debug.apk 
        groups: dev
        serviceCredentialsFile: ./firebase.json

Output:

Run echo "$GOOGLE_APPLICATION_CREDENTIALS_JSON" > "./firebase.json"
  echo "$GOOGLE_APPLICATION_CREDENTIALS_JSON" > "./firebase.json"
  shell: /bin/bash --noprofile --norc -e -o pipefail ***0***
  env:
    JAVA_HOME_8.0.275_x64: /opt/hostedtoolcache/jdk/8.0.275/x64
    JAVA_HOME: /opt/hostedtoolcache/jdk/8.0.275/x64
    JAVA_HOME_8_0_275_X64: /opt/hostedtoolcache/jdk/8.0.275/x64
    GOOGLE_APPLICATION_CREDENTIALS_JSON: ***


Run ls -l
total 56
-rw-r--r-- 1 runner docker 1872 Nov 24 20:01 README.md
drwxr-xr-x 4 runner docker 4096 Nov 24 20:03 app
drwxr-xr-x 3 runner docker 4096 Nov 24 20:03 build
-rw-r--r-- 1 runner docker 2138 Nov 24 20:01 build.gradle
drwxr-xr-x 4 runner docker 4096 Nov 24 20:03 common
drwxr-xr-x 4 runner docker 4096 Nov 24 20:03 data
drwxr-xr-x 4 runner docker 4096 Nov 24 20:03 db
-rw-r--r-- 1 runner docker 2334 Nov 24 20:08 firebase.json
drwxr-xr-x 3 runner docker 4096 Nov 24 20:01 gradle
-rw-r--r-- 1 runner docker 1188 Nov 24 20:01 gradle.properties
-rwxr-xr-x 1 runner docker 5764 Nov 24 20:01 gradlew
-rw-r--r-- 1 runner docker 2942 Nov 24 20:01 gradlew.bat
-rw-r--r-- 1 runner docker   86 Nov 24 20:01 settings.gradle
/home/runner/work/proj-android/proj-android
***
  ***
  ***
  ***
  ***
  ***
  ***
  ***
  ***
  ***
  ***
***

Run wzieba/[email protected]
/usr/bin/docker run --name dfe4abb44dc88d32476cf13eee00_433322 --label 179394 --workdir /github/workspace --rm -e JAVA_HOME_8.0.275_x64 -e JAVA_HOME -e JAVA_HOME_8_0_275_X64 -e INPUT_APPID -e INPUT_TOKEN -e INPUT_FILE -e INPUT_GROUPS -e INPUT_SERVICECREDENTIALSFILE -e INPUT_RELEASENOTES -e INPUT_RELEASENOTESFILE -e INPUT_DEBUG -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_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_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -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/proj-android/proj-android":"/github/workspace" 179394:9678dfe4abb44dc88d32476cf13eee00
i  getting app details...

Error: failed to fetch app information. HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.

This appears to be running inside of a Docker container, mounting the Github workspace directory. but it appears to not be picking up this file? What is the solution here? I've verified the credentials file is correct.

Thanks

Upload succeeded, but "group" is not working

Upload succeeded, but "group" is not working

This is my yml file.

name: Beta Distribution

on:
  push:
    branches: 
      - beta

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Setup JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build Release
      run: ./gradlew assembleDevelopmentRelease
    - name: Firebase App Distribution
      uses: wzieba/[email protected]
      with:
        appId: ${{secrets.FIREBASE_APP_ID}}
        token: ${{secrets.FIREBASE_TOKEN}}
        file: app/build/outputs/apk/development/release/app-development-release.apk
        group: developers  <===== not working
        debug: true

Firebase Console
γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2019-12-04 19 17 25

Error: failed to upload release. There's been an error parsing your app's info.plist. Ensure you are uploading a valid IPA and try again.

Having this error while running git action for IOS.
(Error: failed to upload release. There's been an error parsing your app's info.plist. Ensure you are uploading a valid IPA and try again.)

Trying to distribute flutter app to firebase but only able to distribute apk file but for ios development job is giving me above error.
Following is attached code for .yml file used for git action command.
Thanks in advance!!

# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
  # Triggers the workflow on push or pull request events but only for the main branch
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
#   build_android:
#     # This job will run on ubuntu virtual machine
#     runs-on: ubuntu-latest
#     steps:
#       - uses: actions/checkout@v2
#       - uses: actions/setup-java@v2
#         with:
#           distribution: 'zulu'
#           java-version: '11'
#       - uses: subosito/flutter-action@v2
#         with:
#           flutter-version: '2.5.3'
#       - run: flutter pub get
#       - run: flutter build apk
#       - run: flutter build appbundle
#       # Step to Submit the generated APK to Firebase App Distribution
#       - name: upload artifact to Firebase App Distribution
#         uses: wzieba/[email protected]
#         with:
#           appId: ${{ secrets.FIREBASE_APP_ID }}
#           token: ${{ secrets.FIREBASE_TOKEN }}
#           groups: testerAndroid
#           file: build/app/outputs/flutter-apk/app-release.apk

  build_ios:
    name: Build Flutter (iOS)
    runs-on: macOS-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: '12.x'
      - uses: subosito/flutter-action@v1
        with:
          flutter-version: '2.5.3'
      - run: flutter pub get
      - run: flutter clean
      - run: flutter build ios --release --no-codesign
      - run: cd /Users/runner/work/cicd/cicd/build/ios/iphoneos
      - run: ls
      - run: mkdir -p /Users/runner/work/cicd/cicd/build/ios/iphoneos/Payload
      - run: mv /Users/runner/work/cicd/cicd/build/ios/iphoneos/Runner.app /Users/runner/work/cicd/cicd/build/ios/iphoneos/Payload
      - run: zip -r /Users/runner/work/cicd/cicd/build/ios/iphoneos/Runner.ipa /Users/runner/work/cicd/cicd/build/ios/iphoneos/Payload
      - run: rm -rf /Users/runner/work/cicd/cicd/build/ios/iphoneos/Payload
      - name: Upload iPA
        uses: actions/upload-artifact@master
        with:
          name: ios-build
          path: build/ios/iphoneos
  beta_ios:
    name: Upload iOS Beta to Firebase App Distribution
    needs: [ build_ios ]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Download Artifact
        uses: actions/download-artifact@master
        with:
          name: ios-build
      - name: Upload IPA
        uses: wzieba/[email protected]
        with:
          appId: ${{ secrets.FIREBASE_IOS_APP_ID }}
          token: ${{ secrets.FIREBASE_TOKEN }}
          groups: testerIos
          file: Runner.ipa

./gradlew: No such file or directory

name: Build & upload to Firebase App Distribution

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: set up JDK 1.8
  uses: actions/setup-java@v1
  with:
    java-version: 1.8
- name: build release 
  run: bash ./gradlew assembleRelease
- name: upload artifact to Firebase App Distribution
  uses: wzieba/[email protected]
  with:
    appId: test
    token: toeknskncknsaknkcnsk
    groups: qa
    file: app/build/outputs/apk/release/app-release-unsigned.apk

Docker build failed with exit code 1

The task Build container for action use: '/home/runner/work/_actions/wzieba/Firebase-Distribution-Github-Action/v1.3.2/Dockerfile'.
Fails with the following error starting today:

[1/4] Resolving packages...
  warning firebase-tools > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
  warning firebase-tools > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
  warning firebase-tools > request > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
  warning firebase-tools > universal-analytics > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
  warning firebase-tools > universal-analytics > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
  warning firebase-tools > request > [email protected]: this library is no longer supported
  error Couldn't find package "@npmcli/fs@^1.0.0" required by "cacache@^15.0.5" on the "npm" registry.
  info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
  The command '/bin/sh -c yarn global add firebase-tools     && apk update     && apk add git' returned a non-zero code: 1
Error: Docker build failed with exit code 1

HTTP Error: 401, Request had invalid authentication credentials

Hi, using this github action providing a FIREBASE_TOKEN I'm unable to upload android apk file to Firebase App Distribution, with following error:

Error: failed to fetch app information. HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.

Using the same FIREBASE_TOKEN locally, I'm able to upload the apk, I only face this problem using this workflow action. Does anybody have any idea what could be wrong? Thanks

This is my workflow file:

name: Distribute Debug

on:
  push:
    tags:
      - 'dev-*'

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Build Debug
        run: sudo ./gradlew assembleDebug
      - name: Upload to Firebase App Distribution
        uses: wzieba/[email protected]
        with:
          appId: some_app_id_that_is_correct
          token: ${{secrets.FIREBASE_TOKEN}}
          debug: true
          file: app/build/outputs/apk/debug/app-debug.apk

releaseNotesFile seems not available

##[warning]Unexpected input(s) 'releaseNotesFile', valid inputs are ['entryPoint', 'args', 'appId', 'token', 'file', 'groups', 'releaseNotes', 'debug']

Error: EACCES: permission denied, open '/usr/local/lib/node_modules/firebase-tools/node_modules/storage-engine/lib/compatibility/index.js'

I was exploring Github's actions and wanted to Firebase-Distribution-Github-Action after using the sample action I am getting the following error. It did work for 2 times & suddenly stopped working without making any changes. Did I missed anything to add OR configure?

Workflow File

# This is a basic workflow to help you get started with Actions
name: Firebase QA App Distribution

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
  push:
    branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v1

      # setup JDK.1.8
      - name: set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      # Prepare QA build
      - name: build release
        run: sudo ./gradlew assembleDebug

      # Distribute APK to firebase App Distribution
      - name: upload artifact to Firebase App Distribution
        uses: wzieba/[email protected]
        with:
          appId: ${{secrets.FIREBASE_QA_APP_ID}}
          token: ${{secrets.FIREBASE_TOKEN}}
          groups: internal-test
          file: app/build/outputs/apk/debug/app-debug.apk
2020-06-21T16:47:19.6829979Z Build container for action use: '/home/runner/work/_actions/wzieba/Firebase-Distribution-Github-Action/v1.2.1/Dockerfile'.

2020-06-21T16:48:19.3104692Z ##[command]/usr/bin/docker build -t c27d31:613707ed5f1740928f76d78bdec856e2 "/home/runner/work/_actions/wzieba/Firebase-Distribution-Github-Action/v1.2.1"
2020-06-21T16:48:19.3386929Z Sending build context to Docker daemon   12.8kB
2020-06-21T16:48:19.3387474Z 
2020-06-21T16:48:19.3710051Z Step 1/6 : FROM node:12.10.0-alpine
2020-06-21T16:48:19.3712024Z  ---> ef7d474eab14
2020-06-21T16:48:19.3713730Z Step 2/6 : WORKDIR /app
2020-06-21T16:48:19.3715215Z  ---> Using cache
2020-06-21T16:48:19.3716587Z  ---> cee83b63b2ce
2020-06-21T16:48:19.3718112Z Step 3/6 : COPY . /app
2020-06-21T16:48:19.3719850Z  ---> Using cache
2020-06-21T16:48:19.3721820Z  ---> 9fe2c3d69d62
2020-06-21T16:48:19.3734617Z Step 4/6 : RUN npm install -g firebase-tools     && apk update     && apk add git
2020-06-21T16:48:19.3958354Z  ---> Running in 333d0f1ae47d
2020-06-21T16:48:21.3283264Z οΏ½[91mnpm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
2020-06-21T16:48:38.3340192Z οΏ½[0m/usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js
2020-06-21T16:48:38.4942415Z 
2020-06-21T16:48:38.4942825Z > [email protected] postinstall /usr/local/lib/node_modules/firebase-tools/node_modules/protobufjs
2020-06-21T16:48:38.4943001Z > node scripts/postinstall
2020-06-21T16:48:38.4943079Z 
2020-06-21T16:48:38.5540364Z 
2020-06-21T16:48:38.5540780Z > [email protected] postinstall /usr/local/lib/node_modules/firebase-tools/node_modules/storage-engine
2020-06-21T16:48:38.5540963Z > node ./compatibility/detect.js
2020-06-21T16:48:38.5541070Z 
2020-06-21T16:48:38.5994297Z οΏ½[91mfs.js:130
2020-06-21T16:48:38.5994513Z     throw err;
2020-06-21T16:48:38.5994684Z     ^
2020-06-21T16:48:38.5994765Z 
2020-06-21T16:48:38.5994964Z Error: EACCES: permission denied, open '/usr/local/lib/node_modules/firebase-tools/node_modules/storage-engine/lib/compatibility/index.js'
2020-06-21T16:48:38.5995194Z     at Object.openSync (fs.js:451:3)
2020-06-21T16:48:38.5995373Z     at Object.writeFileSync (fs.js:1276:35)
2020-06-21T16:48:38.5995570Z     at /usr/local/lib/node_modules/firebase-tools/node_modules/storage-engine/lib/compatibility/detect.js:35:15
2020-06-21T16:48:38.5995798Z     at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/storage-engine/lib/compatibility/detect.js:45:3)
2020-06-21T16:48:38.5996008Z     at Module._compile (internal/modules/cjs/loader.js:936:30)
2020-06-21T16:48:38.5996201Z     at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
2020-06-21T16:48:38.5996397Z     at Module.load (internal/modules/cjs/loader.js:790:32)
2020-06-21T16:48:38.5996588Z     at Function.Module._load (internal/modules/cjs/loader.js:703:12)
2020-06-21T16:48:38.5996784Z     at Module.require (internal/modules/cjs/loader.js:830:19)
2020-06-21T16:48:38.5996966Z     at require (internal/modules/cjs/helpers.js:68:18) {
2020-06-21T16:48:38.5997134Z   errno: -13,
2020-06-21T16:48:38.5997291Z   syscall: 'open',
2020-06-21T16:48:38.5997447Z   code: 'EACCES',
2020-06-21T16:48:38.5997635Z   path: '/usr/local/lib/node_modules/firebase-tools/node_modules/storage-engine/lib/compatibility/index.js'
2020-06-21T16:48:38.5997822Z }
2020-06-21T16:48:39.2997879Z οΏ½[0mοΏ½[91mnpm WARN οΏ½[0mοΏ½[91moptional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/firebase-tools/node_modules/chokidar/node_modules/fsevents):
2020-06-21T16:48:39.2998161Z οΏ½[0mοΏ½[91mnpm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2020-06-21T16:48:39.3006563Z οΏ½[0mοΏ½[91mnpm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
2020-06-21T16:48:39.3007086Z npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
2020-06-21T16:48:39.3007264Z οΏ½[0mοΏ½[91m
2020-06-21T16:48:39.3232107Z οΏ½[0mοΏ½[91mnpm ERR! codeοΏ½[0mοΏ½[91m ELIFECYCLE
2020-06-21T16:48:39.3232300Z οΏ½[0mοΏ½[91mnpm ERR! errno 1
2020-06-21T16:48:39.3238777Z οΏ½[0mοΏ½[91mnpmοΏ½[0mοΏ½[91m ERR! [email protected] postinstall: `node ./compatibility/detect.js`
2020-06-21T16:48:39.3239318Z npmοΏ½[0mοΏ½[91m ERR! Exit status 1
2020-06-21T16:48:39.3239477Z npmοΏ½[0mοΏ½[91m ERR! 
2020-06-21T16:48:39.3239632Z npm ERR! Failed at the [email protected] postinstall script.
2020-06-21T16:48:39.3239815Z npmοΏ½[0mοΏ½[91m ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-06-21T16:48:39.3499524Z οΏ½[0mοΏ½[91m
2020-06-21T16:48:39.3499723Z npm οΏ½[0mοΏ½[91mERR! A complete log of this run can be found in:
2020-06-21T16:48:39.3500159Z npm ERR!     /root/.npm/_logs/2020-06-21T16_48_39_342Z-debug.log
2020-06-21T16:48:40.1330726Z The command '/bin/sh -c npm install -g firebase-tools     && apk update     && apk add git' returned a non-zero code: 1
2020-06-21T16:48:40.1331885Z οΏ½[0m
2020-06-21T16:48:40.1451003Z ##[error]Docker build failed with exit code 1
2020-06-21T16:48:40.1492582Z Cleaning up orphan processes

Error: failed to upload release. HTTP Error: 401

For FIREBASE_TOKEN and FIREBASE_APP_ID, I have logged in to my android studio terminal and generated token via google login and get app id from firebase console. Same that I have added in repo -> security and -> secrets with the same variable name metioned in workflow file, but on app build success it give me below error:

Error: failed to upload release. HTTP Error: 401, {
  "error": {
    "code": 401,
    "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "status": "UNAUTHENTICATED"
  }
}

Thanks, Any help would be appreciated.

Unable to find firebase service account credentials file Github Actions.

Hi, I'm try to setup firebase app distribution on Github actions for my project. I am currently stuck with an issue where the credentials file is not found no matter where I store it.

My work flow is as follows:

  • Build Debug app
  • Fetch credentials file (Decode the Base64 string and write it to a file in ~/Firebase-Distribution-Github-Action/ directory)
  • Upload .apk artifact to firebase app distribution

My workflow file is as follows:

name: Test and Deploy

on:

  push:
  pull_request:
  workflow_dispatch:

jobs:

  unit-tests:
    runs-on: [ ubuntu-latest ]
    steps:
      - uses: actions/checkout@v2

      - name: Unit Tests
        run: ./gradlew test --warning-mode=all

  deploy:
    runs-on: [ ubuntu-latest ]
    steps:
      - uses: actions/checkout@v2

      - name: Setup up JDK 11
        uses: actions/setup-java@v2
        with:
          java-version: 11
          distribution: 'temurin'

      - name: Build Debug App
        run: ./gradlew assembleDebug --warning-mode=all

      - name: Fetch credential file
        uses: ./.github/actions/base64-to-file
        with:
          secret: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
          filename: credential_file.json
          destination-path: ~/Firebase-Distribution-Github-Action/

      - name: Upload Artifact To Firebase App Distribution
        uses: wzieba/Firebase-Distribution-Github-Action@v1
        with:
          appId: ${{secrets.FIREBASE_APP_ID}}
          serviceCredentialsFile: /home/runner/Firebase-Distribution-Github-Action/credential_file.json
          file: app/build/outputs/apk/debug/app-debug.apk
          debug: true

The base64-to-file action can be found here. I've slightly modified it though, to ensure that the credential_file.json is actually created as you will see in this screenshot.

Screenshot 2021-11-05 at 13 36 29

This is the error I get from firebase CLI:

Run wzieba/Firebase-Distribution-Github-Action@v1
  with:
    appId: ***
    serviceCredentialsFile: /home/runner/Firebase-Distribution-Github-Action/credential_file.json
    file: app/build/outputs/apk/debug/app-debug.apk
    debug: true
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.13-8/x64
/usr/bin/docker run --name e284905e2b498ba8da4b0889464117d57950f4_0f9cf3 --label e28490 --workdir /github/workspace --rm -e JAVA_HOME -e INPUT_APPID -e INPUT_SERVICECREDENTIALSFILE -e INPUT_FILE -e INPUT_DEBUG -e INPUT_TOKEN -e INPUT_GROUPS -e INPUT_RELEASENOTES -e INPUT_RELEASENOTESFILE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_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_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -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=tr...
[2021-11-05T13:45:57.754Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2021-11-05T13:45:57.758Z] Error: The file at /home/runner/Firebase-Distribution-Github-Action/credential_file.json does not exist, or it is not a file. ENOENT: no such file or directory, lstat '/home/runner'
    at Object.realpathSync (fs.js:1651:7)
    at GoogleAuth._getApplicationCredentialsFromFilePath (/usr/local/share/.config/yarn/global/node_modules/firebase-tools/node_modules/google-auth-library/build/src/auth/googleauth.js:246:27)
    at GoogleAuth._tryGetApplicationCredentialsFromEnvironmentVariable (/usr/local/share/.config/yarn/global/node_modules/firebase-tools/node_modules/google-auth-library/build/src/auth/googleauth.js:189:25)
    at GoogleAuth.getApplicationDefaultAsync (/usr/local/share/.config/yarn/global/node_modules/firebase-tools/node_modules/google-auth-library/build/src/auth/googleauth.js:125:33)
    at GoogleAuth.getClient (/usr/local/share/.config/yarn/global/node_modules/firebase-tools/node_modules/google-auth-library/build/src/auth/googleauth.js:504:28)
    at GoogleAuth.getAccessToken (/usr/local/share/.config/yarn/global/node_modules/firebase-tools/node_modules/google-auth-library/build/src/auth/googleauth.js:526:35)
    at autoAuth (/usr/local/share/.config/yarn/global/node_modules/firebase-tools/lib/requireAuth.js:24:32)
    at Object.requireAuth [as fn] (/usr/local/share/.config/yarn/global/node_modules/firebase-tools/lib/requireAuth.js:45:26)
    at /usr/local/share/.config/yarn/global/node_modules/firebase-tools/lib/command.js:188:30
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Error: Failed to authenticate, have you run firebase login?
[2021-11-05T13:45:57.975Z] <<< [apiv2][status] GET https://firebase-public.firebaseio.com/cli.json 200
[2021-11-05T13:45:57.975Z] <<< [apiv2][body] GET https://firebase-public.firebaseio.com/cli.json {"cloudBuildErrorAfter":1594252800000,"cloudBuildWarnAfter":1590019200000,"defaultNode10After":1594252800000,"minVersion":"3.0.5","node8DeploysDisabledAfter":1613390400000,"node8RuntimeDisabledAfter":1615809600000,"node8WarnAfter":1600128000000}

where do I find FIREBASE_TOKEN?

I try many tokens but not got distribute my apk with success

Error on upload artifact to Firebase App Distribution Step :
Error: failed to fetch app information. HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.

Request contains an invalid argument.

I hav an error on launch the action:

Run wzieba/[email protected]
/usr/bin/docker run --name e3346ebf32fc5fa4443039353453ef0db2857_c41887 --label 9e3346 --workdir /github/workspace --rm -e JAVA_HOME_8.0.265_x64 -e JAVA_HOME -e JAVA_HOME_8_0_265_X64 -e INPUT_APPID -e INPUT_TOKEN -e INPUT_GROUPS -e INPUT_FILE -e INPUT_DEBUG -e INPUT_RELEASENOTES -e INPUT_RELEASENOTESFILE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_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_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -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/reviews-system-client-android/reviews-system-client-android":"/github/workspace" 9e3346:ebf32fc5fa4443039353453ef0db2857
[2020-09-21T17:45:09.685Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2020-09-21T17:45:09.687Z] > authorizing via --token option
i  getting app details... 
[2020-09-21T17:45:09.692Z] > refreshing access token with scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2020-09-21T17:45:09.693Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token  
 <request body omitted>
[2020-09-21T17:45:09.818Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=utf-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 21 Sep 2020 17:45:09 GMT","server":"scaffolding on HTTPServer2","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-27=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-09-21T17:45:09.820Z] >>> HTTP REQUEST GET https://firebaseappdistribution.googleapis.com/v1alpha/apps/store-reviews-553c2  
 
[2020-09-21T17:45:09.912Z] <<< HTTP RESPONSE 400 {"vary":"X-Origin, Referer, Origin,Accept-Encoding","content-type":"application/json; charset=UTF-8","date":"Mon, 21 Sep 2020 17:45:09 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-27=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-09-21T17:45:09.913Z] <<< HTTP RESPONSE BODY {"error":{"code":400,"message":"Request contains an invalid argument.","status":"INVALID_ARGUMENT"}}

Error: failed to fetch app information. HTTP Error: 400, Request contains an invalid argument.```

Upload error

Hello, I have followed your instructions in the README file. I have the following github action:
deploy-firebase: # 1 needs: [ build ] runs-on: ubuntu-latest steps: # 2 - uses: actions/download-artifact@v2 with: name: app-release.aab # 3 - name: Upload artifact to Firebase App Distribution uses: wzieba/Firebase-Distribution-Github-Action@v1 with: appId: ${secrets.FIREBASE_APP_ID }} token: ${{secrets.FIREBASE_TOKEN }} groups: QA file: app/build/outputs/bundle/release/app-release.aab

However, I get an error:

Run wzieba/Firebase-Distribution-Github-Action@v1
/usr/bin/docker run --name bec5f756fee773e98473db538e4384401ae5a_82bc48 --label 3bec5f --workdir /github/workspace --rm -e INPUT_APPID -e INPUT_TOKEN -e INPUT_GROUPS -e INPUT_FILE -e INPUT_SERVICECREDENTIALSFILE -e INPUT_RELEASENOTES -e INPUT_RELEASENOTESFILE -e INPUT_DEBUG -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_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_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -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/partnersso-android/partnersso-android":"/github/workspace" 3bec5f:756fee773e98473db538e4384401ae5a
fatal: not a git repository (or any parent up to mount point /github)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Error: failed to fetch app information. HTTP Error: 400, Request contains an invalid argument.

support for macOS hosted?

Hi,
I was just trying to upload my *.ipa file to the Firebase Distribution. (Added all TOKENS, and APP _ID)
My github actions are running on a macos hosted box and are getting the following error:

  • ##[error]Container action is only supported on Linux

Am I missing a configuration, or is the MacOS hosted box just not supported for this plugin?

The engine "node" is incompatible with this module

Since yesterday when running a Github Action using wzieba/[email protected] the Github Action fails with the error when building the container for the Firebase Distribution Github Action

error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14.13.1 || >=16.0.0". Got "14.4.0"
error Found incompatible module.

Stacktrace

Step 1/ : FROM node:14.4.0-alpine3.12
  14.4.0-alpine3.12: Pulling from library/node
  df20fa9351a1: Pulling fs layer
  fc9f[7](https://github.com/AnalogIO/coffeecard_app/runs/6518880555?check_suite_focus=true#step:2:7)c259fca: Pulling fs layer
  [8](https://github.com/AnalogIO/coffeecard_app/runs/6518880555?check_suite_focus=true#step:2:8)c4277[9](https://github.com/AnalogIO/coffeecard_app/runs/6518880555?check_suite_focus=true#step:2:9)3ab[10](https://github.com/AnalogIO/coffeecard_app/runs/6518880555?check_suite_focus=true#step:2:10): Pulling fs layer
  f38bde24d0c3: Pulling fs layer
  f38bde24d0c3: Waiting
  8c427793ab10: Verifying Checksum
  8c427793ab10: Download complete
  df20fa9351a1: Verifying Checksum
  df20fa9351a1: Download complete
  df20fa9351a1: Pull complete
  f38bde24d0c3: Download complete
  fc9f7c259fca: Verifying Checksum
  fc9f7c259fca: Download complete
  fc9f7c259fca: Pull complete
  8c427793ab10: Pull complete
  f38bde24d0c3: Pull complete
  Digest: sha256:3465907b06c3ace503458622dcda723586825baf39c3d5bd956c752552cb7b80
  Status: Downloaded newer image for node:14.4.0-alpine3.[12](https://github.com/AnalogIO/coffeecard_app/runs/6518880555?check_suite_focus=true#step:2:12)
   ---> 9736f552d33b
  Step 2/6 : WORKDIR /app
   ---> Running in [13](https://github.com/AnalogIO/coffeecard_app/runs/6518880555?check_suite_focus=true#step:2:13)1895bc967e
  Removing intermediate container 131895bc967e
   ---> 1aa096c530c8
  Step 3/6 : COPY . /app
   ---> 39036662f4f1
  Step 4/6 : RUN yarn global add firebase-tools     && apk update     && apk add git
   ---> Running in fdbba5c07504
  yarn global v1.22.4
  [1/4] Resolving packages...
  warning firebase-tools > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3[14](https://github.com/AnalogIO/coffeecard_app/runs/6518880555?check_suite_focus=true#step:2:14)2
  warning firebase-tools > request > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
  warning firebase-tools > [email protected]: tweetsodium is deprecated and unmaintained. Please consider using libsodium.js, maintained by the same author as libsodium: https://github.com/jedisct1/libsodium.js
  warning firebase-tools > request > [email protected]: this library is no longer supported
  [2/4] Fetching packages...
  error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14.13.1 || >=[16](https://github.com/AnalogIO/coffeecard_app/runs/6518880555?check_suite_focus=true#step:2:16).0.0". Got "14.4.0"
  error Found incompatible module.
  info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
  The command '/bin/sh -c yarn global add firebase-tools     && apk update     && apk add git' returned a non-zero code: 1
  Warning: Docker build failed with exit code 1, back off 4.107 seconds before retry.

Error: failed to upload distribution. HTTP Error: 400, Unknown Error

When trying to run this action, I get the following error:

Error: failed to upload distribution. HTTP Error: 400, Unknown Error

This is my build setup:

    - name: Firebase App Distribution - Android
      uses: wzieba/Firebase-Distribution-Github-Action@master
      with:
        appId: ${{secrets.FIREBASE_ANDROID_APPID}}
        token: ${{secrets.FIREBASE_TOKEN}}
        groups: developers
        file: app/build/outputs/apk/release/app-release-unsigned.apk

And this is GitHub Action's output for this step:

1
Run wzieba/Firebase-Distribution-Github-Action@master
2
  with:
3
    appId: ***
4
    token: ***
5
    groups: developers
6
    file: app/build/outputs/apk/release/app-release-unsigned.apk
7
    debug: false
8
  env:
9
    JAVA_HOME_12.0.2_x64: /opt/hostedtoolcache/jdk/12.0.2/x64
10
    JAVA_HOME: /opt/hostedtoolcache/jdk/12.0.2/x64
11
    JAVA_HOME_12_0_2_X64: /opt/hostedtoolcache/jdk/12.0.2/x64
12
    FLUTTER_HOME: /opt/hostedtoolcache/flutter/1.23.0-18.1.pre-beta/x64
13
/usr/bin/docker run --name fc3aaea79088446eb26f98ba87700022_9bcb79 --label 179394 --workdir /github/workspace --rm -e JAVA_HOME_12.0.2_x64 -e JAVA_HOME -e JAVA_HOME_12_0_2_X64 -e FLUTTER_HOME -e INPUT_APPID -e INPUT_TOKEN -e INPUT_GROUPS -e INPUT_FILE -e INPUT_SERVICECREDENTIALSFILE -e INPUT_RELEASENOTES -e INPUT_RELEASENOTESFILE -e INPUT_DEBUG -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_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_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -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/tenants/tenants":"/github/workspace" 179394:fc3aaea79088446eb26f98ba87700022
15
i  getting app details...
16
i  uploading distribution...
17

18
Error: failed to upload distribution. HTTP Error: 400, Unknown Error

image

What is going on here?

Error: failed to upload release. HTTP Error: 403

Error: failed to upload release. HTTP Error: 403, ***
  "error": ***
    "code": 403,
    "message": "The caller does not have permission",
    "status": "PERMISSION_DENIED"
  ***
***

What permission should be granted to solve this error? Any help would be appreciated. Thank you.

Obsolete dependencies

This action currently uses some obsolete dependencies according to workflow logs. Please consider updating those.
Logs:

warning firebase-tools > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

warning firebase-tools > universal-analytics > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

warning firebase-tools > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

warning firebase-tools > request > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

warning firebase-tools > universal-analytics > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

warning firebase-tools > request > [email protected]: this library is no longer supported

When uploading apk with the Run wzieba/[email protected] I get the following error

I am trying to upload an apk to firebase using github action. I have commented out the code analysis and tests to make the action run faster so as to try and resolve the issue. I have also tried to upload an app bundle, I get the same response. Here is the github action configuration.
`
name: Deploy app bundle to firebase

on:
push:
branches:
- dev

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1 # Setup flutter environment
with:
flutter-version: '2.5.0'

  - run: flutter pub get
  - run: flutter pub run build_runner build --delete-conflicting-outputs
  - name: Create env file
    run: |
      cat << EOF > .env
      STAGING_API_BASE_URL="${{ secrets.STAGING_API_BASE_URL }}"
      PROD_API_BASE_URL="${{ secrets.PROD_API_BASE_URL }}"
      BASE_PATH="${{ secrets.BASE_PATH }}"
      EOF
  #      - run: flutter format --set-exit-if-changed #       - run: flutter format --set-exit-if-changed .
  #- run: flutter analyze # Analyze the project's Dart code. This causes job to exit
  #- name: Run flutter analyze
  #  run: |
  #    chmod +x ./flutter_analyze.sh
  #    ./flutter_analyze.sh
  #- run: flutter test # Run Flutter unit tests for the current project.
  - name: Build Gradle
    run: flutter build apk --debug
  - uses: actions/checkout@v2 #This uploads artifacts from your workflow
    with:
      name: debug-apk
      path: build/app/outputs/flutter-apk/app-debug.apk
  - run: ls build/app/outputs/flutter-apk
  - name: Upload artifact to Firebase App Distribution
    uses: wzieba/[email protected]
    with:
      appId: ${{secrets.FIREBASE_APP_ID}}
      token: ${{secrets.FIREBASE_TOKEN}}
      groups: testers
      file: build/app/outputs/flutter-apk/app-debug.apk  

`

Screenshot from 2021-11-02 07-40-04

Github failed

Hi, I got an error (see the log below) on Github.

` /usr/bin/docker build -t 8118cb:d22552a5691a4904a568a3d10045e432 -f "/home/runner/work/_actions/wzieba/Firebase-Distribution-Github-Action/v1/Dockerfile" "/home/runner/work/_actions/wzieba/Firebase-Distribution-Github-Action/v1"
Sending build context to Docker daemon 11.78kB

Step 1/6 : FROM node:12.10.0-alpine
12.10.0-alpine: Pulling from library/node
e7c96db7181b: Pulling fs layer
95b3c812425e: Pulling fs layer
778b81d0468f: Pulling fs layer
28549a15ba3e: Pulling fs layer
28549a15ba3e: Waiting
778b81d0468f: Verifying Checksum
778b81d0468f: Download complete
e7c96db7181b: Download complete
28549a15ba3e: Verifying Checksum
28549a15ba3e: Download complete
95b3c812425e: Verifying Checksum
95b3c812425e: Download complete
e7c96db7181b: Pull complete
95b3c812425e: Pull complete
778b81d0468f: Pull complete
28549a15ba3e: Pull complete
Digest: sha256:744b156ec2dca0ad8291f80f9093273d45eb85378b6290b2fbbada861cc3ed01
Status: Downloaded newer image for node:12.10.0-alpine
---> ef7d474eab14
Step 2/6 : WORKDIR /app
---> Running in d67a0263fb27
Removing intermediate container d67a0263fb27
---> cc6721229e44
Step 3/6 : COPY . /app
---> cbac1c1ba7ed
Step 4/6 : RUN npm install -g firebase-tools && apk update && apk add git
---> Running in d3662b3305c2

npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/firebase-tools/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@szmarczak%2fhttp-timer - Not found
npm ERR! 404
npm ERR! 404 '@szmarczak/http-timer@^1.1.2' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'got'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-08-06T10_35_20_686Z-debug.log
The command '/bin/sh -c npm install -g firebase-tools && apk update && apk add git' returned a non-zero code: 1`

EISDIR: illegal operation on a directory, read

Using this config in my deploy action:

      - name: Deploy to firebase
        uses: wzieba/[email protected]
        with:
          appId: ${{secrets.FIREBASE_STAGING_APP_ID}}
          token: ${{secrets.FIREBASE_TOKEN}}
          file: app/build/outputs/apk/staging/app-staging.apk
          debug: true

I get the below error that I can't quite figure out:

[2020-10-16T21:42:24.001Z] Error: EISDIR: illegal operation on a directory, read
Error: An unexpected error has occurred.

Any ideas would be helpful, thanks!

Get file by pattern

Hi there
Thank you for such amazing plugin
I want ask that can in my project build file name changed in every build
can I show file like so ?
file: app/build/outputs/release/*.apk

Firebase CLI v11.0.1 is incompatible with Node.js v12.10.0 Please upgrade Node.js to version >= 14.18.0

Hi,
Firstly thanks for making this tool.

I am attempting to generate apk from my flutter project and upload to firebase app distribution.
However, getting the following error
image

sharing my yml file for reference

`
name: Build Flutter Android debug APK

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '1.8'

  - uses: subosito/flutter-action@v1
    with:
      channel: 'stable'
      flutter-version: '2.10.3'

  - run: flutter pub get

  - run: flutter build apk

  # Upload generated apk to the artifacts.
  - uses: actions/upload-artifact@v1
    with:
      name: release-apk
      path: build/app/outputs/flutter-apk/app-release.apk

  #      - uses: actions/setup-node@v3
  #        with:
  #          node-version: '14.18.0'
  #      - run: node --version
  #      - run: npm install
  #      - run: node --version
  #
  #
  #      - name: Firebase App Distribution Action
  #        uses: hasretsariyer/[email protected]
  #        with:
  #          app_id: '1:372286257392:android:28c8fc77264be4c903aa35'
  #          firebase_token: 'f2b8a88e6e6205b896f21e443b60406178de9d49'
  #          app_file: build/app/outputs/flutter-apk/app-release.apk
  #
  #
  #
  - name: Firebase App Distribution
    uses: wzieba/[email protected]
    with:
      appId: '1:372286257392:android:28c8fc77264be4c903aa35'
      token: 'f2b8a88e6e6205b896f21e443b60406178de9d49'
      file: build/app/outputs/flutter-apk/app-release.apk

`

Any help will be appreciated.
Thanks in advance

IPA fails to upload. APK is not zip aligned?

I am using this GitHub action to upload appbundles & ipas to Firebase for Android/iOS. The android appbundle uploads without issue. The ipa fails with the error below. I don't believe it to be anything wrong with my ipa because I can download the artifact my GitHub Action generates (output.ipa) and manually upload it to Firebase without error.

What's stranger is that this error seems to apply only to .apks. As this was generated upon uploading an .ipa.

What are my next steps in debugging?

Run wzieba/[email protected]
  with:
    appId: ***
    token: ***
    file: output.ipa
    releaseNotes: ### Added
  - iOS Build Action support
    groups: internal
    debug: false
/usr/bin/docker run --name a717d81b949eaf49668084d58d9caf6e89_f38b9e --label 9916a7 --workdir /github/workspace --rm -e INPUT_APPID -e INPUT_TOKEN -e INPUT_FILE -e INPUT_RELEASENOTES -e INPUT_GROUPS -e INPUT_SERVICECREDENTIALSFILE -e INPUT_RELEASENOTESFILE -e INPUT_DEBUG -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_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_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -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/hylist/hylist":"/github/workspace" 9916a7:17d81b949eaf49668084d58d9caf6e89
sh: Added: unknown operand
i  uploading binary...

Error: failed to upload release. There's been an error processing your app because of an archiving issue. Use zipalign in your build process and try again. Learn more at https://developer.android.com/studio/command-line/zipalign If this problem continues, contact Firebase support.
Additional information about this error:
APK is not zip aligned.

Version compatibility issue.

How can I get rid from error "Firebase CLI v11.0.1 is incompatible with Node.js v12.10.0 Please upgrade Node.js to version >= 14.18.0"

name: Firebase App Distribution
uses: wzieba/[email protected]
with:
appId: ${{secrets.FIREBASE_APP_ID}}
token: ${{secrets.FIREBASE_TOKEN}}
groups: pre-sprint
file: build/app/outputs/apk/release/app-release.apk

Release notes is empty on v1.3.3

I updated the version from 1.3.2 to 1.3.3 and stopped filling release notes, it is empty. Can you help me with this, maybe in new version need some configuration?

Deprecated dependencies

I'm getting the following warnings on the Github actions logs.

Screenshot 2020-09-03 at 10 44 08

Not sure what needs to be done in order to stop using deprecated libraries, but it would be nice.
Maybe a Firebase tools upgrade?

HTTP Error: 400, Unknown Error

Hi

I'm tried to use this action to deploy my app to Firebase App Distribution. But I got this error not sure what I did wrong in my config? πŸ˜…

name: Deploy test app to Firebase App Distribution

on:
  push:
    branches:
      - '*'

jobs:
  build_signed_apk:
    name: Prepare siged APK
    runs-on: ubuntu-18.04
    steps:
      - name: Checkout repository
        uses: actions/checkout@v1
      - name: Setup Java 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Build signed APK
        run: bash ./gradlew assembleRelease
      - name: Check build file
        run: ls app/build/outputs/apk/release
  deploy_to_app_distribution:
    name: Deploy to Firebase App Distribution
    needs: build_signed_apk
    runs-on: ubuntu-18.04
    steps:
      - name: Checkout repository
        uses: actions/checkout@v1
      - name: Deploy signed APK to Fire App Distribution
        uses: wzieba/Firebase-Distribution-Github-Action@v1
        with:
          appId: ${{secrets.FIREBASE_APP_ID}}
          token: ${{secrets.FIREBASE_TOKEN}}
          groups: internal-testers
          file: app/build/outputs/apk/release/app-release.apk

Error message:

 Deploy signed APK to Fire App Distribution2s
Error: failed to upload distribution. HTTP Error: 400, Unknown Error
Run wzieba/Firebase-Distribution-Github-Action@v1
/usr/bin/docker run --name cb946a34affeb846728e83994bd3cc13e2_d4d041 --label 8118cb --workdir /github/workspace --rm -e INPUT_APPID -e INPUT_TOKEN -e INPUT_GROUPS -e INPUT_FILE -e INPUT_RELEASENOTES -e INPUT_DEBUG -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_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_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -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/sample-store-android/sample-store-android":"/github/workspace" 8118cb:946a34affeb846728e83994bd3cc13e2
i  getting app details...
i  uploading distribution...

Error: failed to upload distribution. HTTP Error: 400, Unknown Error

Invalid APK

Getting the following error when I try to distribute my app.

Error: failed to upload distribution. error processing your binary: There's been an error processing your distribution. 
Ensure you are uploading a valid IPA or APK and try again.
Additional information about this error:
Invalid APK file. (Code: INVALID_ZIP)

JOB

# Upload apk file to firebase app distribution
      - name: upload artifact to firebase app distribution
        uses: wzieba/Firebase-Distribution-Github-Action@v1
        with:
          appId: ${{secrets.FIREBASE_APP_ID}}
          token: ${{secrets.FIREBASE_TOKEN}}
          groups: default
          file: app/build/outputs/apk/debug/app-debug.apk
          debug: true

[Feature request]mac support

Run wzieba/Firebase-Distribution-Github-Action@v1
  with:
    appId: app: "MY_ID"
    token: MY_TOKEN
    groups: testers
    file: build/ios/iphoneos/app.ipa
    debug: false
##[error]Container action is only supported on Linux

Docker image is broken

Build container for action use: '/home/runner/work/_actions/wzieba/Firebase-Distribution-Github-Action/v1.3.2/Dockerfile'.
/usr/bin/docker build -t 08450d:970772709332452ba43e63d376f51476 -f "/home/runner/work/_actions/wzieba/Firebase-Distribution-Github-Action/v1.3.2/Dockerfile" "/home/runner/work/_actions/wzieba/Firebase-Distribution-Github-Action/v1.3.2"
Sending build context to Docker daemon 13.82kB

Step 1/6 : FROM node:14.4.0-alpine3.12
14.4.0-alpine3.12: Pulling from library/node
df20fa9351a1: Pulling fs layer
fc9f7c259fca: Pulling fs layer
8c427793ab10: Pulling fs layer
f38bde24d0c3: Pulling fs layer
f38bde24d0c3: Waiting
8c427793ab10: Verifying Checksum
8c427793ab10: Download complete
df20fa9351a1: Download complete
f38bde24d0c3: Verifying Checksum
f38bde24d0c3: Download complete
df20fa9351a1: Pull complete
fc9f7c259fca: Verifying Checksum
fc9f7c259fca: Download complete
fc9f7c259fca: Pull complete
8c427793ab10: Pull complete
f38bde24d0c3: Pull complete
Digest: sha256:3465907b06c3ace503458622dcda723586825baf39c3d5bd956c752552cb7b80
Status: Downloaded newer image for node:14.4.0-alpine3.12
---> 9736f552d33b
Step 2/6 : WORKDIR /app
---> Running in a81801b444d1
Removing intermediate container a81801b444d1
---> 63ed4bbb8d0f
Step 3/6 : COPY . /app
---> 8a44c996c52f
Step 4/6 : RUN yarn global add firebase-tools && apk update && apk add git
---> Running in 425025afb396
yarn global v1.22.4
[1/4] Resolving packages...
warning firebase-tools > [email protected]: request has been deprecated, see request/request#3142
warning firebase-tools > [email protected]: tweetsodium is deprecated and unmaintained. Please consider using libsodium.js, maintained by the same author as libsodium: https://github.com/jedisct1/libsodium.js
warning firebase-tools > request > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning firebase-tools > request > [email protected]: this library is no longer supported
[2/4] Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14.13.1 || >=16.0.0". Got "14.4.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
The command '/bin/sh -c yarn global add firebase-tools && apk update && apk add git' returned a non-zero code: 1
Warning: Docker build failed with exit code 1, back off 8.338 seconds before retry.
/usr/bin/docker build -t 08450d:970772709332452ba43e63d376f51476 -f "/home/runner/work/_actions/wzieba/Firebase-Distribution-Github-Action/v1.3.2/Dockerfile" "/home/runner/work/_actions/wzieba/Firebase-Distribution-Github-Action/v1.3.2"
Sending build context to Docker daemon 13.82kB

Step 1/6 : FROM node:14.4.0-alpine3.12
---> 9736f552d33b
Step 2/6 : WORKDIR /app
---> Using cache
---> 63ed4bbb8d0f
Step 3/6 : COPY . /app
---> Using cache
---> 8a44c996c52f
Step 4/6 : RUN yarn global add firebase-tools && apk update && apk add git
---> Running in 6fd60a44e2f0
yarn global v1.22.4
[1/4] Resolving packages...
warning firebase-tools > [email protected]: request has been deprecated, see request/request#3142
warning firebase-tools > [email protected]: tweetsodium is deprecated and unmaintained. Please consider using libsodium.js, maintained by the same author as libsodium: https://github.com/jedisct1/libsodium.js
warning firebase-tools > request > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning firebase-tools > request > [email protected]: this library is no longer supported
[2/4] Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14.13.1 || >=16.0.0". Got "14.4.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
The command '/bin/sh -c yarn global add firebase-tools && apk update && apk add git' returned a non-zero code: 1
Warning: Docker build failed with exit code 1, back off 2.261 seconds before retry.
/usr/bin/docker build -t 08450d:970772709332452ba43e63d376f51476 -f "/home/runner/work/_actions/wzieba/Firebase-Distribution-Github-Action/v1.3.2/Dockerfile" "/home/runner/work/_actions/wzieba/Firebase-Distribution-Github-Action/v1.3.2"
Sending build context to Docker daemon 13.82kB

Step 1/6 : FROM node:14.4.0-alpine3.12
---> 9736f552d33b
Step 2/6 : WORKDIR /app
---> Using cache
---> 63ed4bbb8d0f
Step 3/6 : COPY . /app
---> Using cache
---> 8a44c996c52f
Step 4/6 : RUN yarn global add firebase-tools && apk update && apk add git
---> Running in 55863dcd2b26
yarn global v1.22.4
[1/4] Resolving packages...
warning firebase-tools > [email protected]: request has been deprecated, see request/request#3142
warning firebase-tools > [email protected]: tweetsodium is deprecated and unmaintained. Please consider using libsodium.js, maintained by the same author as libsodium: https://github.com/jedisct1/libsodium.js
warning firebase-tools > request > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v[8](https://github.com/woolworthslimited/wx-metro-sixty-ios/runs/6500862535?check_suite_focus=true#step:2:8).dev/blog/math-random for details.
warning firebase-tools > request > [email protected]: this library is no longer supported
[2/4] Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14.13.1 || >=16.0.0". Got "14.4.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
The command '/bin/sh -c yarn global add firebase-tools && apk update && apk add git' returned a non-zero code: 1
Error: Docker build failed with exit code 1

[Feature request]more specific error log

Unknown Error can't show the error.

Run wzieba/Firebase-Distribution-Github-Action@v1
  with:
    appId: fuga
    token: hoge
    groups: testers
    file: app.ipa
    debug: false
/usr/bin/docker run --name bar --label hoge --workdir /github/workspace --rm -e INPUT_APPID -e INPUT_TOKEN -e INPUT_GROUPS -e INPUT_FILE -e INPUT_RELEASENOTES -e INPUT_DEBUG -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_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_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -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/andu/andu":"/github/workspace" bar:hoge
i  getting app details...
i  uploading distribution...

Error: failed to upload distribution. HTTP Error: 400, Unknown Error

Requested access to the resource is denied

Hi, does I'm receiving this error since a while, have anyone experienced it before?

Unable to find image '5588e4:2ad8139ecb904f3682b4dfd9867530ee' locally
docker: Error response from daemon: pull access denied for 5588e4, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.

image

Check for artifact presence

Messages received from firebase-tool are not very precise when it comes to lack of artifact file. One could add a deliberate check in action which logs a correct error message in case of lack artifact in given path.

Bonus points for suggesting consumer of the action a correct path to found .ipa/.apk files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.