4

The crashlytics dashboard shows many devices (all OS versions, various OEMs) are facing this IOException (either SERVICE_NOT_AVAILABLE or FIS_AUTH_ERROR). I am having a hard time figuring out the issue for many days.

Steps to reproduce: I am unable to reproduce this error. Also, gone through all stackoverflow / github posts. Also, have gone through this recent link java.io.IOException: FIS_AUTH_ERROR in Android Firebase And updated my google-services.json file (as it had changed). But that did not help. Still getting these crashes.

Describe your environment:-

Android Studio version: 4.1.3

Firebase Components used: 
Analytics, 
Crashlytics, 
RemoteConfig, 
Functions, 
Firestore, 
Performance, 
AppIndexing, 
Cloud Messaging, 
Auth, 
InApp messaging

Component version: 27.1.0 (bom)

Stack traces:

Fatal Exception: java.io.IOException: SERVICE_NOT_AVAILABLE
   at com.google.firebase.iid.GmsRpc.handleResponse(com.google.firebase:firebase-iid@@21.1.0:7)
   at com.google.firebase.iid.GmsRpc.lambda$extractResponseWhenComplete$0$GmsRpc(com.google.firebase:firebase-iid@@21.1.0:1)
   at com.google.firebase.iid.GmsRpc$$Lambda$0.then(:2)
   at com.google.android.gms.tasks.zze.run(com.google.android.gms:play-services-tasks@@17.2.0:5)
   at com.google.firebase.iid.FirebaseIidExecutors$$Lambda$0.execute()
   at com.google.android.gms.tasks.zzc.zza(com.google.android.gms:play-services-tasks@@17.2.0:6)
   at com.google.android.gms.tasks.zzq.zza(com.google.android.gms:play-services-tasks@@17.2.0:19)
   at com.google.android.gms.tasks.zzu.zza(com.google.android.gms:play-services-tasks@@17.2.0:104)
   at com.google.android.gms.tasks.zze.run(com.google.android.gms:play-services-tasks@@17.2.0:15)
   at com.google.android.gms.cloudmessaging.zzz.execute()
   at com.google.android.gms.tasks.zzc.zza(com.google.android.gms:play-services-tasks@@17.2.0:6)
   at com.google.android.gms.tasks.zzq.zza(com.google.android.gms:play-services-tasks@@17.2.0:19)
   at com.google.android.gms.tasks.zzu.zza(com.google.android.gms:play-services-tasks@@17.2.0:104)
   at com.google.android.gms.tasks.TaskCompletionSource.setResult(com.google.android.gms:play-services-tasks@@17.2.0:8)
   at com.google.android.gms.cloudmessaging.zzq.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:9)
   at com.google.android.gms.cloudmessaging.zzs.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:7)
   at com.google.android.gms.cloudmessaging.zzf.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:45)
   at com.google.android.gms.cloudmessaging.zzi.handleMessage(:2)
   at android.os.Handler.dispatchMessage(Handler.java:103)
   at android.os.Looper.loop(Looper.java:237)
   at android.app.ActivityThread.main(ActivityThread.java:8019)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)

