Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase cloud function deploy error

irregularly my firebase deployment get stuck at this log:

i  functions: updating function [FUNCTION NAME]... 

After canceling the deploy and retrying it throws the following error message:

⚠  functions: failed to update function resetBadgeCount ⚠  functions: HTTP Error: 400, An operation on function [FUNCTION NAME]  in region us-central1 in project [PROJECT NAME] is already in progress.  Please try again later. 

So it seams like that the deploy got stuck and kept in the pipeline blocking further deploys. After a while it let me deploy the functions normally again. But is there an explanation for this? Or maybe even a word around?

like image 648
Florian Avatar asked Jun 16 '17 18:06

Florian


People also ask

Why does cloud deployment fail?

Cloud Functions deployment can fail if the entry point to your code, that is, the exported function name, is not specified correctly. Your source code must contain an entry point function that has been correctly specified in your deployment, either via Cloud console or Cloud SDK.

How do you deploy cloud functions?

In the Source code field, select ZIP from Cloud Storage. In the Cloud Storage location field, click Browse to select a ZIP file from Cloud Storage. Your function source files must be located at the root of the ZIP file - see Source directory structure. Click Deploy.


1 Answers

Go to Google cloud functions console and see if there is red exclamation mark against your function. Then select that particular function and try to delete. once it gets deleted from there, you can deploy again successfully. if it is showing spinner, then wait till it shows red mark.

like image 115
Shahnaz Khan Avatar answered Sep 19 '22 10:09

Shahnaz Khan