firebase cloud functions doesn't execute the whole function?

firebase cloud functions doesn't execute the whole function?

Content Index :

firebase cloud functions doesn't execute the whole function?
Tag : node.js , By : Jarques
Date : January 12 2021, 07:00 PM

I wish did fix the issue. It's easy to see what's going on, if you add some logging to your code:
export const func = functions.pubsub.schedule('every 10 minutes').onRun(context => {
   const promises = any[] = [];
   //here I pass the array to some other function to gather the promises that are 
   //made there

   console.log('Before starting to read data...');
   admin.firestore().collection('someCollection').get().then(res => {
       console.log('Got data...');
   console.log('After starting to read data...');

   return Promise.all(promises);
export const func = functions.pubsub.schedule('every 10 minutes').onRun(context => {
   const promises = any[] = [];
   //here I pass the array to some other function to gather the promises that are 
   //made there

   return admin.firestore().collection('someCollection').get().then(res => {
        res.forEach(item => {
            let data = item.data();

            console.log('some Promise is pushed')
        return Promise.all(promises);


No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Can Cloud Functions for Firebase execute on user login?

Tag : firebase , By : ChrisMe
Date : March 29 2020, 07:55 AM
I hope this helps you . There's no event for login, because only the client side can define exactly when a login happens. Different clients may define this in different ways. If you need to trigger something on login, figure out when that point is in your app, then trigger it from the client via a database or HTTP function.

How to call an exported https Firebase Cloud function within Firebase Cloud functions?

Tag : javascript , By : glisignoli
Date : March 29 2020, 07:55 AM
wish of those help You're in for a lot of trouble (and unnecessarily larger billing) if you try to go about calling a function directly from another function like this. You're far better off just creating a plain old JS function that both of your Cloud Functions exports can share independently of each other.
See this: Calling a Cloud Function from another Cloud Function

Is there a way to call a non-cloud function inside same file where the Firebase cloud functions were created?

Tag : javascript , By : Helpful Dude
Date : March 29 2020, 07:55 AM
it should still fix some issue I still can't wrap my head around how these functions work generally. For the project, I created a function that will be called by whenever that function URL is called. Afterwards, the called function also uses a utility function. This function is used multiple times so I only find it sensible to create them in a separate function, although whenever I use the function after deployment, I get this error. , Just do as follows and don't use this .
  var my_info = isMM(newValue);
    var another_info = isMM(anotherValue);

Firebase Cloud Functions: can i start a live audio stream in a firebase cloud function?

Tag : firebase , By : beebob
Date : March 29 2020, 07:55 AM
this will help Cloud Functions does not support streaming at all. The entire request and response are sent in one chunk, and each are limited to 10MB in size. You might want to read the documentation on its limitations.

Execute Docker Container from Firebase/Google Cloud Functions

Tag : docker , By : apple
Date : September 21 2020, 07:00 PM
I hope this helps . What you describe sounds like an ideal story for the Google product called Cloud Run. In summary and at the highest level ... Cloud Run lets you run a docker container on demand when an incoming REST request arrives. You are billed for only the duration of execution of your container. When there is no traffic/requests, the container is automatically spun down and you are no longer charged. You can control how many requests are served per container (1 request = 1 container or multiple requests served by the same container or any combinations).
Effectively, Cloud Run is an alternative to Cloud Functions. With Cloud Functions you provide the function body and Cloud Functions provides the environment in which it runs. With Cloud Run, you provide the container which provides the function implementation AND the environment in which it runs. In both cases, Google owns the startup, shutdown and other management of the environment including scaling.
Related Posts Related QUESTIONS :
  • Wait for firestore queries to finish before return a cloud function response
  • How to upload files larger than 10mb via google cloud http functions. ? Any alternative options?
  • How to use the NODE_OPTIONS environment variable to set the max_old_space_size globally in Windows?
  • Is nodejs representing Reactor or Proactor design pattern?
  • How to reference generated Prisma schema in my schema.graphql file for a query that filters by id
  • Cant figure out what is wrong with my models
  • npm ERR! EPROTO: protocol error, symlink '../@babel/parser/bin/babel-parser.js' -> '/home/vagrant/code/proadco.test/n
  • express-session - the difference between session id and connect.sid?
  • How do you run this list of command that come from a book Eloquent Javascript Node.js
  • how to convert from import to require in nodejs
  • POST request returns undefined
  • How to read large json file in node js?
  • AWS Lambda function written in nodejs is not updating my DynamoDB
  • Best way to define a Map Object in GraphQL Schema?
  • bigchaindb-driver not found in node_modules?
  • Upgrading yarn in root directory do not upgrade Workspace dependencies
  • How can I redirect all clients to another page with socket.io?
  • How is `cluster` and `worker_threads` work in Node.js?
  • AWS Lambda - Not able to a access JS file bundled in Layer (Node.js)
  • How to connect AWS Bitnami Certified Kafka AMI with Elastic Beanstalk nodejs environment using kafka-node
  • Define Shortcut Keys by user (add or edit by user in web app)?
  • 'this' in regular function vs fat arrow function in ES6, illustrated with an example of Mongoose
  • Could not find the implementation for builder @angular-devkit/build-angular:dev-server on ng serve command
  • The engine "node" is incompatible with this module
  • fs.readDirSync can't find dir in typescript?
  • Difference between keepAliveTimeout and timeout?
  • Visual Studio Code: "'tslib' cannot be found" error in Angular project
  • Embedding twitter timeline does not render in angular 7
  • Secret environment variables in Cloudbuild (with out files), how?
  • more than one 2dsphere index, not sure which to run geoNear
  • Why only 50 instances working on AWS lambda?
  • VSCode debugging (F5) react app gives SyntaxError: Unexpected identifier
  • How to use sweetalert in nodejs?
  • ng update --all does say 'Repository is not clean' evendought git commit
  • I want to update user profile
  • Uncaught ReferenceError: __webpack_dev_server_client__ is not defined
  • Webpack not being recognized after updates
  • use firebase Storage with Admin sdk node.js
  • If I want my graphql endpoint to be something other than `/graphql`, how do I configure it with the `GraphqlModule`?
  • Node.js JWT token
  • Filtering the user data with the age max and age min while date of birth is present in schema
  • What is the right way of implementing a service in an Angular application?
  • Redis doesn't update when many requests at once
  • Passport + SAML with metadata.xml file
  • downgrade NPM version on mac
  • tar EPERM: operation not permitted, futime
  • Two Public subnets can not communicate with private ip
  • How to upload file to Group Drive (Shared Drive) with Google Drive API V3?
  • Why is Firestore returning inconsistent results when queried inside Cloud Functions?
  • How to make post request with data in test-cafe?
  • React app not working in Internet Explorer 11
  • Node.js how to use socket.io in express route
  • What incorrect Metadata-Flavor header at GoogleAuth means?
  • Insert if not exists, if exists update
  • SyntaxError: await is only valid in async function with argon2
  • storing PDF files in mongoose using Node.js and Angular 6
  • How to use localStorage Carefully in Angular
  • How does one create a Stripe order with invoice?
  • What is GET/ error in node.js application?
  • UnhandledPromiseRejectionWarning: Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com