91
votes

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.

6

6 Answers

90
votes

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.

39
votes

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.

[...]

8
votes

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

7
votes

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

2
votes

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
https://i.stack.imgur.com/4hWQZ.pngabove image marked with red linethis is your firebase project hosted region.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
0
votes

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.