Fatal Exception: java.io.IOException: FIS_AUTH_ERROR
   at com.google.firebase.iid.GmsRpc.handleResponse(com.google.firebase:firebase-iid@@21.1.0:7)
   at com.google.firebase.iid.GmsRpc.lambda$extractResponseWhenComplete$0$GmsRpc(com.google.firebase:firebase-iid@@21.1.0:1)
   at com.google.firebase.iid.GmsRpc$$Lambda$0.then(:2)
   at com.google.android.gms.tasks.zze.run(com.google.android.gms:play-services-tasks@@17.2.0:5)
   at com.google.firebase.iid.FirebaseIidExecutors$$Lambda$0.execute()
   at com.google.android.gms.tasks.zzc.zza(com.google.android.gms:play-services-tasks@@17.2.0:6)
   at com.google.android.gms.tasks.zzq.zza(com.google.android.gms:play-services-tasks@@17.2.0:19)
   at com.google.android.gms.tasks.zzu.zza(com.google.android.gms:play-services-tasks@@17.2.0:104)
   at com.google.android.gms.tasks.zze.run(com.google.android.gms:play-services-tasks@@17.2.0:15)
   at com.google.android.gms.cloudmessaging.zzz.execute()
   at com.google.android.gms.tasks.zzc.zza(com.google.android.gms:play-services-tasks@@17.2.0:6)
   at com.google.android.gms.tasks.zzq.zza(com.google.android.gms:play-services-tasks@@17.2.0:19)
   at com.google.android.gms.tasks.zzu.zza(com.google.android.gms:play-services-tasks@@17.2.0:104)
   at com.google.android.gms.tasks.TaskCompletionSource.setResult(com.google.android.gms:play-services-tasks@@17.2.0:8)
   at com.google.android.gms.cloudmessaging.zzq.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:9)
   at com.google.android.gms.cloudmessaging.zzs.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:7)
   at com.google.android.gms.cloudmessaging.zzf.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:45)
   at com.google.android.gms.cloudmessaging.zzi.handleMessage(:2)
   at android.os.Handler.dispatchMessage(Handler.java:103)
   at android.os.Looper.loop(Looper.java:230)
   at android.app.ActivityThread.main(ActivityThread.java:7876)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:526)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)

Firebase dependencies:-

    implementation platform('com.google.firebase:firebase-bom:27.1.0')
    implementation 'com.google.firebase:firebase-appindexing'
    implementation 'com.google.firebase:firebase-messaging-ktx'
    implementation 'com.google.firebase:firebase-auth-ktx'
    implementation 'com.google.firebase:firebase-firestore'
    implementation 'com.google.firebase:firebase-perf'
    implementation 'com.google.firebase:firebase-inappmessaging-display'
    implementation 'com.google.firebase:firebase-functions'
    implementation 'com.google.firebase:firebase-config'
    implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'com.google.firebase:firebase-crashlytics'

    implementation 'com.google.android.play:core:1.8.0'
    implementation 'com.google.android.gms:play-services-ads:16.0.0'
    implementation 'com.google.android.gms:play-services-gcm:17.0.0'

..... many other dependencies ....

Plugins:-

classpath 'com.google.gms:google-services:4.3.5'
classpath 'com.google.firebase:perf-plugin:1.3.5'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.2'
.... other plugins

My cloud messaging service in manifest:

<service 
android:name=".notification.MyFirebaseMessagingService">
<intent-filter>
    <action android:name="com.google.firebase.MESSAGING_EVENT" />
 </intent-filter>
</service>

rdx
  • 87
  • 3
  • 10
  • Having the exact same issue. Thousands of crashes, all in the background though. – paul_f Jun 27 '21 at 18:51
  • Got this error while debugging after forcing ipv6 usage (from apn protocol), if that can help you :) – Yushox Sep 15 '21 at 15:24
  • 1
    The `SERVICE_NOT_AVAILABLE` error could be to Google Play Services not installed or disabled. Keep in mind that newer Huawei phones dont have them (nor Play Store) installed due to USA-CHINA trade sanctions. Not sure about the `FIS_AUTH_ERROR`. You can check availability with `GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS;` – TreyWurm Sep 17 '21 at 11:31
  • Nowadays, we are not receiving these errors, they stopped without us taking any step further. However, we are now receiving a new kind of error in some devices: `FirebaseInstallationsException (Firebase Installations Service is unavailable)`, which occurs when accessing the `FirebaseRemoteConfig` instance. We have not made any updates or changes in app's any firebase config. This is in production and includes all kinds of OEMs (Samsung, xiaomi, LG, etc). – rdx Sep 17 '21 at 15:12

0 Answers0