Socialcademy 2: Fetching and Updating Data - Can't connect to Firebase

I can’t connect to my database. I followed all the steps and I even had to recreate it. Anyone had any similar issues or know how to resolve this?

2023-01-28 14:01:09.944917-0600 Socialcademy[18298:5617783] 10.5.0 - [FirebaseFirestore][I-FST000001] Write at posts/28617F89-5600-4E0B-9963-F52868E00FB9 failed: Missing or insufficient permissions.
[NewPostForm] Cannot create post: Error Domain=FIRFirestoreErrorDomain Code=7 "Missing or insufficient permissions." UserInfo={NSLocalizedDescription=Missing or insufficient permissions.}

These are the other error messages in the console above.

2023-01-28 14:00:55.393987-0600 Socialcademy[18298:5616856] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2023-01-28 14:00:55.394271-0600 Socialcademy[18298:5616856] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2023-01-28 14:00:55.397519-0600 Socialcademy[18298:5616856] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2023-01-28 14:01:00.551653-0600 Socialcademy[18298:5616856] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2023-01-28 14:01:09.941788-0600 Socialcademy[18298:5617783] 10.5.0 - [FirebaseFirestore][I-FST000001] WriteStream (132d74508) Stream error: 'Permission denied: Missing or insufficient permissions.'

I had the same problem and found a solution:
Go to the Firebase Console, then to the Firestore Database of your project.
There click on the Tab “Rules”, change the rule to the following and publish ist:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}

I found this solution here:

3 Likes

I was having the same problem as you two, and this fixed it for me. Thank you!