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 firebae console)

E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE

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

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

FirebaseInstanceId Token retrieval failed SERVICE_NOT_AVAILABLE