When I am importing more than 300 record in firebase using google cloud function than am getting error :
Without a glimpse into your code, I only can guess. "Function crashed outside of request scope" indicates that the cloud function had finished before the asynchronous function(s) did. See for documentation for handling async functions and promises: https://firebase.google.com/docs/functions/terminate-functions
Take a closer look at your returns. Make sure you don't forget to return the promise to functions. For an example see also here: https://github.com/firebase/firebase-functions/issues/18#issuecomment-288375709
I had the same problem and it ended up being a problem with the mysql connection I was using in the project.
In this case I used https://www.npmjs.com/package/mysql2 and the system was losing connections to the database.
It was not clear where it was happening and I got the following errors and no indication where the problem was occurring. - Error: function crashed out of request scope Function killed. - Function execution took 31903 ms, finished with status: 'connection error'
Placing try..catch around the database calls revealed the correct error and location where it was happening.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With