Questions tagged [google-cloud-functions]

Google Cloud Functions is a lightweight, event-based, asynchronous compute solution that allows you to create small, single-purpose functions written in Node.js, Python or Go that respond to cloud events without the need to manage a server or a runtime environment.

Google Cloud Functions is a lightweight, event-based, asynchronous compute solution that allows you to create small, single-purpose functions written in or that respond to cloud events without the need to manage a server or a runtime environment.

Related tags:

17585 questions
96
votes
20 answers

Stripe Error: No signatures found matching the expected signature for payload

I have a stripe webhook that call a Firebase function. In this function I need to verify that this request comes from Stripe servers. Here is the code : const functions = require('firebase-functions'); const bodyParser =…
Zat42
  • 2,471
  • 4
  • 22
  • 36
94
votes
7 answers

Cloud Functions for Firebase - Billing account not configured

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…
Hristo Stoyanov
  • 1,960
  • 1
  • 12
  • 24
87
votes
6 answers

How do you setup local environment variables for Cloud Functions for Firebase

I'm using http cloud functions to listen for a request and then return a simple message. I'm developing cloud functions locally using: firebase serve --only functions I've setup some custom environment variables using firebase…
ChrisMacSEA
  • 891
  • 1
  • 6
  • 6
82
votes
3 answers

firebase deploy --only functions overrides existing functions

Running firebase deploy --only functions deletes the existing functions before creating new ones. Is it possible to modify this behavior to create if not exist, update if exists, no actions if functions not being deployed?
Quan Vuong
  • 1,919
  • 3
  • 14
  • 24
80
votes
26 answers

Firebase Callable Function + CORS

I'm trying to call a callable Cloud Function from my app, but I'm facing CORS issues. I can't enable Cors since I don't have access to the request and response on the onCall function. This is my function: exports.UserInvitation =…
Pietro Coelho
  • 1,894
  • 1
  • 26
  • 34
75
votes
9 answers

Is Cloud Functions in Firebase Free or Not (Cloud Functions deployment requires the pay-as-you-go (Blaze) billing plan)

When i make my first deploy function I can't deploying Because I have Error Asks me to make Upgrade to my account to Blaze I need to Know Can i deploy Function when i use free account?? Output: i deploying functions i functions: ensuring required…
mohmmed ali
  • 805
  • 1
  • 5
  • 10
73
votes
13 answers

Delete a Document with all Subcollections and Nested Subcollections in Firestore

How can you delete a Document with all it's collections and nested subcollections? (inside the functions environment) In the RTDB you can ref.child('../someNode).setValue(null) and that completes the desired behavior. I can think of two ways you…
Linxy
  • 2,525
  • 3
  • 22
  • 37
72
votes
1 answer

Are Callable Cloud Functions better than HTTP functions?

With the latest Firebase Update callable functions were introduced. My question is whether this new way is faster than the "old" http triggers and if it is more secure. I have no expertise in this field, but I think the HTTP vs HTTPS might make a…
creativecreatorormaybenot
  • 114,516
  • 58
  • 291
  • 402
71
votes
8 answers

Calling a Cloud Function from another Cloud Function

I am using a Cloud Function to call another Cloud Function on the free spark tier. Is there a special way to call another Cloud Function? Or do you just use a standard http request? I have tried calling the other function directly like…
70
votes
20 answers

Error: Could not load the default credentials (Firebase function to firestore)

I am attempting to write an onCall function for Firebase Cloud Functions that performs advanced querying tasks on a firestore database (i.e. checking a text query up against AutoML natural lang to get a category, etc) but I keep running into a…
70
votes
13 answers

Error deploying with firebase on npm --prefix $RESOURCE_DIR run lint

I have a fresh install of firebase tools (following this tutorial) and I'm trying to upload my first firebase function. I get this issue with the hello-world example that they initialise when you run firebase init (The only set up the functions CLI…
Daan Luttik
  • 2,781
  • 2
  • 24
  • 37
64
votes
6 answers

Get code from firebase console which I deployed earlier

I had created firebase functions in nodejs and deployed the code on firebase. The function was to send an email when the new user is created. I have lost the code now. Can we pull that code from firebase ?
Abhilasha
  • 1,177
  • 4
  • 10
  • 17
62
votes
5 answers

Use custom domain for Google Cloud Function

I can't see any option anywhere to set up a custom domain for my Google Cloud Function when using HTTP Triggers. Seems like a fairly major omission. Is there any way to use a custom domain instead of their location-project.cloudfunctions.net domain…
abagshaw
  • 6,162
  • 4
  • 38
  • 76
62
votes
7 answers

firebase deploy to custom region (eu-central1)

is there a way to specify the Region/Zone where my firebase functions will be deployed. Actually i didn't found anything about that in the documentation and my functions are always deployed to us-central1 but i want to have it on eu-central1... Is…
BernhardS
  • 978
  • 2
  • 10
  • 26
61
votes
5 answers

Cloud Functions for Firebase - getaddrinfo ENOTFOUND

Trying to make a request to Paypal's API using PayPal-node-SDK exports.requestPayment = functions.https.onRequest((req, res) => { return new Promise(function (fullfilled, rejected) { paypal.payment.create(create_payment_json, {},…
user47376
  • 2,263
  • 3
  • 21
  • 26