I want to get data from Firebase but I get this Error from App
Error [cloud_firestore/permission denied] the caller does not have permission to execute the specified operation
W/DynamiteModule(32609): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found. I/DynamiteModule(32609): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0 W/ProviderInstaller(32609): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0. W/System (32609): ClassLoader referenced unknown path: /system/priv-app/PrebuiltGmsCore/lib/x86 D/ApplicationLoaders(32609): ignored Vulkan layer search path /system/priv-app/PrebuiltGmsCore/lib/x86:/system/priv-app/PrebuiltGmsCore/PrebuiltGmsCore.apk!/lib/x86:/system/lib:/vendor/lib for namespace 0xeceec0d0 2 W/System (32609): ClassLoader referenced unknown path: /system/priv-app/PrebuiltGmsCore/lib/x86 V/NativeCrypto(32609): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 294 native methods... D/NetworkSecurityConfig(32609): No Network Security Config specified, using platform default I/ProviderInstaller(32609): Installed default security provider GmsCore_OpenSSL W/art (32609): Before Android 4.1, method double java.util.concurrent.ThreadLocalRandom.internalNextDouble(double, double) would have incorrectly overridden the package-private method in java.util.Random W/art (32609): Before Android 4.1, method int java.util.concurrent.ThreadLocalRandom.internalNextInt(int, int) would have incorrectly overridden the package-private method in java.util.Random W/art (32609): Before Android 4.1, method long java.util.concurrent.ThreadLocalRandom.internalNextLong(long, long) would have incorrectly overridden the package-private method in java.util.Random W/Firestore(32609): (24.4.0) [Firestore]: Listen for Query(target=Query(product order by name);limitType=LIMIT_TO_FIRST) failed: Status{code=PERMISSION_DENIED, description=Missing or insufficient permissions., cause=null} I/art (32609): Do partial code cache collection, code=13KB, data=30KB I/art (32609): After code cache collection, code=13KB, data=30KB I/art (32609): Increasing code cache capacity to 128KB W/Firestore(32609): (24.4.0) [Firestore]: Listen for Query(target=Query(product order by name);limitType=LIMIT_TO_FIRST) failed: Status{code=PERMISSION_DENIED, description=Missing or insufficient permissions., cause=null} W/Firestore(32609): (24.4.0) [WatchStream]: (831f7a9) Stream closed with status: Status{code=CANCELLED, description=Disconnecting idle stream. Timed out waiting for new targets., cause=null}.
this is my code
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:store/widgets/custonActionBar.dart';
class MainHome extends StatelessWidget {
MainHome({super.key});
final Stream<QuerySnapshot> _product =
FirebaseFirestore.instance.collection('product').snapshots();
@override
Widget build(BuildContext context) {
return Container(
child: Stack(
children: [
StreamBuilder(
stream: _product,
builder:
(BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot) {
// if the connection has error
if (snapshot.hasError) {
return Center(child: Text("Error ${snapshot.error})"));
}
// if connection was Loading
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(
child: CircularProgressIndicator(),
);
}
return Center(
child: Container(
child: Text('ProductName : shoes'),
));
}),
custonActioBar("Home", "0")
],
));
}
}
I check my connection from firebase its fine