Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Functions stopped Working and Can't deploy again

Firebase Cloud functions giving an error called.

Error: Server Error
The server encountered an error and could not complete your request.
Please try again in 30 seconds.

When I try to re-deploy, it gives following error.

Error setting up the execution environment for your function. Please try again after a few minutes.

What could be the reason? Is it following issue? Sates: https://status.firebase.google.com/incident/Functions/18018

like image 866
Janaka Chathuranga Avatar asked Mar 09 '18 13:03

Janaka Chathuranga


People also ask

What does Firebase deploy -- only functions do?

Running firebase deploy --only functions deletes the existing functions before creating new ones.

Why is Firebase functions not free?

Cloud Functions for Firebase does have a free tier for usage up to a certain point, as outlined on our pricing page. However, because Cloud Functions uses some aspects of Google Cloud's paid infrastructure, we need to enable billing to use Cloud Functions.


2 Answers

Yes there is an issue with Cloud Functions, as you can see from the link above

Investigating an issue with Functions

Incident began at 2018-03-09 03:30 (all times are US/Pacific).

Last update is this:

Mar 09, 2018 04:45
We are still investigating the issue with Cloud Functions execution. We will provide another status update as soon as possible.

https://status.firebase.google.com/incident/Functions/18018

After the issue is done, you will be able to deploy your functions again using the below:

firebase deploy --only functions

Edit:

I just deployed some functions and it is working now, just takes a bit of time.

like image 78
Peter Haddad Avatar answered Sep 25 '22 15:09

Peter Haddad


I had the same issue and it was fixed after updating firebase-tools. I saw following on my console

         Update available 7.0.0 → 7.8.1       
         Run npm i -g firebase-tools to update   

Then i just changed node version and updated firebase tools

nvm use 11
npm upgrade firebase-tools -g

Sometimes switching environment will also help

firebase use dev

Sometimes when some node modules are not installed , the error you get will be like below

Deployment error.
Error setting up the execution environment for your function. Please try deploying again after a few minutes.

Make sure that all node modules are installed prior to deployment, I wasted almost 2 days and realised one node module was not installed .

like image 28
sumit Avatar answered Sep 25 '22 15:09

sumit