Error: Client doesn't have permission to access the desired data

Viewed 5301

I've been working on this for perhaps a day but I can't get it to work at all. I set up a database with no security rules:

enter image description here

Then I try to access it in my angular fire app:

this.afDatabase
    .object("/test/test")
    .snapshotChanges()
    .subscribe(x => {
        console.log(x);
    });

But I still get the following permission errors:

Error: permission_denied at /test/test: Client doesn't have permission to access the desired data.

I also ran the simulator and got successful results:

enter image description here

I also set up my environment.ts file:

enter image description here

Am I doing something wrong?

1 Answers

This is an issue on firebase side. You need to update Real-time database rules:

"rules": {
    ".read": true,
    ".write": true
  }
Related