FirebaseExtended / FirebaseExtended/action-hosting-deploy

[BUG] Can't perform CI deployments using firebase-tools 14.0

Open
#413 1 comment 4 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
809
Forks
232
PR merge metrics
No merged PRs in 30d

Description

### Action config

```
- name: Deploy To Firebase Hosting
uses: FirebaseExtended/action-hosting-deploy@v0
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks
PUBLIC_BACKEND_BASE_URL: ${{ vars.PUBLIC_BACKEND_BASE_URL }}
PUBLIC_SITE_URL: ${{ vars.PUBLIC_SITE_URL }}
PUBLIC_FIREBASE_API_KEY: ${{ vars.PUBLIC_FIREBASE_API_KEY }}
PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ vars.PUBLIC_FIREBASE_AUTH_DOMAIN }}
PUBLIC_FIREBASE_PROJECT_ID: ${{ vars.PUBLIC_FIREBASE_PROJECT_ID }}
PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ vars.PUBLIC_FIREBASE_STORAGE_BUCKET }}
PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ vars.PUBLIC_FIREBASE_MESSAGING_SENDER_ID }}
PUBLIC_FIREBASE_APP_ID: ${{ vars.PUBLIC_FIREBASE_APP_ID }}
{ ... }
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
projectId: ${{ vars.PUBLIC_FIREBASE_PROJECT_ID }}
entryPoint: './apps/frontend'
channelId: live
target: ${{ github.ref_name == 'staging' && 'staging' || (github.ref_name == 'production-frontend' || github.ref_name == 'production') && 'production' || 'dev' }}
```

-->

### Error message

```
[2025-03-28T16:14:26.857Z] Functions deploy failed.
[2025-03-28T16:14:26.857Z] ***
[2025-03-28T16:14:26.857Z] TypeError: Cannot read properties of null (reading 'length')
at Object.formatServiceAccount (/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/gcp/proto.js:95:24)
at /home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/gcp/cloudfunctionsv2.js:196:122
at Object.convertIfPresent (/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/gcp/proto.js:45:25)
at Object.functionFromEndpoint (/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/gcp/cloudfunctionsv2.js:196:11)
at Fabricator.createV2Function (/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:233:35)
at Fabricator.createEndpoint (/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:137:24)
at /home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:103:64
at handle (/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:89:23)
at Fabricator.applyChangeset (/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:103:26)
at /home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:69:40

Error: There was an error deploying functions

The process '/opt/hostedtoolcache/node/20.19.0/x64/bin/npx' failed with exit code 2
Error: The process '/opt/hostedtoolcache/node/20.19.0/x64/bin/npx' failed with exit code 2
***
conclusion: 'failure',
output: ***
title: 'Deploy preview failed',
summary: "Error: The process '/opt/hostedtoolcache/node/20.19.0/x64/bin/npx' failed with exit code 2"
***
***
```

### Expected behavior

The deployment should be performed flawlessly, like it was previously on version 13.35.1. We had to manually set the 13.35.1 version after several deployments attempts, and only then the deployment worked.

### Actual behavior

The deploy stops even if the project build succeeds. The error message is listed above.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.