[Firestore] スタートアップ時に起こりやすいPermission Error 〜Database Rule編〜

Firebase Databaseを使い始めてしばらくしたら、以下のエラーでクエリできないようになった。

flutter: PlatformException(Error 7, FIRFirestoreErrorDomain, Missing or insufficient permissions.)


// This rule allows anyone on the internet to view, edit, and delete
// all data in your Firestore database. It is useful for getting
// started, but it is configured to expire after 30 days because it
// leaves your app open to attackers. At that time, all client
// requests to your Firestore database will be denied.
// Make sure to write security rules for your app before that time, or else
// your app will lose access to your Firestore database



allow read, write: if true;