Firebase storage security rules 400 error issue “Permission denied. Could not access bucket xxxxx-****.appspot.com”

前端 未结 7 2308
清酒与你
清酒与你 2020-11-29 04:30

I keeps getting message error from firebase link saying 400 error with my firebase storage upload in my react project when trying to upload photo... everything were working

相关标签:
7条回答
  • 2020-11-29 04:39

    I had the same problem. The thing was, I hosted my page before initializing the storage, so when I initialized it, the bucket did not match. All I had to do was to generate another google-services.json file on firebase, download it, add it on my project file and then deploy it again. That solved my issue.

    0 讨论(0)
  • 2020-11-29 04:45

    To solve my code error 400 I go to firebase console and register my app but the file google-services.json is every way failed to download.

    0 讨论(0)
  • 2020-11-29 04:50

    This error happend when you are trying to upload image before creating Firebase Storage which is specific for file uploading.

    Could not access bucket xxxxx-****.appspot.com. Please enable Firebase Storage for your bucket by visiting the Storage tab in the Firebase Console and ensure that you have sufficient permission to properly provision resources

    Thats why you are facing the error with message Please Enable Firebase Storage for your bucket because Firebase Storage act as default location for bucket media upload.

    {
      "error": {
        "code": 400,
        "message": "Permission denied. Could not access bucket xxxxx-****.appspot.com. Please enable Firebase Storage for your bucket by visiting the Storage tab in the Firebase Console and ensure that you have sufficient permission to properly provision resources."
      }
    

    What to do?

    Just Go to your project Firebase console >> Storage >> and Just Click GET STARTED

    0 讨论(0)
  • 2020-11-29 04:52

    This is due to a missing permission. You need to check whether you have

    firebase-storage@system.gserviceaccount.com

    as a member with a "Storage Admin" role. If you don't have one, then add it. That would fix the issue.

    Here's the step on how you can check and add permissions.

    • Go to Cloud console
    • Navigate to Storage
    • Select your bucket then click show info panel.

    You can also add the missing permission in the IAM & Admin if you want.

    0 讨论(0)
  • 2020-11-29 04:56

    In case, above solutions don't work. Check whether the given StorageInstanceURL is correct or not.

    0 讨论(0)
  • 2020-11-29 04:57

    I had the same problem. The solution consists in clicking on the Storage tag (left of firebase console) and then clicking on OK button to enable upload rules.

    0 讨论(0)
提交回复
热议问题