I had read this post How to return values in javascript. But my question is how do we get the Map value if we derived it from asynchronous function like in this code below: I want to use the value from this function using this code: Please, help me out. Any tips and trick will be great. Thank you very
Tag: google-cloud-functions
There was an error deploying functions. Failed to update function app in region us-central1
This is my first time trying to deploy a function firebase function. I’ve written an API and I want to create a firebase function and use it. In my project everything works on localhost and even worked when I did firebase serve –only functions, hosting. Since I’m only using hosting and functions I didn’t do the initializeApp(firebaseConfig) thing of firebase
Batch write with Firebase Cloud Functions
I’m using Firebase as backend to my iOS app and can’t figure out how to construct a batch write through their Cloud Functions. I have two collections in my Firestore, drinks and customers. Each new drink and each new customer is assigned a userId property that corresponds to the uid of the currently logged in user. This userId is used
Must use import to load ES Module .eslintrc.js
I am trying to fix this problem for hours. I’ve read nearly every post about this, but still, I came to no solution. I am trying to deploy a firebase-function with the “https got-library” dependency, but no matter what I do, nothing works. I am not the best with node-js or typescript (usually a kotlin frontend-dev), so I have no
Firebase – How to extend FirebaseError?
I am implementing a cloud function for signing up with unique username and password. In order to throw exceptions, I was previously doing the following: signUpValidation.js signUp.function.js But, I don’t really like this way of throwing the exceptions in the signUpValidation module… it makes more sense to me to throw “AuthErrors” instead of “HttpsErrors”. So, as it seems not possible
Getting `eslint’ – parsing error, while compiling firebase cloud function
Recently I’ve started working on a project based on firebase cloud functions and firestore database. I’m writing a cloud function trigger function which will query a “Collection group”, on a new document being created. Below is the cloud function code file: But while compiling i am being thrown the below error I tried a lot but I am unable to
Firebase Cloud Function finished with status: ‘response error’
I have a cloud function that is returning a lot of data (50’000 documents) as objects. When I run it I get the error finished with status: ‘response error’. This only happens when I export all of the data, when a limit (up to 20’000) is applied it works without problem. This lets me think that the response might be
firebase cloud schedule function not working correct
I have firebase cloud schedule function. It works fine for the first two periods, but then it stops. my function codes are below. I am not experienced in javascript. Is there any mistake in my codes? I am attaching the logs. 12:07:04.314 AM -> worked fine 6:07:03,658 AM -> worked fine 12:07:04.314 PM -> not calling current date now ->
Invoking Firebase Function from Firebase hosting code blocked by CORS
I’ve initialized a templated Firebase project with functions & hosting features. I’ve uncommented the templated HTTP function: And Also added the following code to the templated public/index.html file: I’ve tried making this work with multiple configurations: Firebase emulator for hosting, invoking the deployed Firebase function. Firebase emulator for hosting, invoking the emulated function (Firebase functions emulator). The deployed hosting, invoked
Querying multiple collections of firestore using array-contains-any
I am trying query a number of documents in different collections with array-contains-any, by using Promise.all() to get all the documents at once. I’ve checked whether the path is correct, whether the documents exist, whether the key exists in the document and everything is ok. The querySnapshots and snapshots have no data retrieved. At some point of the log says: