Skip to content

Invalid bucket name, while deploying function (v7.0.0) #1779

@mandalornl

Description

@mandalornl

[REQUIRED] Version info

node: 22.19.0

firebase-functions: 7.0.0

firebase-tools: 14.26.0

firebase-admin: 13.6.0

[REQUIRED] Test case

import { defineString } from 'firebase-functions/params';
import { onObjectFinalized } from 'firebase-functions/storage';

const myStorageBucket = defineString('MY_STORAGE_BUCKET');

export const test = onObjectFinalized({
  bucket: myStorageBucket,
}, () => {
  // Do something
});

Using e.g. import { storageBucket } from 'firebase-functions/params' results in the same issue.

[REQUIRED] Steps to reproduce

  1. Upgrade from firebase-functions 6.x to 7.0.0.
  2. Deploy function.

[REQUIRED] Expected behavior

I expect the function to deploy without issues.
Works fine in <= 6.x.

[REQUIRED] Actual behavior

[...]
[2025-12-03T09:03:24.344Z] Looking up bucket region for the storage event trigger
[2025-12-03T09:03:24.345Z] Looking up bucket region for the storage event trigger on bucket params.MY_STORAGE_BUCKET
[2025-12-03T09:03:24.345Z] Checked if tokens are valid: true, expires at: 1764754302033
[2025-12-03T09:03:24.346Z] Checked if tokens are valid: true, expires at: 1764754302033
[2025-12-03T09:03:24.346Z] >>> [apiv2][query] GET https://storage.googleapis.com/storage/v1/b/params.MY_STORAGE_BUCKET [none]
[2025-12-03T09:03:24.699Z] <<< [apiv2][status] GET https://storage.googleapis.com/storage/v1/b/params.MY_STORAGE_BUCKET 400
[2025-12-03T09:03:24.700Z] <<< [apiv2][body] GET https://storage.googleapis.com/storage/v1/b/params.MY_STORAGE_BUCKET {"error":{"code":400,"message":"Invalid bucket name: 'params.MY_STORAGE_BUCKET'","errors":[{"message":"Invalid bucket name: 'params.MY_STORAGE_BUCKET'","domain":"global","reason":"invalid"}]}}
Request to https://storage.googleapis.com/storage/v1/b/params.MY_STORAGE_BUCKET had HTTP Error: 400, Invalid bucket name: 'params.MY_STORAGE_BUCKET'
[2025-12-03T09:03:24.703Z] FirebaseError: Failed to obtain the storage bucket
[...]
Error: Can't find the storage bucket region

Were you able to successfully deploy your functions?

No, I was not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions