When my application starts, I check the current user\'s details in my Firebase database (I\'m storing it\'s uid for that).
I\'m attaching addListenerForSingleValueEv
I've been having the same problem for days and I finally fixed it.
Looks like my Api key was changed! And that's what was preventing addListenerForSingleValueEvent()
from returning!
Go to Firebase Console, open your project, click the settings icon and go to Project settings. There you'll see Web API Key
. Take that and copy it to your google-services.json
file in your project's directory. Here's a snippet from that file:
...
],
"api_key": [
{
"current_key": ""
}
],
...
That's it. After replacing the value of "current_key" with the key from Firebase, it returned to work (previously it had some other key I think I generated at Google Console and it worked for months. Just a few days ago it stopped working)