Warning in the console about permission denied (Firebase)

It happens because you are not authorized to the Database.
You have a listener attached to a location where it doesn't have permission.

Check the Rules Tab in the Realtime database

If it's

{
  "rules": {
    ".read": "auth != null",
    ".write":"auth != null"
  }
}

This means that only authorized user's can write and read the Data.

Changing to

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

Allows anyone to read/write the Database.
Of course it is (usually) not a valid rule for a production environment but it is useful to check your issue.


That means that the listener is attached to a location where it doesn't have permission.

You can also safely ignore the logging, since you're not likely to care about the data anymore.

But if you prefer a clean log: to prevent the logging make sure that you unregister your observers before signing out. To do this, call removeObserver(withHandle:...) or (maybe easier in this case) removeAllObservers.


Please lookup image and follow these steps. If you are beginner and facing problem in image. I make little video about error.

Video Solution : https://youtu.be/fZrOkCqQpTc

Image Solution :