FirebaseExtended / FirebaseExtended/action-hosting-deploy

[BUG] Service Account created without cloud functions permissions

Open
#253 3 comments 3 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
809
Forks
232
PR merge metrics
No merged PRs in 30d

Description

New Firebase account, new GCP account.

Timeline:

1. On 1st run the API for Cloud Build API was not enabled. CI Failed with link to enable API.
3. API enabled in GCP console
4. _5 min of wait, while change propogates_
5. Relaunched the buid, still fails with 403 permission error.

### Action config

```
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
"on":
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci && npm run build
working-directory: src
# https://github.com/FirebaseExtended/action-hosting-deploy/issues/251
- run: /usr/local/bin/npx firebase-tools@latest experiments:enable webframeworks
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_REFRAMED_XXX }}"
channelId: live
projectId: reframed-XXX

```

### Error message

```
Error: HTTP Error: 403, Permission denied to get service [cloudfunctions.googleapis.com]
Help Token: AZWD64qjGY7kpTyVX0ZKnHv4y7i-P-c1SxiKSbJevd0hA3JJINEVy0MJG_B1SKeytwFfbgMNo5v4yLffFVRBLI6mS80E_Ad4Ld5fNPkgpj6ia8pD
[2022-11-08T10:56:59.367Z] Error Context: ***
"body": ***
"error": ***
"code": 403,
"message": "Permission denied to get service [cloudfunctions.googleapis.com]\nHelp Token: AZWD64qjGY7kpTyVX0ZKnHv4y7i-P-c1SxiKSbJevd0hA3JJINEVy0MJG_B1SKeytwFfbgMNo5v4yLffFVRBLI6mS80E_Ad4Ld5fNPkgpj6ia8pD",
"status": "PERMISSION_DENIED",
"details": [
***
"@type": "type.googleapis.com/google.rpc.PreconditionFailure",
"violations": [
***
"type": "googleapis.com",
"subject": "?error_code=110002&service=serviceusage.googleapis.com&permission=serviceusage.services.get&resource=projects/reframed-XXX"
***
]
***,
***
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "AUTH_PERMISSION_DENIED",
"domain": "serviceusage.googleapis.com",
"metadata": ***
"service": "serviceusage.googleapis.com",
"permission": "serviceusage.services.get",
"resource": "projects/reframed-XXX"
***
***
]
***
***,
"response": ***
"statusCode": 403
***
***

```

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.