FirebaseMessaging: Fetching FCM registration token failed java.io.IOException: SERVICE_NOT_AVAILABLE
The device couldn't register with Firebase Cloud Messaging.
Fetching FCM registration token failedSERVICE_NOT_AVAILABLE FCMFirebaseMessaging token failedW/FirebaseMessaging: Fetching FCM registration token failed java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: SERVICE_NOT_AVAILABLE Meaning
SERVICE_NOT_AVAILABLE is usually network or Google Play services trouble. Retry with backoff; on emulators use a Google Play image and check the date/time.
Common causes
- No network or blocked FCM
- Play services missing/outdated
- Wrong google-services.json
⚡ Quick fix
- Retry with backoff
- Use an emulator image with Google Play
- Verify google-services.json package name
Detailed fix by platform
Kotlin
FirebaseMessaging.getInstance().token.addOnCompleteListener { if (!it.isSuccessful) Log.w("FCM", "failed", it.exception) }
How to diagnose
- Network — online?
- Play services — present?
- Config — matches package?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Android
- Could not resolve Gradle: Could not resolve all files for configuration / Could not resolve dependency
- INSTALL_FAILED_USER_RESTRICTED INSTALL_FAILED_USER_RESTRICTED: Install canceled by user (Xiaomi/MIUI, Oppo, Vivo)
- INSTALL_PARSE_FAILED_NO_CERTIFICATES INSTALL_PARSE_FAILED_NO_CERTIFICATES / App not installed as package appears to be invalid
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 25 Nov 2026