firebase cloud functions http error code 403
Asked Answered
J

3

23

I'm trying to deploy functions to my firebase project to handle notifications. But I keep running into this error HTTP Error: 403, Unknown Error I have contacted firebase and they are looking into it but taking forever. Deploying was working 2 days ago when I last deployed my functions but since I have added an android project to my firebase it seems to not work (Could be a coincidence). I have also tried to deploy the functions to a different firebase project and it works. Do I not have the permissions set properly please help me.

Debug:

functions: Upload Error: HTTP Error: 403, Unknown Error

Error: HTTP Error: 403, Unknown Error
[2019-01-31T00:01:26.609Z] Error Context: {
 "body": {
 "error": {
  "message": "Unknown Error"
  }
 },
  "response": {
"statusCode": 403,
"body": "<?xml version='1.0' encoding='UTF-8'?><Error>       <Code>UserProjectAccountProblem</Code><Message>User project billing account not in good standing.</Message><Details>The billing account for project 1045929686315 is disabled in state absent</Details></Error>",
"headers": {
  "x-guploader-uploadid": "AEnB2UoYSyB5o6dXh6joQ-s6QoB5YzYwgIhAT59xLdx0MgUTIwHYCfoEFCAF2_bNAuyQBnUl54l87Fa4BROabJJOj-MEu6KetA",
  "content-type": "application/xml; charset=UTF-8",
  "content-length": "252",
  "vary": "Origin",
  "date": "Thu, 31 Jan 2019 00:01:26 GMT",
  "server": "UploadServer",
  "alt-svc": "quic=\":443\"; ma=2592000; v=\"44,43,39\""
},
"request": {
  "uri": {
    "protocol": "https:",
    "slashes": true,
    "auth": null,
    "host": "storage.googleapis.com",
    "port": 443,
    "hostname": "storage.googleapis.com",
    "hash": null, "search": "?GoogleAccessId=service-423866259440@gcf-admin-robot.iam.gserviceaccount.com&Expires=1548894685&Signature=c0Gi8cGFko3BEkjU6PM2PxhGr3P8gPnpTdmmydBsFbwAmJCjnKQ9bpECjd9eBWFa2J0mGdt4NJRseK6abLTaZHI93hcvMCS858%2B4cYf8t2k3Gn3p5jN4TKn%2FkvtIONNYUB9EiBdBYOhxAOVP5u%2BoQ1KgswLLcriO0J%2FQmLm9UoOP%2B9mEx%2B4Twb%2FuQyIjt%2B3H0q9S08LSJrtYOSj2CtdwwNaPcSGeBkfosTyd6cEYXZElDb4czjXWvvxN7TXPdJRqCmZFby4D2aIxiWNhLIzHa6nQWySkms25EC8flJ5AdfsGrAu9ykL7zXhs7O0WhTq0Ho9CzoAlzVt2lNvtGOpxrQ%3D%3D",
    "query": "GoogleAccessId=service-423866259440@gcf-admin-robot.iam.gserviceaccount.com&Expires=1548894685&Signature=c0Gi8cGFko3BEkjU6PM2PxhGr3P8gPnpTdmmydBsFbwAmJCjnKQ9bpECjd9eBWFa2J0mGdt4NJRseK6abLTaZHI93hcvMCS858%2B4cYf8t2k3Gn3p5jN4TKn%2FkvtIONNYUB9EiBdBYOhxAOVP5u%2BoQ1KgswLLcriO0J%2FQmLm9UoOP%2B9mEx%2B4Twb%2FuQyIjt%2B3H0q9S08LSJrtYOSj2CtdwwNaPcSGeBkfosTyd6cEYXZElDb4czjXWvvxN7TXPdJRqCmZFby4D2aIxiWNhLIzHa6nQWySkms25EC8flJ5AdfsGrAu9ykL7zXhs7O0WhTq0Ho9CzoAlzVt2lNvtGOpxrQ%3D%3D",
    "pathname": "/gcf-upload-us-central1-a42e5787-1848-48ba-b1e9-5d3334dd3e60/ea4346c3-9f3b-4c10-bd13-cc1acb708099.zip",
    "path": "/gcf-upload-us-central1-a42e5787-1848-48ba-b1e9-5d3334dd3e60/ea4346c3-9f3b-4c10-bd13-cc1acb708099.zip?GoogleAccessId=service-423866259440@gcf-admin-robot.iam.gserviceaccount.com&Expires=1548894685&Signature=c0Gi8cGFko3BEkjU6PM2PxhGr3P8gPnpTdmmydBsFbwAmJCjnKQ9bpECjd9eBWFa2J0mGdt4NJRseK6abLTaZHI93hcvMCS858%2B4cYf8t2k3Gn3p5jN4TKn%2FkvtIONNYUB9EiBdBYOhxAOVP5u%2BoQ1KgswLLcriO0J%2FQmLm9UoOP%2B9mEx%2B4Twb%2FuQyIjt%2B3H0q9S08LSJrtYOSj2CtdwwNaPcSGeBkfosTyd6cEYXZElDb4czjXWvvxN7TXPdJRqCmZFby4D2aIxiWNhLIzHa6nQWySkms25EC8flJ5AdfsGrAu9ykL7zXhs7O0WhTq0Ho9CzoAlzVt2lNvtGOpxrQ%3D%3D",
    "href": "https://storage.googleapis.com/gcf-upload-us-central1-a42e5787-1848-48ba-b1e9-5d3334dd3e60/ea4346c3-9f3b-4c10-bd13-cc1acb708099.zip?GoogleAccessId=service-423866259440@gcf-admin-robot.iam.gserviceaccount.com&Expires=1548894685&Signature=c0Gi8cGFko3BEkjU6PM2PxhGr3P8gPnpTdmmydBsFbwAmJCjnKQ9bpECjd9eBWFa2J0mGdt4NJRseK6abLTaZHI93hcvMCS858%2B4cYf8t2k3Gn3p5jN4TKn%2FkvtIONNYUB9EiBdBYOhxAOVP5u%2BoQ1KgswLLcriO0J%2FQmLm9UoOP%2B9mEx%2B4Twb%2FuQyIjt%2B3H0q9S08LSJrtYOSj2CtdwwNaPcSGeBkfosTyd6cEYXZElDb4czjXWvvxN7TXPdJRqCmZFby4D2aIxiWNhLIzHa6nQWySkms25EC8flJ5AdfsGrAu9ykL7zXhs7O0WhTq0Ho9CzoAlzVt2lNvtGOpxrQ%3D%3D"
  },
  "method": "PUT"
}
}
}
Jessamine answered 31/1, 2019 at 0:5 Comment(6)
error message "User project billing account not in good standing." says the project was disabled, thus I would guess you can not deploy and use it for time being,Refreshment
@Refreshment Does that mean I will never be able to use it? Or will it be fixed later on?Jessamine
I am not sure, I would guess once billing issue is addressed, the project may be re-enabledRefreshment
What do I need to do to fix the billing issue? Upgrade my package? Or just add billing information? @RefreshmentJessamine
I am not sure, try to contact GC support,Refreshment
Try firebase logout and firebase loginSigrid
T
8

