Skip to content

HTTP Error: 403, Permission 'firebasestorage.defaultBucket.get' denied #6593

Closed

Description

@etienne-ditchlabs

[REQUIRED] Environment info

firebase-tools: 13.0.0

Platform: Ubuntu

[REQUIRED] Test case

I've started getting the following error when deploying to Firebase with the latest version (13.0.0):

Unexpected error when fetching default storage bucket.


Error: HTTP Error: 403, Permission 'firebasestorage.defaultBucket.get' denied on resource '//firebasestorage.googleapis.com/projects/myProjectId/defaultBucket' (or it may not exist).

Reverting to 12.9.1 works fine.

[REQUIRED] Steps to reproduce

firebase deploy --project myProjectId

[REQUIRED] Expected behavior

Should deploy without any errors like it used to with the previous version.

[REQUIRED] Actual behavior

firebase deploy --project myProjectId --debug

[2023-12-07T18:59:32.491Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2023-12-07T18:59:32.567Z] [iam] checking project myProjectId for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebaserules.releases.create","firebaserules.releases.update","firebaserules.rulesets.create"]
[2023-12-07T18:59:32.568Z] >>> [apiv2][query] POST [https://cloudresourcemanager.googleapis.com/v1/projects/myProjectId:testIamPermissions](https://cloudresourcemanager.googleapis.com/v1/projects/myProjectId:testIamPermissions) [none]
[2023-12-07T18:59:32.568Z] >>> [apiv2][(partial)header] POST [https://cloudresourcemanager.googleapis.com/v1/projects/myProjectId:testIamPermissions](https://cloudresourcemanager.googleapis.com/v1/projects/myProjectId:testIamPermissions) x-goog-quota-user=projects/myProjectId
[2023-12-07T18:59:32.568Z] >>> [apiv2][body] POST [https://cloudresourcemanager.googleapis.com/v1/projects/myProjectId:testIamPermissions](https://cloudresourcemanager.googleapis.com/v1/projects/myProjectId:testIamPermissions) ***"permissions":["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebaserules.releases.create","firebaserules.releases.update","firebaserules.rulesets.create"]***
[2023-12-07T18:59:32.572Z] <<< [apiv2][status] GET https://firebase-public.firebaseio.com/cli.json 200
[2023-12-07T18:59:32.572Z] <<< [apiv2][body] GET https://firebase-public.firebaseio.com/cli.json ***"cloudBuildErrorAfter":1594252800000,"cloudBuildWarnAfter":1590019200000,"defaultNode10After":1594252800000,"minVersion":"3.0.5","node8DeploysDisabledAfter":1613390400000,"node8RuntimeDisabledAfter":1615809600000,"node8WarnAfter":1600128000000***
[2023-12-07T18:59:32.657Z] <<< [apiv2][status] POST [https://cloudresourcemanager.googleapis.com/v1/projects/myProjectId:testIamPermissions](https://cloudresourcemanager.googleapis.com/v1/projects/myProjectId:testIamPermissions) 200
[2023-12-07T18:59:32.658Z] <<< [apiv2][body] POST [https://cloudresourcemanager.googleapis.com/v1/projects/myProjectId:testIamPermissions](https://cloudresourcemanager.googleapis.com/v1/projects/myProjectId:testIamPermissions) ***"permissions":["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebaserules.releases.create","firebaserules.releases.update","firebaserules.rulesets.create"]***
[2023-12-07T18:59:32.659Z] >>> [apiv2][query] POST [https://iam.googleapis.com/v1/projects/myProjectId/serviceAccounts/[email protected]:testIamPermissions](https://iam.googleapis.com/v1/projects/myProjectId/serviceAccounts/[email protected]:testIamPermissions) [none]
[2023-12-07T18:59:32.660Z] >>> [apiv2][body] POST [https://iam.googleapis.com/v1/projects/myProjectId/serviceAccounts/[email protected]:testIamPermissions](https://iam.googleapis.com/v1/projects/myProjectId/serviceAccounts/[email protected]:testIamPermissions) ***"permissions":["iam.serviceAccounts.actAs"]***
[2023-12-07T18:59:32.748Z] <<< [apiv2][status] POST [https://iam.googleapis.com/v1/projects/myProjectId/serviceAccounts/[email protected]:testIamPermissions](https://iam.googleapis.com/v1/projects/myProjectId/serviceAccounts/[email protected]:testIamPermissions) 200
[2023-12-07T18:59:32.748Z] <<< [apiv2][body] POST [https://iam.googleapis.com/v1/projects/myProjectId/serviceAccounts/[email protected]:testIamPermissions](https://iam.googleapis.com/v1/projects/myProjectId/serviceAccounts/[email protected]:testIamPermissions) ***"permissions":["iam.serviceAccounts.actAs"]***

=== Deploying to 'myProjectId'...

i  deploying storage, firestore, functions 
Running command: npm --prefix "$RESOURCE_DIR" run lint

> lint
> eslint --ext .js,.ts .

Running command: npm --prefix "$RESOURCE_DIR" run build

> build
> rm -rf ./lib && tsc --project tsconfig.build.json

✔  functions: Finished running predeploy script. 
i  storage: ensuring required API firebasestorage.googleapis.com is enabled... 
[2023-12-07T18:59:50.326Z] >>> [apiv2][query] GET [https://serviceusage.googleapis.com/v1/projects/myProjectId/services/firebasestorage.googleapis.com](https://serviceusage.googleapis.com/v1/projects/myProjectId/services/firebasestorage.googleapis.com) [none]
[2023-12-07T18:59:50.326Z] >>> [apiv2][(partial)header] GET [https://serviceusage.googleapis.com/v1/projects/myProjectId/services/firebasestorage.googleapis.com](https://serviceusage.googleapis.com/v1/projects/myProjectId/services/firebasestorage.googleapis.com) x-goog-quota-user=projects/myProjectId
[2023-12-07T18:59:50.600Z] <<< [apiv2][status] GET [https://serviceusage.googleapis.com/v1/projects/myProjectId/services/firebasestorage.googleapis.com](https://serviceusage.googleapis.com/v1/projects/myProjectId/services/firebasestorage.googleapis.com) 200
[2023-12-07T18:59:50.601Z] <<< [apiv2][body] GET [https://serviceusage.googleapis.com/v1/projects/myProjectId/services/firebasestorage.googleapis.com](https://serviceusage.googleapis.com/v1/projects/myProjectId/services/firebasestorage.googleapis.com) [omitted]
✔  storage: required API firebasestorage.googleapis.com is enabled 
[2023-12-07T18:59:50.602Z] >>> [apiv2][query] GET [https://firebasestorage.googleapis.com/v1alpha/projects/myProjectId/defaultBucket](https://firebasestorage.googleapis.com/v1alpha/projects/myProjectId/defaultBucket) [none]
[2023-12-07T18:59:50.750Z] <<< [apiv2][status] GET [https://firebasestorage.googleapis.com/v1alpha/projects/myProjectId/defaultBucket](https://firebasestorage.googleapis.com/v1alpha/projects/myProjectId/defaultBucket) 403
[2023-12-07T18:59:50.750Z] <<< [apiv2][body] GET [https://firebasestorage.googleapis.com/v1alpha/projects/myProjectId/defaultBucket](https://firebasestorage.googleapis.com/v1alpha/projects/myProjectId/defaultBucket) ***"error":***"code":403,"message":"Permission 'firebasestorage.defaultBucket.get' denied on resource '//firebasestorage.googleapis.com/projects/myProjectId/defaultBucket' (or it may not exist).","status":"PERMISSION_DENIED","details":[***"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"IAM_PERMISSION_DENIED","domain":"firebasestorage.googleapis.com","metadata":***"resource":"projects/myProjectId/defaultBucket","permission":"firebasestorage.defaultBucket.get"***]***


Unexpected error when fetching default storage bucket.


Error: HTTP Error: 403, Permission 'firebasestorage.defaultBucket.get' denied on resource '//firebasestorage.googleapis.com/projects/myProjectId/defaultBucket' (or it may not exist).
[2023-12-07T18:59:50.752Z] Error Context: ***
  "body": ***
    "error": ***
      "code": 403,
      "message": "Permission 'firebasestorage.defaultBucket.get' denied on resource '//firebasestorage.googleapis.com/projects/myProjectId/defaultBucket' (or it may not exist).",
      "status": "PERMISSION_DENIED",
      "details": [
        ***
          "@type": "type.googleapis.com/google.rpc.ErrorInfo",
          "reason": "IAM_PERMISSION_DENIED",
          "domain": "firebasestorage.googleapis.com",
          "metadata": ***
            "resource": "projects/myProjectId/defaultBucket",
            "permission": "firebasestorage.defaultBucket.get"
          ***
        ***
      ]
    ***
  ***,
  "response": ***
    "statusCode": 403
  ***
***
Error: Process completed with exit code 1.

Activity

  1. joehan commented on Dec 7, 2023

    @joehan
    Member

    Hey all - I've raised this to the Firebase Storage team and they are working on a fix ASAP. As an immediate workaround, I believe this permission is included in the firebasestorage.viewer and firebasestorage.admin roles - if you are running into issues, please try to grant one of those roles to the service account or user account that you are using.

  2. etienne-ditchlabs commented on Dec 7, 2023

    @etienne-ditchlabs
    Author
  3. joehan commented on Dec 8, 2023

    @joehan
    Member

    Hey @etienne-ditchlabs, thanks for reporting this. It seems like what happened here the permissions were added to all the right roles, but we forgot to make them visible. They will still work, but can't be added to custom roles until we do so.

    We removed the flag hiding this permission yesterday afternoon - unfortunately, for production safety reasons, IAM rollouts take a few days. We're going to update this issue once they are fully rolled out and available - until then, please use firebasestorage.viewer or firebasestorage.admin. Sorry for the inconvenience all!

  4. abhis3 commented on Dec 11, 2023

    @abhis3
    Contributor

    Hi all, +1 to everything that Joe said above. The IAM team is slowly performing the rollouts, but looks like they have a small backlog they're working their way through, likely due to the various holiday freezes in place. We're working to see if we can expedite the process but this will likely end up being a waiting game, sorry for the inconvenience. I'll ping this bug with an update when the changes are available.

  5. SimonKib commented on Dec 12, 2023

    @SimonKib

    @joehan Thanks, but adding either of the suggested permissions did not work me.

    Only thing that changed was error message changing from
    HTTP Error: 403, Permission 'firebasestorage.defaultBucket.get' denied on resource
    to
    HTTP Error: 403, The caller does not have permission

    , so the deployment still fails.

    Here's the debug log.

    [2023-12-12T09:11:39.158Z] <<< [apiv2][body] GET https://firebasestorage.googleapis.com/v1alpha/projects/projectID/defaultBucket ***"error":***"code":403,"message":"The caller does not have permission","status":"PERMISSION_DENIED"***
    
    
    Unexpected error when fetching default storage bucket.
    
    Error: HTTP Error: 403, The caller does not have permission
    [2023-12-12T09:11:39.160Z] Error Context: ***
      "body": ***
        "error": ***
          "code": 403,
          "message": "The caller does not have permission",
          "status": "PERMISSION_DENIED"
        ***
      ***,
      "response": ***
        "statusCode": 403
      ***
    ***
    

    I use the great "GitHub Actions for Firebase" and got deployment working again by downgrading to firebase-tools 12.9

  6. jaceknijaki commented on Dec 13, 2023

    @jaceknijaki

    Same for me. Adding Cloud Storage for Firebase Admin permission just changed error message.
    As @SimonKib suggested, downgrade to firebase-tools 12.9 does the job while v13.0.1 is causing issues.

  7. jaceknijaki commented on Dec 19, 2023

    @jaceknijaki

    @SimonKib Looks like setting both roles: Cloud Storage for Firebase Viewer and Storage Admin did the job without firebase-tools downgrade.

  8. SimonKib commented on Dec 19, 2023

    @SimonKib

    @SimonKib Looks like setting both roles: Cloud Storage for Firebase Viewer and Storage Admin did the job without firebase-tools downgrade.

    Thanks @jaceknijaki. I did try that, but at that time it did not work for me.

  9. bjosttveit commented on Dec 23, 2023

    @bjosttveit

    @SimonKib Looks like setting both roles: Cloud Storage for Firebase Viewer and Storage Admin did the job without firebase-tools downgrade.

    Adding Storage Admin worked for me 🥳

  10. abhis3 commented on Jan 12, 2024

    @abhis3
    Contributor

    Hi all, to close the loop the firebasestorage.defaultBucket.* permissions are now publicly visible on IAM, sorry again for the issue. Going to close this out but please feel free to reopen if there are still issues.

  11. balazserd commented on Jun 28, 2025

    @balazserd

    I am hitting this error on the Firebase Console for Cloud Storage today - I see in the Network calls in the Developer Tools that the defaultBucket API call is failing with this exact error, even though I am the owner of the Project in Cloud Console. As an owner I should have permission to anything.

  12. kdawgwilk commented on Apr 29, 2026

    @kdawgwilk
    Contributor

    I am using a custom role with firebasestorage.defaultBucket.get permission and this same 403 is happening. I also added the roles/firebasestorage.viewer binding to the service account and it still gives a 403. Going to try the storage admin next but even if that works that is granting waay more permissions than should be required for this to work correctly. I think this issue should be reopened

  13. kdawgwilk commented on Apr 29, 2026

    @kdawgwilk
    Contributor

    I ended up adding just these 2 permissions to my custom role instead of the storage admin role and its now working

    • storage.buckets.get
    • storage.buckets.list

    So the docs are incorrect on the API here https://firebase.google.com/docs/reference/rest/storage/rest/v1alpha/projects/getDefaultBucket#iam-permissions

  14. JamesJoyceGit commented on Jun 16, 2026

    @JamesJoyceGit

    I have just experienced this - my CICD was working fine, no upgrades - but something changed somewhere...

    Adding the 2 permissions ("storage.buckets.get", "storage.buckets.list",) was not enough.

    I also had to add "roles/firebasestorage.admin"

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

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