FirebaseException "unable to resolve host" should be a FirebaseNetworkException
See original GitHub issueStep 2: Describe your environment
- Android Studio version: Android Studio Arctic Fox | 2020.3.1 Canary 2
- Firebase Component: Auth
- Component version: 20.0.0
Step 3: Describe the problem
getIdToken is passing this FirebaseException
to the failure listener of getIdToken
. The message clearly indicates it’s a network issue, it would be better if the exception were a FirebaseNetworkException
(I auto-retry on FirebaseNetworkException
)
Steps to reproduce:
Not sure, I got this stacktrace report via Sentry.
Relevant Code:
com.google.firebase.FirebaseException: An internal error has occurred. [ Unable to resolve host "securetoken.googleapis.com":No address associated with hostname ]
at com.google.firebase.auth.api.internal.zzem.zza(com.google.firebase:firebase-auth@@20.0.0:18)
at com.google.firebase.auth.api.internal.zzfx.zza(com.google.firebase:firebase-auth@@20.0.0:21)
at com.google.firebase.auth.api.internal.zzfq.zza(com.google.firebase:firebase-auth@@20.0.0:35)
at com.google.firebase.auth.api.internal.zzfs.zza(com.google.firebase:firebase-auth@@20.0.0:74)
at com.google.firebase.auth.api.internal.zzel.zza(com.google.firebase:firebase-auth@@20.0.0:61)
at com.google.firebase.auth.api.internal.zzc.zza(com.google.firebase:firebase-auth@@20.0.0:3)
at com.google.firebase.auth.api.internal.zzgb.zza(com.google.firebase:firebase-auth@@20.0.0:37)
at com.google.firebase.auth.api.internal.zzfn.zza(com.google.firebase:firebase-auth@@20.0.0:41)
at com.google.firebase.auth.api.internal.zza.zza(com.google.firebase:firebase-auth@@20.0.0:8)
at com.google.firebase.auth.api.internal.zzep.zza(com.google.firebase:firebase-auth@@20.0.0:76)
at com.google.firebase.auth.api.internal.zzbr.zza(com.google.firebase:firebase-auth@@20.0.0:24)
at com.google.firebase.auth.api.internal.zzbq.accept(Unknown Source:6)
at com.google.android.gms.common.api.internal.zacj.doExecute(com.google.android.gms:play-services-base@@17.1.0:2)
at com.google.android.gms.common.api.internal.zaf.zac(com.google.android.gms:play-services-base@@17.1.0:6)
at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zac(com.google.android.gms:play-services-base@@17.1.0:167)
at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zab(com.google.android.gms:play-services-base@@17.1.0:139)
at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zabg(com.google.android.gms:play-services-base@@17.1.0:99)
at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zabe(com.google.android.gms:play-services-base@@17.1.0:40)
at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.onConnected(com.google.android.gms:play-services-base@@17.1.0:19)
at com.google.android.gms.common.internal.zaf.onConnected(com.google.android.gms:play-services-base@@17.1.0:2)
at com.google.android.gms.common.internal.BaseGmsClient$zzg.zzj(com.google.android.gms:play-services-basement@@17.1.1:24)
at com.google.android.gms.common.internal.BaseGmsClient$zza.zza(com.google.android.gms:play-services-basement@@17.1.1:12)
at com.google.android.gms.common.internal.BaseGmsClient$zzb.zzo(com.google.android.gms:play-services-basement@@17.1.1:11)
at com.google.android.gms.common.internal.BaseGmsClient$zzc.handleMessage(com.google.android.gms:play-services-basement@@17.1.1:49)
at android.os.Handler.dispatchMessage(Handler.java:107)
at com.google.android.gms.internal.common.zzi.dispatchMessage(com.google.android.gms:play-services-basement@@17.1.1:8)
at android.os.Looper.loop(Looper.java:237)
at android.os.HandlerThread.run(HandlerThread.java:67)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:22 (9 by maintainers)
Top Results From Across the Web
Firebase Email and Password Registration on Flutter
FirebaseException: An internal error has occurred. [ Unable to resolve host "www.googleapis.com":No address associated with hostname ].
Read more >FirebaseNetworkException - Google
class FirebaseNetworkException : FirebaseException ... Exception thrown when a request to a Firebase service has failed due to a network error.
Read more >Firebase AuthUI - unable to resolve host “www.googleapis ...
I am building the Sign-in activity of my android app using Firebase's AuthUI. Everything works properly till I invoke a sign-in provider ...
Read more >All Strings | PDF | Database Index - Scribd
homes|honda|horse|host|hosting|hoteles|hotmail|house|how|hsbc|hyundai|h[kmnrtu])| ... Could not resolve the canonical path to the Realm file:
Read more >How to fix error "unable to resolve host" - YouTube
This always happens after host-name changed.To Fix Ubuntu sudo Error: unable to resolve host Add... ... Your browser can 't play this video....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve filed b/176825910 to track work on this internally - you’re right, this should be a network exception. I’m hoping that this will be a quick fix 😃
Hey there, I use anonym auth for all clients and I get a lot of App crashes: I’m on ‘com.google.firebase:firebase-auth:20.0.4’ but had that already in prev. releases as well. I need a valid token to communicate with my own backend, therefore all clients are at least anonymous logged in and authtoken is refreshed if outdated. My Crashfree rate dropped by about 0.5% because if this FibreaseNetworkExceptions that can’t be catched.
I don’t know what do do, tried already to only call it if the client has internet connection but still happens. I can’t understand why you send out an Exception that can be catched on something like an Internet connection on a Mobile SDK, seems to me like a totally wrong decission.
Fatal Exception: com.google.firebase.FirebaseNetworkException: A network error (such as timeout, interrupted connection or unreachable host) has occurred. at com.google.android.gms.internal.firebase-auth-api.zztt.zza(zztt.java:17) at com.google.android.gms.internal.firebase-auth-api.zzvb.zza(zzvb.java:9) at com.google.android.gms.internal.firebase-auth-api.zzvc.zzk(zzvc.java:1) at com.google.android.gms.internal.firebase-auth-api.zzuz.zzh(zzuz.java:25) at com.google.android.gms.internal.firebase-auth-api.zztq.zzk(zztq.java:1) at com.google.android.gms.internal.firebase-auth-api.zzpm.zza(zzpm.java:2) at com.google.android.gms.internal.firebase-auth-api.zzpl.zza(zzpl.java:1) at com.google.android.gms.internal.firebase-auth-api.zzvg.zza(zzvg.java:27) at com.google.android.gms.internal.firebase-auth-api.zzuq.zzh(zzuq.java:4) at com.google.android.gms.internal.firebase-auth-api.zzpm.zzb(zzpm.java:4) at com.google.android.gms.internal.firebase-auth-api.zzpy.zzM(zzpy.java:5) at com.google.android.gms.internal.firebase-auth-api.zzpy.zzD(zzpy.java:3) at com.google.android.gms.internal.firebase-auth-api.zztu.zzo(zztu.java:5) at com.google.android.gms.internal.firebase-auth-api.zzrv.accept(zzrv.java:4) at com.google.android.gms.common.api.internal.zacr.doExecute(zacr.java:1) at com.google.android.gms.common.api.internal.zag.zaf(zag.java:1) at com.google.android.gms.common.api.internal.zabl.zaG(zabl.java:2) at com.google.android.gms.common.api.internal.zabl.zaF(zabl.java:5) at com.google.android.gms.common.api.internal.zabl.zad(zabl.java:3) at com.google.android.gms.common.api.internal.GoogleApiManager.handleMessage(GoogleApiManager.java:64) at android.os.Handler.dispatchMessage(Handler.java:101) at android.os.Looper.loop(Looper.java:164) at android.os.HandlerThread.run(HandlerThread.java:65)