You need to login to Firebase CLI through the account that initiated the billing for the project (wherein you are trying to deploy the functions).

Even though you may have multiple accounts (in Firebase console), the signing through firebase CLI has to be done through main billing account. I tried this and it solved the error! Hope this helps!

Thermomotor answered 19/9, 2020 at 20:48 Comment(3)
Could you/someone confirm that this is currently the case? Meaning, if I have a project where I and another account are both "owners", but I am not the main billing account, can I not use the Firebase CLI with my account?Kamasutra
@Kamasutra It works fine without being the main billing account. That's how I use it, Owner of project but not the billing account. If you have this 403 issue try logout and login again as the other answer says, it worked for me!Hawking
Thank for this answer! Would have expected some other error in the firebase console logs or an error while deploying. Just got the 403 when accessing the function. Tried a lot before I found this answer... Had to delete the old function firstItinerary
S
57

Try firebase logout and firebase login. This fixes the issue sometimes if you're trying to run it on a different account.

Staub answered 28/9, 2020 at 17:59 Comment(2)
sometimes the solution is too simple. Worked for me. Thanks!Heartsick
after enabling billing or changing plan, somehow the CLI is unable to detect it. logout, login makes it work.Cattery
T
8

You need to login to Firebase CLI through the account that initiated the billing for the project (wherein you are trying to deploy the functions).

Even though you may have multiple accounts (in Firebase console), the signing through firebase CLI has to be done through main billing account. I tried this and it solved the error! Hope this helps!

Thermomotor answered 19/9, 2020 at 20:48 Comment(3)
Could you/someone confirm that this is currently the case? Meaning, if I have a project where I and another account are both "owners", but I am not the main billing account, can I not use the Firebase CLI with my account?Kamasutra
@Kamasutra It works fine without being the main billing account. That's how I use it, Owner of project but not the billing account. If you have this 403 issue try logout and login again as the other answer says, it worked for me!Hawking
Thank for this answer! Would have expected some other error in the firebase console logs or an error while deploying. Just got the 403 when accessing the function. Tried a lot before I found this answer... Had to delete the old function firstItinerary
J
0

I Had the same issue,

The issue was related to the billing account that you can check at https://console.developers.google.com/billing/enable?project=[ProjectID]

When I checked, I noticed the payment failed on the configured credit card, So I just fixed that and everything is working now.

Jockstrap answered 31/5 at 12:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.