简体   繁体   English

无法从 iOS 应用访问 Firebase 存储默认存储桶

[英]Can't Access Firebase Storage Default Bucket From iOS App

A few hours ago I was able to access my default storage bucket without any problems.几个小时前,我可以毫无问题地访问我的默认存储桶。 However, now I can't.然而,现在我不能。 I receive the following message:我收到以下消息:

Error Domain=FIRStorageErrorDomain Code=-13021 "User does not have permission to access gs://MY_BUCKET_NAME/data.json." UserInfo={object=data.json, ResponseBody={
  "error": {
    "code": 403,
    "message": "Permission denied. Could not perform this operation"
  }

Here's my bucket rules:这是我的桶规则:

rules_version = '2';
service firebase.storage {
    match /b/{bucket}/o {
        match /{allPaths=**} {
            allow read, write: if request.auth != null;
        }
    }
 }

I don't know what to do.我不知道该怎么办。 Can someone help?有人可以帮忙吗?

Note: I'm on the Blaze plan.注意:我正在使用 Blaze 计划。 firebase-storage@system.gserviceaccount.com is added to my default Firebase Storage bucket. firebase-storage@system.gserviceaccount.com 已添加到我的默认 Firebase 存储桶中。

Your rules require that a user be signed into your app in order to read or write any file in the bucket.您的规则要求用户登录您的应用程序才能读取或写入存储桶中的任何文件。 I would expect that the only reason why you would get that message is if there was no user signed in, or somehow you are trying to access a bucket that is not in the same project as the signed in user.我希望您收到该消息的唯一原因是没有用户登录,或者您试图访问与登录用户不在同一项目中的存储桶。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iOS Swift Firebase 存储错误“未找到默认存储桶” - iOS Swift Firebase Storage error “No default Storage bucket found” IOS Swift SwiftUI Firebase “未找到默认存储桶。 您是否正确配置了 Firebase 存储?” - IOS Swift SwiftUI Firebase “No default Storage bucket found. Did you configure Firebase Storage properly?” 限制对 Firebase 存储的访问,以便只有我的应用可以访问它 - Restrict access to Firebase storage so only my app can access it 如何以编程方式将现有 GCP 存储桶集成/访问到 Firebase Swift 应用程序? - How To Integrate/Access Existing GCP Storage Bucket To Firebase Swift App Programmatically? 如何从 Firebase Storage 下载 USDZ 模型并将它们加载到我的 iOS 应用上的 ARQuickLook 中? - How can I download USDZ models from Firebase Storage and load them into ARQuickLook on my iOS app? Firebase存储:child()不适用于iOS App - Firebase Storage: child() doesn't work with iOS App 无法在 IOS 上使用 firebase 运行 flutter 应用程序 - Can't run flutter app with firebase on IOS 无法使用 Firebase 在 iOS 应用程序中安装 pod - Can't install pod in iOS app with Firebase 无法从应用商店访问ios中的任何Web服务 - Can't access any web service in ios from app store 无法将视频上传到 iOS 上的 Firebase 存储 13 - Can't Upload Video to Firebase Storage on iOS 13
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM