4

When trying to deploy my Firebase Functions (after switching computers) I get an error and can't deploy.

Error: HTTP Error: 403, Service Usage API has not been used in project 563584335869 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/serviceusage.googleapis.com/overview?project=563584335869 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

I do not have a project with that ID and have switched between projects and it always gives me the exact same project ID. That link doesn't work for me, but when I put my project ID instead of 563584335869 then it works and the Service Usage API is enable.

Logging out and back in didn't solve the issue, neither did a firebase init.

Anybody know what could be causing this?

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
Pieter
  • 2,188
  • 20
  • 27

3 Answers3

8

I think it may be related to firebase-tools 7.1.0. I back to 7.0.2 and it worked fine.

sudo npm uninstall firebase-tools

sudo npm i -g firebase-tools@7.0.2
Marcio
  • 81
  • 3
  • You right. happened for me right after the update. i did roll back and all is working fine now. – Gladi Jul 12 '19 at 00:50
  • Thank you for posting a solution. Although this was the correct answer at the time, it's now been fixed and marking this as the answer will mislead people. – Pieter Jul 12 '19 at 07:52
  • I did basically the same, but just " sudo npm i -g firebase-tools " (after the uninstall). I guess the present day latest version also doesn't have the bug. – C-Note187 Jun 14 '20 at 15:51
2

firebaser here

There was indeed an issue introduced in the deployment of Cloud Functions with Firebase CLI version 7.1.0. The issue has now been fixed on our backend servers, and you should no longer encounter this issue.

If you continue to have problems, reach out to Firebase support for personalized help in troubleshooting.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
0

I was getting the project 563584335869 error with Cloud Functions in the Firebase Emulators but not with Cloud Functions in the Firebase Cloud. In the Cloud I was getting a more common error about lack of credentials. I fixed both by adding Firebase Admin to the IAM service account for my Cloud Functions.

Thomas David Kehoe
  • 10,040
  • 14
  • 61
  • 100