google-cloud-functions

Include the document id as a field id in firestore

牧云@^-^@ 提交于 2020-06-23 11:02:47
问题 Heres what i am trying to achieve i want a unique id field for every document in my database and i want that unique id to the same as the document id. Example: documents: data: eBgdTRE123 id:'eBgdTRE123' name:'Jhon Doe' job:'Programmer' i want i databse to have this structure, now i got two ideas to achieve this 1: to use cloud function and have onCreate listener and everytime theres a new document grab document and set the id field and update it heres how i am doing it exports

GCP Cloud Functions no longer categorizes errors correctly with tracebacks

空扰寡人 提交于 2020-06-23 07:54:44
问题 I've been using Cloud Functions for over a year now and in the last month or so, there's been a change that's made it much more difficult to troubleshoot errors. Previously, something as simple as the following would generate an Error in Logging with the offending line number and traceback ( KeyError: 'test' here), but now Logging just shows Function execution took X ms, finished with status: 'crash' categorized under Debug . def hello_world(request): request_json = request.get_json() print

firebase functions showing error cannot read property previous of undefined

人盡茶涼 提交于 2020-06-23 04:28:09
问题 I had implemented firebase functions in my app and previously it was working fine but now it is showing error Cannot read property 'previous' of undefined Error Logs of function TypeError: Cannot read property 'previous' of undefined at exports.LoveNotification.functions.database.ref.onWrite (/user_code/index.js:223:16) at cloudFunctionNewSignature (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:109:23) at cloudFunction (/user_code/node_modules/firebase-functions/lib/cloud

Updating cloud function to suitable Node js version

核能气质少年 提交于 2020-06-23 04:11:18
问题 The cloud function for the firebase FCM notification which was working fine with the earlier version of Node.js 8 but now as the node 8 is deprecated and needs to be updated, what changes should I make to the cloud function code, I have already installed Nodejs 14* on my machine 回答1: The only change you're absolutely required to make is not in your code at all. Minimally, you should edit your package.json and make sure that the target node version is 10: "engines": { "node": "10" }, Simply

Download Firebase Cloud Functions [duplicate]

天涯浪子 提交于 2020-06-22 19:53:31
问题 This question already has answers here : Get code from firebase console which I deployed earlier (4 answers) Closed 3 years ago . is it possible to download the scripts from firebase cloud functions. I have a running script on it but I lost the file and now I can't update my function. 回答1: Before we started working with Firebase Cloud Functions, we had set up a Google Cloud Platform account. Now whenever we deploy our firebase cloud functions, they are also accessible through Google's Cloud

Download Firebase Cloud Functions [duplicate]

梦想的初衷 提交于 2020-06-22 19:52:28
问题 This question already has answers here : Get code from firebase console which I deployed earlier (4 answers) Closed 3 years ago . is it possible to download the scripts from firebase cloud functions. I have a running script on it but I lost the file and now I can't update my function. 回答1: Before we started working with Firebase Cloud Functions, we had set up a Google Cloud Platform account. Now whenever we deploy our firebase cloud functions, they are also accessible through Google's Cloud

Download Firebase Cloud Functions [duplicate]

别说谁变了你拦得住时间么 提交于 2020-06-22 19:52:07
问题 This question already has answers here : Get code from firebase console which I deployed earlier (4 answers) Closed 3 years ago . is it possible to download the scripts from firebase cloud functions. I have a running script on it but I lost the file and now I can't update my function. 回答1: Before we started working with Firebase Cloud Functions, we had set up a Google Cloud Platform account. Now whenever we deploy our firebase cloud functions, they are also accessible through Google's Cloud

Stripe Connect Firebase Functions

非 Y 不嫁゛ 提交于 2020-06-22 12:51:12
问题 Looked all over, tried capturing the code via swift but still need a function to fire off the code to get an Express account to connect. Won't waste your time with the code attempts, so looking for Firebase Functions that will setup a Stripe Connect endpoint for redirection and send back the code to finalise the process. Anyone care to help? Thanks for reading. 回答1: You'll want to do something like this: Open a browser or web view from your App. Let the user work through the form to sign up

Firebase analytics log events with cloud functions [duplicate]

帅比萌擦擦* 提交于 2020-06-20 16:36:48
问题 This question already has an answer here : Firebase - log events from server side cloud functions [duplicate] (1 answer) Closed 2 years ago . I'm using google cloud functions as backend to process my app orders and connect with gateway payment to accept/deny purchases... Everything is working fine. but i would like to register the purchase events to firebase analytics so i can monitore all app revenue in the same dashboard in firebase on android I can do something like: Bundle bundle = new

Firebase analytics log events with cloud functions [duplicate]

為{幸葍}努か 提交于 2020-06-20 16:34:16
问题 This question already has an answer here : Firebase - log events from server side cloud functions [duplicate] (1 answer) Closed 2 years ago . I'm using google cloud functions as backend to process my app orders and connect with gateway payment to accept/deny purchases... Everything is working fine. but i would like to register the purchase events to firebase analytics so i can monitore all app revenue in the same dashboard in firebase on android I can do something like: Bundle bundle = new