question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to deploy Firebase app using service account default credentials

See original GitHub issue

[REQUIRED] Environment info

firebase-tools: 7.13.0

Platform: Ubuntu on Cloudbuild from cloud-builders-community

[REQUIRED] Test case

  • Create any Firebase app
  • Attempt to deploy, using cloudbuld with a service account
  • Note that even if the service account is assigned the Owner role, this still fails.

[REQUIRED] Steps to reproduce

  • Attempt to deploy by running firebase deploy

[REQUIRED] Expected behavior

succesfully deployed.

[REQUIRED] Actual behavior

Starting Step #4 - "Deploy to Firebase Hosting"
Step #4 - "Deploy to Firebase Hosting": Pulling image: gcr.io/mike-242702/firebase
Step #4 - "Deploy to Firebase Hosting": Using default tag: latest
Step #4 - "Deploy to Firebase Hosting": latest: Pulling from mike-242702/firebase
Step #4 - "Deploy to Firebase Hosting": 3192219afd04: Already exists
Step #4 - "Deploy to Firebase Hosting": 17c160265e75: Already exists
Step #4 - "Deploy to Firebase Hosting": cc4fe40d0e61: Already exists
Step #4 - "Deploy to Firebase Hosting": 9d647f502a07: Already exists
Step #4 - "Deploy to Firebase Hosting": c8bd59397b26: Already exists
Step #4 - "Deploy to Firebase Hosting": f9289dfd19be: Already exists
Step #4 - "Deploy to Firebase Hosting": 9553b08b6292: Pulling fs layer
Step #4 - "Deploy to Firebase Hosting": 37581b1ce15a: Pulling fs layer
Step #4 - "Deploy to Firebase Hosting": 45ea08f1ad05: Pulling fs layer
Step #4 - "Deploy to Firebase Hosting": 134f3de54272: Pulling fs layer
Step #4 - "Deploy to Firebase Hosting": 2d088f82ff68: Pulling fs layer
Step #4 - "Deploy to Firebase Hosting": 134f3de54272: Waiting
Step #4 - "Deploy to Firebase Hosting": 2d088f82ff68: Waiting
Step #4 - "Deploy to Firebase Hosting": 45ea08f1ad05: Verifying Checksum
Step #4 - "Deploy to Firebase Hosting": 45ea08f1ad05: Download complete
Step #4 - "Deploy to Firebase Hosting": 37581b1ce15a: Verifying Checksum
Step #4 - "Deploy to Firebase Hosting": 37581b1ce15a: Download complete
Step #4 - "Deploy to Firebase Hosting": 2d088f82ff68: Verifying Checksum
Step #4 - "Deploy to Firebase Hosting": 2d088f82ff68: Download complete
Step #4 - "Deploy to Firebase Hosting": 134f3de54272: Verifying Checksum
Step #4 - "Deploy to Firebase Hosting": 134f3de54272: Download complete
Step #4 - "Deploy to Firebase Hosting": 9553b08b6292: Verifying Checksum
Step #4 - "Deploy to Firebase Hosting": 9553b08b6292: Download complete
Step #4 - "Deploy to Firebase Hosting": 9553b08b6292: Pull complete
Step #4 - "Deploy to Firebase Hosting": 37581b1ce15a: Pull complete
Step #4 - "Deploy to Firebase Hosting": 45ea08f1ad05: Pull complete
Step #4 - "Deploy to Firebase Hosting": 134f3de54272: Pull complete
Step #4 - "Deploy to Firebase Hosting": 2d088f82ff68: Pull complete
Step #4 - "Deploy to Firebase Hosting": Digest: sha256:d7764e447534464a4ae049f7fa64f55ec4433a93e4a097003ab20e1b922b3d19
Step #4 - "Deploy to Firebase Hosting": Status: Downloaded newer image for gcr.io/mike-242702/firebase:latest
Step #4 - "Deploy to Firebase Hosting": gcr.io/mike-242702/firebase:latest
Step #4 - "Deploy to Firebase Hosting": [2020-02-14T03:27:36.389Z] ----------------------------------------------------------------------
Step #4 - "Deploy to Firebase Hosting": [2020-02-14T03:27:36.392Z] Command:       /usr/local/bin/node /usr/local/bin/firebase deploy --project develop --debug
Step #4 - "Deploy to Firebase Hosting": [2020-02-14T03:27:36.393Z] CLI Version:   7.7.0
Step #4 - "Deploy to Firebase Hosting": [2020-02-14T03:27:36.393Z] Platform:      linux
Step #4 - "Deploy to Firebase Hosting": [2020-02-14T03:27:36.393Z] Node Version:  v13.8.0
Step #4 - "Deploy to Firebase Hosting": [2020-02-14T03:27:36.408Z] Time:          Fri Feb 14 2020 03:27:36 GMT+0000 (Coordinated Universal Time)
Step #4 - "Deploy to Firebase Hosting": [2020-02-14T03:27:36.408Z] ----------------------------------------------------------------------
Step #4 - "Deploy to Firebase Hosting": [2020-02-14T03:27:36.409Z] 
Step #4 - "Deploy to Firebase Hosting": [2020-02-14T03:27:36.418Z] > 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"]
Step #4 - "Deploy to Firebase Hosting": [2020-02-14T03:27:36.419Z] > attempting to authenticate via app default credentials
Step #4 - "Deploy to Firebase Hosting": [2020-02-14T03:27:36.525Z] TypeError: Cannot create property 'refresh_token' on string 'Not Found
Step #4 - "Deploy to Firebase Hosting": '
Step #4 - "Deploy to Firebase Hosting":     at /usr/local/lib/node_modules/firebase-tools/node_modules/google-auth-library/lib/auth/oauth2client.js:208:28
Step #4 - "Deploy to Firebase Hosting":     at /usr/local/lib/node_modules/firebase-tools/node_modules/google-auth-library/lib/auth/computeclient.js:85:7
Step #4 - "Deploy to Firebase Hosting":     at Request._callback (/usr/local/lib/node_modules/firebase-tools/node_modules/google-auth-library/lib/transporters.js:106:7)
Step #4 - "Deploy to Firebase Hosting":     at Request.self.callback (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22)
Step #4 - "Deploy to Firebase Hosting":     at Request.emit (events.js:321:20)
Step #4 - "Deploy to Firebase Hosting":     at Request.EventEmitter.emit (domain.js:485:12)
Step #4 - "Deploy to Firebase Hosting":     at Request.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:1154:10)
Step #4 - "Deploy to Firebase Hosting":     at Request.emit (events.js:321:20)
Step #4 - "Deploy to Firebase Hosting":     at Request.EventEmitter.emit (domain.js:485:12)
Step #4 - "Deploy to Firebase Hosting":     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:1076:12)
Step #4 - "Deploy to Firebase Hosting": 
Step #4 - "Deploy to Firebase Hosting": Error: An unexpected error has occurred.
Finished Step #4 - "Deploy to Firebase Hosting"
ERROR
ERROR: build step 4 "gcr.io/mike-242702/firebase" failed: step exited with non-zero status: 2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:19 (13 by maintainers)

github_iconTop GitHub Comments

8reactions
samtsterncommented, Feb 18, 2020

The fix for this bug has been released in version 7.13.1

5reactions
wvanderdeijlcommented, Feb 14, 2020

Thanks for the update. I am already very impressed with the very quick response times. I understand that releasing a new version on a friday as a “one man job” is not the best idea in the world. I’ll use the workaround for now and will check early next week for a new release

Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to deploy Firebase functions using service account ...
Unable to deploy Firebase functions using service account app default credentials # ... using a service account, via app default credentials ...
Read more >
Authenticate with a service account | Firebase App Distribution
When you use a service account to authenticate, Firebase uses Application Default Credentials (ADC) to locate your app's credentials, which you can provide ......
Read more >
Trying to deploy firebase functions, Default service account ...
I tried both disabling and enabling the Cloud Functions APi as well as logging out and logging back in through the CLI with...
Read more >
Firebase functions deploy failed, the default service account ...
Firebase functions deploy failed, the default service account does not exist. I have got this error message when deploying firebase function:
Read more >
Authenticate workloads using service accounts - Google Cloud
For most applications, choose one of the following: Use Application Default Credentials and a client library; Use gcloud and gsutil commands. For applications...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found