firebase-tools: Deploy fails due to "missing" default storage bucket

[REQUIRED] Environment info

firebase-tools: 12.4.4

Platform: Ubuntu

[REQUIRED] Test case

Not sure the best way to do this since it relates to the state of firebase/GCP project.

[REQUIRED] Steps to reproduce

Run firebase deploy

[REQUIRED] Expected behavior

Deploy succeeds.

[REQUIRED] Actual behavior

After attempting to upgrade our firebase-tools version from 11.18.0 to 12.4.4, our deploys fail with

[2023-07-13T05:49:06.671Z] Default storage bucket is undefined.


There was an issue deploying your functions. Verify that your project has a Google App Engine instance setup at https://console.cloud.google.com/appengine and try again. If this issue persists, please contact support.

Error: Your project is being set up. Please wait a minute before deploying again.
1

It appears that the call to obtain the default storage bucket was changed in between those versions in https://github.com/firebase/firebase-tools/pull/5973

I ran the calls locally to see the difference in output (redacting our project details). The old call:

 curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "x-goog-user-project: REDACTED" \
    "https://appengine.googleapis.com/v1/apps/REDACTED"

returns

{
  "name": "apps/REDACTED",
  "id": "REDACTED",
  "authDomain": "gmail.com",
  "locationId": "us-central",
  "codeBucket": "staging.REDACTED.appspot.com",
  "servingStatus": "SERVING",
  "defaultHostname": "REDACTED.uc.r.appspot.com",
  "defaultBucket": "REDACTED.appspot.com",
  "serviceAccount": "REDACTED@appspot.gserviceaccount.com",
  "gcrDomain": "us.gcr.io",
  "databaseType": "CLOUD_DATASTORE_COMPATIBILITY",
  "featureSettings": {
    "splitHealthChecks": true,
    "useContainerOptimizedOs": true
  }
}

versus the new call:

 curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "x-goog-user-project: REDACTED" \
    "https://firebase.googleapis.com/v1beta1/projects/REDACTED"

which returns a much smaller blob

{
  "projectId": "REDACTED",
  "projectNumber": "1234567890",
  "displayName": "REDACTED",
  "name": "projects/REDACTED",
  "resources": {
    "hostingSite": "REDACTED"
  },
  "state": "ACTIVE",
  "etag": "1_c080f4ba-b2da-4369-8f5f-b3a731257079"
}

It seems like these APIs might not actually be equivalent?

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 7
  • Comments: 41 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Same here, downgraded to v11.30.0 and it worked.

Hey everyone, apologies for the delay in updates here. Our team has investigated the issue and rolled out a fix. Could anyone try deploying their storage rules with firebase deploy --only storage to confirm if errors persist? I tested it on v12.9.1 and encountered no issues.

Seeing this now in our 3 projects and trying to deploy from different machines

+1 deploys failing for me as well

We are seeing this issue too.

firebase deploy --only storage --debug

[2023-08-17T12:50:11.183Z] Default storage bucket is undefined.


There was an issue deploying your functions. Verify that your project has a Google App Engine instance setup at https://console.cloud.google.com/appengine and try again. If this issue persists, please contact support.

Error: Your project is being set up. Please wait a minute before deploying again.

Having trouble? Try firebase [command] --help

We absolutely have a default storage bucket setup, can verify in the appengine UI.

Our firebase.json has:

  "storage": {
    "rules": "rules/storage.rules"
  },

Which has

rules_version = '2';

// Craft rules based on data in your Firestore database
// allow write: if firestore.get(
//    /databases/(default)/documents/users/$(request.auth.uid)).data.isAdmin;
service firebase.storage {
  match /b/{bucket}/o {
    match /{userId}/{allPaths=**} {
      allow read, write: if request.auth != null && request.auth.uid == userId;
    }
  }
}

Strangely this works fine in our development project.

We’re seeing this also. We’ve filed a Google support ticket to get more attention on this, I’d encourage everyone here to do the same if you haven’t already!

Someone fix this ?

Same here, started today too a few hours ago

Same issue here, just noticed today

me too, just started today.

Yup, also started seeing this issue as of today.

Same here, no idea why this is being closed… We’re actively supporting an enterprise with our software and cannot deploy a hotfix that is halting operations because of this!

I thought it didn’t work too. I upgraded etc even have support case… I firebase deploy --only storage Then firebase deploy WORKED no problem. Also yesterday firebase deploy --only hosting worked as well. Only firebase deploy did not work.

Thank you, I’ll go try either of those.

firebase deploy --debug

will show you where it is failing if the issue persist

Same here, no idea why this is being closed… We’re actively supporting an enterprise with our software and cannot deploy a hotfix that is halting operations because of this!

I thought it didn’t work too. I upgraded etc even have support case…

I firebase deploy --only storage

Then firebase deploy WORKED no problem.

Also yesterday firebase deploy --only hosting worked as well. Only firebase deploy did not work.

Default storage bucket is undefined. is the error it takes place

from this code

apiv2][body] GET [https://firebase.googleapis.com/v1beta1/projects/[yourprojectname](https://firebase.googleapis.com/v1beta1/projects/[yoreprojectname])

Works again for me.

same problem here.

Yay all our deploys are broken

ah… so its not just me…

Same here

Yup

Just started seeing this today too. Did any of you upgrade (or have dependabot upgrade) google-github-actions/auth from v1 to v2? That seems to be the only CI change I’m seeing on my end.

I’ve not made any dependency changes today failing both locally & ci.

I have also not changed anything, and as of today am getting the same issue.

Just started seeing this today too. Did any of you upgrade (or have dependabot upgrade) google-github-actions/auth from v1 to v2? That seems to be the only CI change I’m seeing on my end.

I’ve not made any dependency changes today failing both locally & ci.

@bergeoisie please reopen, removing the use of storage is not a fix.

Same issue here happens in github action deployment since today. I can see that the request to v1beta1 version is made as described above.

This happens when running:

firebase deploy --only storage --debug