com.google.firebase.FirebaseNetworkException: A network error (such as timeout, interrupted connection or unreachable host)

[REQUIRED] Step 3: Describe the problem

Firebase network exception is showing in craslytics, not able to reproduce this error.

Exception: java.util.concurrent.ExecutionException: com.google.firebase.FirebaseNetworkException: A network error (such as timeout, interrupted connection or unreachable host) has occurred.
at com.google.android.gms.tasks.Tasks.zzb(Unknown Source:61)
at com.google.android.gms.tasks.Tasks.await(Unknown Source:23)
at com.xxxx.android.authentication.Firebase.getAuthDetail(SignInActivity.kt:40)
at com.xxx.android.webview.WebViewActivity.getToken(WebViewActivity.kt:1150)
at com.xxx.android.webview.WebAppInterface.getToken(WebAppInterface.kt:320)
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next(MessageQueue.java:326)
at android.os.Looper.loop(Looper.java:160)
at android.os.HandlerThread.run(HandlerThread.java:65)

Caused by com.google.firebase.FirebaseNetworkException: A network error (such as timeout, interrupted connection or unreachable host) has occurred.
at com.google.firebase.auth.api.internal.zzds.zzb(Unknown Source:15)
at com.google.firebase.auth.api.internal.zzew.zza(Unknown Source:11)
at com.google.firebase.auth.api.internal.zzeo.zzc(Unknown Source:33)
at com.google.firebase.auth.api.internal.zzep.onFailure(Unknown Source:49)
at com.google.firebase.auth.api.internal.zzdy.dispatchTransaction(Unknown Source:18)
at com.google.android.gms.internal.firebase_auth.zzb.onTransact(Unknown Source:12)
at android.os.Binder.execTransact(Binder.java:752)

1 possible answer(s) on “com.google.firebase.FirebaseNetworkException: A network error (such as timeout, interrupted connection or unreachable host)

  1. Same error. I really have no idea how to fix this. The error occurs most often on Xiaomi devices.
    Approximate steps to reproduce:

    1. Integrate google sign in and firebase auth (https://firebase.google.com/docs/auth/android/google-signin?authuser=0)
    2. Every time app launch get google credentials -> sign in to firebase -> get firebase id token (https://firebase.google.com/docs/auth/admin/verify-id-tokens)
    3. Everything works fine, but in a few weeks this error occurs
      Clear cache, clear data and reinstall app doesn’t helps.
      firebase auth version 16.0.4 (the same on 17.0.0)
      play services auth version 16.0.1