permission-denied
ماذا يعني خطأ Firebase (خدمات Google) هذا
كيف يظهر
FirebaseError: [code=permission-denied]: Missing or insufficient permissions.
ماذا يعني
The caller does not have permission to run this read or write. For apps that use the client SDK, that decision comes from the project's Firestore Security Rules.
السبب المعتاد في تطبيق مبني بالذكاء الاصطناعي
The rules let users read only their own documents, but the AI-generated query asks for the whole collection. Security rules are not filters, so the whole query is refused even though some documents would be allowed.
افحص هذا أولًا
Open the Rules tab of Firestore in the Firebase console and compare the rule for this collection with the exact query your code runs, including its where filters.