Cloud Functions for Firebase - Billing account not configured

node.jsFirebaseGoogle Cloud-Functions

node.js Problem Overview


I just implemented the new Cloud Functions for Firebase, but there something in the log that bothers me:

> Billing account not configured. External network is not accessible and > quotas are severily limited. Configure billing account to remove these > restrictions

I actually managed to access the function from the external network, so I'm wondering do I really have to give my billing account? There's nothing about this in the firebase documentation.

I'm using the Spark subscription plan for personal test purposes and I don't want to add billing info if I'm not going to pay for anything yet.

node.js Solutions


Solution 1 - node.js


The "Billing account not configured" warning message is automatically logged by Google Cloud Functions when no billing account is configured. It doesn't mean that your code isn't working, but it merely there as a reminder just in case you have a problem.


The restriction is about outbound access - e.g. can your Function request resources from the general internet. Its absolutely fine to use a function to respond to a webhook, or to access Google-internal services such a the Realtime Database.

If you wanted to call a third party web service (for example) you'd need to enable billing.

For the other quotas, take a look at: https://firebase.google.com/pricing/ - as you can see there are limits to the number of invocations (125,000 at time of writing) and CPU and memory (40k cpu-seconds and 40k GB-seconds) in the free tier.

Solution 2 - node.js

Doug stevenson's answers helped me best:

TL;DR: It's a warning message. if you are not doing outbound calls, you are fine

> That warning message appears for all functions when executing on the Spark plan. It's just a warning - you can ignore it if you're doing doing any outbound networking in your own own. > > We're looking into getting that message changed or removed so that it's less confusing. > > [...]

Solution 3 - node.js

Make sure that your project is linked to a billing account.

If you navigate to https://console.cloud.google.com/billing

You should be able to find your Firebase project listed there. If not, then you will need to go to the list of projects, and from your projects menu, select billing then link a billing account to it.

enter image description here

Solution 4 - node.js

The first invocation happens but gets marked when it is in spark plan and gets invoked from an external network ( look at logs )

At the time of this writing, Plan called BLAZE (Pay as you go) allows networking ( external access ) and has a perpetual free tier.

The first 2,000,000 invocations, 400,000 GB-sec, 200,000 CPU-sec, and 5GB of Internet egress traffic is provided for free each month. You are only charged on usage past this free allotment.

More on cloud function pricing https://cloud.google.com/functions/pricing

Solution 5 - node.js

1.Depreciate the Node Version set node version 8
   "engines": {
   "node": "8"
   },
2.Then deploy firebase by following command as You guys Know
> firebase deploy
Then you'll get this type of https://i.stack.imgur.com/4hWQZ.png output in your terminal
if you noticed above image marked with red line this is your firebase project hosted region. if you too also get same result everything is done we are in final step

manually we have to hit our project endpoint

 https://yourregion-firebaseprojectname.cloudfunctions.net/yourfunctionname
 (exported function name)
 

> In my case > https://us-central1-socialape-d5dab.cloudfunctions.net/helloWorld

or follow this steps

1.Depreciate node version to 8 
2. firebase deploy  
3. you'll get deploy complete message above that message you'll see 
   functions[helloWorld(us-central)]:Succesful update operation .
4. this us-central  is your project hosted region 
   prefix to this [helloWorld   is your function name  get this information from uour output terminal.   
5.  After  that https://yourregion-firebaseprojectname.cloudfunctions.net/yourfunctionname
 (exported function name)       which is  helloWorld

Solution 6 - node.js

Yes you need to upgrade to blaze plan from your existing free plan which is spark. You wont be charged until you exceed the spark plan benefits.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionHristo StoyanovView Question on Stackoverflow
Solution 1 - node.jsIan BarberView Answer on Stackoverflow
Solution 2 - node.jsbernatfortetView Answer on Stackoverflow
Solution 3 - node.jsSamerView Answer on Stackoverflow
Solution 4 - node.jsSatta RaviView Answer on Stackoverflow
Solution 5 - node.jsDeepak kumar debugView Answer on Stackoverflow
Solution 6 - node.jsVamshidhar ReddyView Answer on Stackoverflow