0
votes

After doing some searching, it seems the docs are a bit out of date with firebase's realtime database rules. As default for me they are set as:

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

And when I do a simple write:

var databaseRef = firebase.database().ref();

databaseRef.child("Comments").set("Test")

It tells me: PERMISSION_DENIED. I'm assuming this is because of my rules. I tried changing it to:

allow read, write: if true;

But that changed nothing. Any help would be greatly appreciated

2
Did you publish your rules before trying again? - Doug Stevenson
Yeah I did... Nothing happened - Ibrahim Fadel

2 Answers

0
votes

Simple fix, it turns out i had to switch from the cloud firestore menu to the realtime database...

0
votes

It is because your code or page is for Firestore there are 2 type of database in Firebase

  1. Realtime Database
  2. Firestore Database

Kindly specify the right database for you