question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IOException: SERVICE_NOT_AVAILABLE, FIS_AUTH_ERROR

See original GitHub issue

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow with the firebase tag.
  • For general Firebase discussion, use the firebase-talk google group.
  • For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 4.1.3
  • Firebase Component: Analytics, Crashlytics, RemoteConfig, Functions, Firestore, Performance, AppIndexing, Cloud Messaging, Auth, InApp messaging
  • Component version: 27.1.0 (bom)

[REQUIRED] Step 3: Describe the problem

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 https://stackoverflow.com/questions/60698622/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.

What happened? How can we make the problem occur? This could be a description, log/console output, etc.

Relevant Code:

Stack traces:

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)



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)

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>

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:12
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
paulsUsernamecommented, Jul 21, 2021

Is there any more word on this. Im getting warnings on the Google Play Console that it could affect our ranking. There is no restrictions on our Android API key, so I can’t understand where it is coming from. The app otherwise works perfectly, for sign-in, cloud message etc.

2reactions
0kingcommented, May 7, 2021

Hi @aguatno there’s only one API key (which is unrestricted). From what I could gather from Crashlytics and analytics, I would also like to mention that

  1. this crash apparently occurs sometimes for a user, does not affect him always
  2. Of all users affected, 98% seem to be in NotLoggedIn state (we use Firebase auth)
  3. 91% time app is in foreground
Read more comments on GitHub >

github_iconTop Results From Across the Web

SERVICE_NOT_AVAILABLE, FIS_AUTH_ERROR in Firebase ...
The crashlytics dashboard shows many devices (all OS versions, various OEMs) are facing this IOException (either SERVICE_NOT_AVAILABLE or ...
Read more >
(FIXED) "[messaging/unknown] The operation couldn't be ...
NativeFirebaseError: [messaging/unknown] SERVICE_NOT_AVAILABLE. As soon as I try to get the token on Android.
Read more >
Java.Io.Ioexception: Authentication_Failed In Android ...
IOException : FIS_AUTH_ERROR in Android Firebase - Stack informational page, ... getting SERVICE_NOT_AVAILABLE errors when calling FirebaseInstanceId.
Read more >
firebasemessaging: failed to get fis auth token - You.com
IOException : FIS_AUTH_ERROR] FirebaseMessaging: Failed to get FIS auth token FirebaseMessaging: java.util.concurrent.ExecutionException: com.google.firebase.
Read more >
java.io.IOException: FIS_AUTH_ERROR in Android Firebase
Android : java.io. IOException : FIS_AUTH_ERROR in Android Firebase [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found