10

I'm having trouble doing firebase deploy --only functions for an app on Blaze plan. I have the latest firebase-tools CLI (v 3.5.0).

I get the following error:

=== Deploying to 'myapp1234'...

i  deploying functions
i  functions: ensuring necessary APIs are enabled...
i  runtimeconfig: ensuring necessary APIs are enabled...
✔  runtimeconfig: all necessary APIs are enabled
✔  functions: all necessary APIs are enabled
i  functions: preparing functions directory for uploading...
i  functions: packaged functions (1.29 KB) for uploading
✔  functions: functions folder uploaded successfully
i  starting release process (may take several minutes)...
i  functions: updating function myFunc...
⚠  functions[myFunc]: Deploy Error: Failed to initialize a region


Functions deploy had errors. To continue deploying other features (such as database), run:
    firebase deploy --except functions

Error: Functions did not deploy properly.

I've retried this every half hour for the past 12 hours, thinking there's an outage. The firebase status page shows all green.

Radu Cugut
  • 1,663
  • 1
  • 16
  • 18

1 Answers1

7

Ok, here's what I found, a little weird:

firebase list shows all the firebase projects you have access to, BUT they are not already available (i.e. added as alias to your current folder project).

Even if the firebase-tools CLI allows you to do firebase deploy --project myproject1, if you do not have myproject1 declared in .firebaserc => it will fail with the weird region error above.

To fix this, I found that there are 2 options:

  • firebase use --add (will trigger an interactive list)
  • firebase use myproject1

=> and then firebase deploy --project myproject1 will work (with or without the optional --only functions)

Radu Cugut
  • 1,663
  • 1
  • 16
  • 18