安卓11配置谷歌FCM推送报错

2020-12-11 11:57:50.872 15404-15464/com.sp.notify E/FirebaseInstanceId: Failed to get FIS auth token
    java.util.concurrent.ExecutionException: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
        at com.google.android.gms.tasks.Tasks.zzb(Unknown Source:61)
        at com.google.android.gms.tasks.Tasks.await(Unknown Source:23)
        at com.google.firebase.iid.GmsRpc.setDefaultAttributesToBundle(com.google.firebase:firebase-iid@@21.0.0:55)
        at com.google.firebase.iid.GmsRpc.startRpc(com.google.firebase:firebase-iid@@21.0.0:37)
        at com.google.firebase.iid.GmsRpc.getToken(com.google.firebase:firebase-iid@@21.0.0:13)
        at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$1$FirebaseInstanceId(com.google.firebase:firebase-iid@@21.0.0:158)
        at com.google.firebase.iid.FirebaseInstanceId$$Lambda$3.start(Unknown Source:8)
        at com.google.firebase.iid.RequestDeduplicator.getOrStartGetTokenRequest(com.google.firebase:firebase-iid@@21.0.0:14)
        at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$2$FirebaseInstanceId(com.google.firebase:firebase-iid@@21.0.0:157)
        at com.google.firebase.iid.FirebaseInstanceId$$Lambda$0.then(Unknown Source:6)
        at com.google.android.gms.tasks.zzf.run(Unknown Source:2)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at com.google.android.gms.common.util.concurrent.zza.run(Unknown Source:6)
        at java.lang.Thread.run(Thread.java:923)
     Caused by: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
        at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.createFirebaseInstallation(FirebaseInstallationServiceClient.java:200)
        at com.google.firebase.installations.FirebaseInstallations.registerFidWithServer(FirebaseInstallations.java:490)
        at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:361)
        at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:351)
        at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:923) 

  

这个异常错误主要是firebase 没法联网导致的,解决办法:连上外网就可以解决了!

posted @ 2020-12-11 12:00  SuPair  阅读(2279)  评论(0编辑  收藏  举报