Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension Deployment Fails Due to Unrecognized Default Bucket Name Change from *.appspot.com to *.firebasestorage.app #8152

Open
KoheiKanagu opened this issue Jan 30, 2025 · 3 comments · May be fixed by #8157

Comments

@KoheiKanagu
Copy link

[REQUIRED] Environment info

firebase-tools:
13.29.2

Platform:
macOS

[REQUIRED] Test case

Add the following content to firebase.json:

{
  "extensions": {
    "delete-user-data-firestore-users-v1": "firebase/[email protected]"
  }
}

Create extensions/delete-user-data-firestore-users-v1.env with the following content:

AUTO_DISCOVERY_SEARCH_DEPTH=1
CLOUD_STORAGE_BUCKET=${param:PROJECT_ID}.firebasestorage.app
ENABLE_AUTO_DISCOVERY=no
FIRESTORE_DELETE_MODE=shallow
FIRESTORE_PATHS=users_v1/{UID}

[REQUIRED] Steps to reproduce

Deploy the extension:

firebase deploy --only extensions

[REQUIRED] Expected behavior

The deployment should succeed.

[REQUIRED] Actual behavior

The deployment fails.

Error: Some services used by this extension have not been set up on your Firebase project. To ensure this extension works as intended, you must enable these services by following the provided links, then retry this command

    * Firebase Storage: store and retrieve user-generated files like images, audio, and video without server-side code.
      https://console.firebase.google.com/project/blooms-stg/storage

The full log is available here:
firebase-debug.log

I think the issue is with the bucket name.
In September 2024, it was announced that the default bucket name would change from *.appspot.com to *.firebasestorage.app.
https://firebase.google.com/docs/storage/faqs-storage-changes-announced-sept-2024#all-changes-default-storage-bucket

Indeed, the bucket name for my project is *.firebasestorage.app.
I think this name change is not being considered.

const pattern = "^" + projectId + "(.[[a-z0-9]+)*.appspot.com$";

@KoheiKanagu
Copy link
Author

I have created a hotfix. Please try it if you need it.
https://github.com/KoheiKanagu/firebase-tools/commits/firebasestorage/

@seanmavley
Copy link

Thanks @KoheiKanagu

@aalej
Copy link
Contributor

aalej commented Jan 30, 2025

Thanks for reporting this, @KoheiKanagu! I’m able to reproduce this issue. From what I can gather, this affects new projects as new Cloud Storage buckets have the name format of ${PROJECT_ID}.firebasestorage.app, while old projects retain the ${PROJECT_ID}.appspot.com format.

I wonder if we could update the pattern to support both formats. I’ll raise this to our engineering team and mark this as reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants