Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firebase Firestore中的组查询设置规则中存在问题(错误代码=权限被拒绝) 我是suresh,我正试图通过谷歌控制台设置firestore规则我在Flitter中使用组查询,但我得到了相同的错误_Firebase_Flutter_Google Cloud Firestore_Firebase Security - Fatal编程技术网

Firebase Firestore中的组查询设置规则中存在问题(错误代码=权限被拒绝) 我是suresh,我正试图通过谷歌控制台设置firestore规则我在Flitter中使用组查询,但我得到了相同的错误

Firebase Firestore中的组查询设置规则中存在问题(错误代码=权限被拒绝) 我是suresh,我正试图通过谷歌控制台设置firestore规则我在Flitter中使用组查询,但我得到了相同的错误,firebase,flutter,google-cloud-firestore,firebase-security,Firebase,Flutter,Google Cloud Firestore,Firebase Security,我有笔记(集合)->CSC(文档)->sem1(集合)->(文档)->subject1=“主题值(字段) | |->ECE(文档)->sem1(集合)->(文档)->subjectece=“主题的主题ECE的值”(字段) 我的错误: W/Firestore(16933): (22.1.2) [Firestore]: Listen for Query(target=Query( collectionGroup=Notes order by __name__);limitType=LIMIT

我有笔记(集合)->CSC(文档)->sem1(集合)->(文档)->subject1=“主题值(字段) | |->ECE(文档)->sem1(集合)->(文档)->subjectece=“主题的主题ECE的值”(字段)

我的错误:

W/Firestore(16933): (22.1.2) [Firestore]: Listen for Query(target=Query( collectionGroup=Notes order by __name__);limitType=LIMIT_TO_FIRST) failed: Status{code=PERMISSION_DENIED, description=Missing or insufficient permissions., cause=null}

E/flutter (16933): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: [cloud_firestore/permission-denied] The caller does not have permission to execute the specified operation.
E/flutter (16933):
我尝试对firestore规则进行了20多次更改,但都出现了相同的错误:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
   match /calculatorApp/{userId} {
      allow read :if request.auth != null&& request.auth.uid == userId;
      allow create: if request.auth != null;
      allow delete: if request.auth != null && request.auth.uid == userId;
        allow write:if request.auth != null && request.auth.uid == userId;
      allow  update:if request.auth != null &&request.auth.uid == userId;
    }

   match /{path=**}/Admin/{documents}{
      allow read, write: if false;

    } 
   match /{path=**}/subsettings/{subsettingsId}{
       allow read, write: if false;
    }
 match /{path=**}/notes/{notesId} {
      allow read, write: if false;

    } 
   match /{path=**}/sem1/{sem1Id} {
       allow read, write: if false;
    }
    

  }
}
我的颤振代码:

import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';

class Testdb extends StatefulWidget {
  @override
  _TestdbState createState() => _TestdbState();
}

class _TestdbState extends State<Testdb> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
          child: IconButton(
              icon: Icon(Icons.ac_unit),
              onPressed: () async {
                FirebaseFirestore.instance
                    .collectionGroup("Notes")
                    .snapshots()
                    .listen((value) => value.docs.forEach((element) {
                          print(" ELEMENT  ${element.id}");
                          print(" ELEMENT  ${element.data()}");
                   ;
                        }));
              })),
    );
  }
}
import'包:cloud_firestore/cloud_firestore.dart';
进口“包装:颤振/材料.省道”;
类Testdb扩展StatefulWidget{
@凌驾
_TestdbState createState()=>\u TestdbState();
}
类_TestdbState扩展状态{
@凌驾
小部件构建(构建上下文){
返回脚手架(
正文:中(
孩子:我的钮扣(
图标:图标(图标。空调单元),
onPressed:()异步{
FirebaseFirestore.instance
.collectionGroup(“票据”)
.快照()
.listen((value)=>value.docs.forEach((元素){
打印(“元素${ELEMENT.id}”);
打印(“元素${ELEMENT.data()}”);
;
}));
})),
);
}
}
伙计们,请帮忙我是刚开始学习的学生,也是firestore的新手 我在firestore的规定范围内有问题