我已经设置了一个新的Firestore环境,当我试图通过云函数上传并读取存储中的数据时,我会得到以下错误:
project_id@appspot.gserviceaccount.com does not have storage.objects.get access to the Google Cloud Storage object。
我已经在线查看过了,在谷歌云控制台中,我已经将Storage Admin的IAM权限添加到了这个服务帐户中,但是我仍然收到了同样的错误。
以前有人有过这个问题吗?我也尝试过将Owner角色赋予服务帐户,但仍然会出现相同的错误。
我正在处理的Firebase项目已被删除,并创建了一个新项目。我现在需要使用新项目的凭据,我已经这样做了。我从google云控制台生成了一个新的服务帐户密钥,并用新的服务帐户密钥替换了旧的服务帐户密钥。我也将数据库( URL )替换为新项目的URL。我用新项目更新了我的.firebaserc文件。尽管如此,我还是得到了错误:
FIREBASE WARNING: Provided authentication credentials for the app named "[DEFAULT]" are invalid. This usually indicates your app
用例
我使用Firebase JS SDK从浏览器访问,这样我就可以将UI日志和错误推送到Firestore中。
问题
直到我意外地在API& Services→凭据中删除了Google平台中的大多数服务帐户之前,一切都很顺利。
下面是我们为Firebase Web App使用的示例Config:
<script src="https://www.gstatic.com/firebasejs/7.13.1/firebase-app.js"></script>
<script>
// Your web app's Fir
操作系统: Mac OS Catalina v10.15.1 Python版本: Python 3.7.1 我正在用Python编写一个Cloud Functions,它由对Firestore数据库的写入/更新等触发。在我的main.py中,我的函数看起来就像这样 def hello_firestore(data, context):
""" Triggered by a change to a Firestore document.
Args:
data (dict): The event payload.
conte