Error in deploying v2 cloud functions

 

I've been encountering a persistent issue while deploying functions on Firebase. Specifically, the error message "Error: There was an error deploying functions" frequently appears when I attempt to deploy all functions simultaneously. However, I've noticed that deploying each function individually usually results in a successful deployment. This discrepancy leads me to believe that the problem might arise when multiple functions are triggered for deployment at once. I'm uncertain whether this issue is rooted in Firebase's deployment process or if it's related to the cloud build triggers.

Command for Deploying All Functions:

yarn firebase deploy --only functions --force -P $PROJECT_ID
 
This command, intended for deploying all functions, often results in the mentioned error.

Command for Deploying a Single Function:

yarn firebase deploy --only ${_DEPLOYMENT_ELEMENTS} --force -P $PROJECT_ID
 
Deploying functions individually with the above command seems to work without issues. But if multiple triggers were executed then some function deployments fails
2 1 282
1 REPLY 1

Hello @chamath_eka!

You can do the following troubleshooting options:

  1. In Deploying functions, your project may contain a large number of functions which results in an error. To solve this, try deploying your functions in a group of 10 or lower.
  2. Examine your logs to know the specific issue. 
  3. If the above options don't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!