2
votes

Firebase stops connecting to the database and working after about an hour. If I log out and back in, it works fine though. This is using Google and Facebook login (currently Facebook).

I have logging on, and after about an hour, this came up:

W/PersistentConnection: pc_0 - Provided authentication credentials are invalid. This usually indicates your FirebaseApp instance was not initialized correctly. Make sure your google-services.json file has the correct firebase_url and api_key. You can re-download google-services.json from https://console.firebase.google.com/.

I've replaced the google-services.json multiple times, and the issue still persists.

Manually refreshing token with getToken() after logging in causes the above message also (skips the one hour wait for it to try and refresh automatically).

Setting Firebase Database rules to public still does not allow the app to see anything.

1
Did you find any solution on this? I am facing the same issue. - Shruti

1 Answers

0
votes

Seems that clearing all Google Play services storage solves the problem Settings => Apps => Google Play services => Storage => MANAGE STORAGE => CLEAR ALL DATA, this issue probably needs to be fixed by Firebase or Google.