Firebase Cloud Functions – Issues with Promises

When running my Firebase Cloud Function orgNew there seems to be something not working correctly with my promises and the order in which the code is executed. Console log (shortened): 1: Function …

sendGrid + firebase cloud functions: Email is not sending with Callable functions

I’m new to javascript and I’m trying to send email with the firebase callable functions. the idea is to send code to user email from a cloud function when called from the iOS app. But the thing is, …

Change fields of documents in a collection Firestore periodically – Cloud Functions

I have a database structure like this: Posts(collection) -> userID (document) -> Subposts (subcollection) -> document[isVisible: true] We have different userIDs which means that each userID …

How to access field on an array in cloud function?

I have this cloud function that creates a new document every time I have a new chat. I am trying to access the values on the messages array, but I got undefined on the console log. here is my document …

Firebase Functions and API Keys

Are Firebase functions a safe place to store API keys for a React App? As an example, see the following template for an axios API call in a Firebase Cloud function: cloud function template edit: added …

How to make multiple fetch requests inside Firebase functions?

I am trying to make 2 fetch requests inside a function which runs periodically. exports.scheduledPay = functions.pubsub.schedule(‘1 of month 07:00’).timeZone(‘America/New_York’).onRun((context) => {…

Firebase function deploy fails with requiring external code

I am trying to re-use existing Express application and basically port it to firebase functions. I have a project structure like this: / functions/ index.js package.json src/ app/ …

Before/After properties without change are not equal in firestore-triggered Cloud Function

I have a firestore collection called events that contains documents with the fields begin, end and title. The function is triggered if a document was changed. begin and end are of type timestamp. I …

Firebase Functions times out when using puppeteer’s browser.newPage()

I have seen others having relatively minor performance problems with puppeteer running on Firebase Functions. In my case, Firebase times out before I can do anything with puppeteer, even with the …

Firebase cloud functions: can’t extract parameters when invoking a callable function

I’m using the Flutter SDK to call a cloud function. I add a parameter someField but on the cloud side, it cannot be retrieved and is always undefined. This is how I call the cloud function static …