35

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?

Florian
  • 373
  • 1
  • 3
  • 5

6 Answers6

42

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.

Shahnaz Khan
  • 768
  • 12
  • 24
  • 4
    It does neither show a red flag, nor a spinner. The dropdown-menu on a single function also does not give an option to delete that function. When I open details, edit and delete-buttons are deactivated, and it shows "Function is still being deployed". – Martin Bories Mar 15 '18 at 00:25
  • It won't let me delete the function. The only solution we found was to start a new project. – kevando Feb 18 '21 at 23:09
4

You can temporarily rename your function:

$ firebase deploy --only functions

...

i functions: deleting function onSameDataChanged...

i functions: creating function onSameDataChanged1...

...

✔ functions: all functions deployed successfully!

✔ Deploy complete!

1
  1. Comment or cut your function
  2. Deploy
  3. Uncomment or paste back the function
  4. Rename the function
  5. Deploy
  6. Rename the function back
  7. Deploy
Konstantin Konopko
  • 4,533
  • 4
  • 28
  • 52
1

also you can wait a few minutes and you will get an error with {"code":10,"message":"ABORTED"}, then you can deploy again.

PinkyXW
  • 31
  • 4
0

just copy your index.js to some where else and delete function form firebasa function console

  1. firebase init -and overe write all file again
  2. past index.js text again
  3. deploy...
jivan patel
  • 193
  • 1
  • 8
0

For me it was the node version. Turns out I had the 15.x on my machine and the 12.x on the server. Just updating it solved my upload issue

Leonardo Rick
  • 165
  • 1
  • 2
  • 10