Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FirebaseInstanceId Token retrieval failed SERVICE_NOT_AVAILABLE

I'm working on an android app, it uses Firebase Authentication, Database and Storage. It was all working fine until this error message started to show up in logcat. (I did not tamper with any configs at firebase console)

E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE

this error message shows even when I have commented on all firebase-related code.

Therefore I'm unable to proceed with authentication and other firebase-related stuff.
Yes, I'm connected to the internet and also have gotten a new Google-Services.json file from Firebase Console but it has made no difference at all.

like image 260
Masroor Avatar asked Apr 20 '18 21:04

Masroor


3 Answers

"Cold Boot Now" Device in AVD Manager worked for me.

Edit: After updating emulators and than doing the cold boot it helped. – parohy Apr 5 at 9:22

like image 156
Manuel Mühlemann Avatar answered Oct 18 '22 05:10

Manuel Mühlemann


Stop emulator device and open AVD Manager Panel, edit device configuration. In device configuration panel "Show Advanced Settings" in "Emulated Performance" section select "Cold boot" option as Boot Option then click Finish, it should be worked.

enter image description here

like image 28
cowboycb Avatar answered Oct 18 '22 06:10

cowboycb


I also faced with this issue. As I can see it can happen for many reasons.

Finally I figured out that my problem was that the current latest Facebook Android SDK version (v4.36.0) has a bug. Everything works fine if I set it back to v4.35.0. Maybe this info can help someone in the future.

You can find here the releases: https://github.com/facebook/facebook-android-sdk/releases

like image 21
gabhor Avatar answered Oct 18 '22 05:10

gabhor