flutter应用突然可以从firestore获取数据,状态{code = cermission_denied,description =丢失或权限不足。
我一直在寻找与此有关的许多问题,但我仍然没有找到解决方案 错误说
访问隐藏方法ldalvik/system/closeguard; - > warnifopen()
[writestream]:(26986c6)流以状态关闭:status {code = codermission_denied,description =丢失或不足的权限。
[firestore]:在用户/rx5lrztkdddw1c8ribqynshligjv2上写入失败:status {code = obermission_denied,description =丢失或不足的权限。
[错误:flutter/lib/ui/ui_dart_state.cc(209)]未经手的例外:[cloud_firestore/clibrise-clibersion-diendied]呼叫者无权执行指定的操作。
而且,我试图将控制台中的Firebase Firestore规则更改为这样
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
,之后仍然没有影响任何事情。通常,我仍然可以将数据获取到列表中,并在没有用户登录的情况下在GridView中显示。但是现在,即使我记录用户,它仍然没有给我任何数据。一直在检查我的飞镖代码,但没有发现任何可疑的东西。试图卸载并将其安装回。不,也没有工作。
I've been searching for a lot of problems that relate to this but I still didn't find the solution
the error says
Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (greylist,core-platform-api, linking, allowed)
[WriteStream]: (26986c6) Stream closed with status: Status{code=PERMISSION_DENIED, description=Missing or insufficient permissions., cause=null}.
[Firestore]: Write failed at users/rX5LRztKddW1c8RIBqyNShligJV2: Status{code=PERMISSION_DENIED, description=Missing or insufficient permissions., cause=null}
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: [cloud_firestore/permission-denied] The caller does not have permission to execute the specified operation.
and I've tried to change the firebase firestore rules in my console to be like this
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
and after that still didn't affect anything. Usually I still can fetch data into a list and show in a gridview without having a user login. but now even when I log the user in it still didn't give me any of the data. been checking my dart code too and didn't find anything suspicious. tried to uninstall and install it back. nope, didnt works too.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我通过在Firebase控制台上未强制执行应用程序来解决问题。通过这样做,
但就我而言,它仍然行不通。我尝试将flutter应用程序与firebase控制台断开连接,并创建一个新的,而无需连接应用程序检查功能,现在它正常工作
I Resolve the problem by Un-enforced the app check on the firebase console. by doing this
but in my case it still won't work. and i try to disconnect the flutter app with the firebase console and create a new one without connecting the app-check feature, and it work properly now
你是这样尝试的
还是
Did you try like this
or