使用
Firebase.ui.auth 和 Google 登录登录我的应用时,由于该错误也无法从 Firestore 获取数据时,也会发生此错误。
2019-06-22 22:16:57.237 6793-6793/meter.meterE/AuthUI: A sign-in error occurred.
com.firebase.ui.auth.FirebaseUiException: Error when saving credential.
at com.firebase.ui.auth.viewmodel.smartlock.SmartLockHandler$1.onComplete(SmartLockHandler.java:98)
at com.google.android.gms.tasks.zzj.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: com.google.android.gms.common.api.ApiException: 6: Passphrase required.
at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(Unknown Source:4)
at com.google.android.gms.common.internal.zai.zaf(Unknown Source:2)
at com.google.android.gms.common.internal.zaj.onComplete(Unknown Source:6)
at com.google.android.gms.common.api.internal.BasePendingResult.zaa(Unknown Source:172)
at com.google.android.gms.common.api.internal.BasePendingResult.setResult(Unknown Source:131)
at com.google.android.gms.common.api.internal.BaseImplementation$ApiMethodImpl.setResult(Unknown Source:36)
at com.google.android.gms.internal.auth-api.zzo.zzc(Unknown Source:4)
at com.google.android.gms.internal.auth-api.zzv.dispatchTransaction(Unknown Source:9)
at com.google.android.gms.internal.auth-api.zzd.onTransact(Unknown Source:12)
at android.os.Binder.execTransact(Binder.java:731)
当您在Google帐户上的密码受到密码保护时,就会发生这种情况。我认为这应该是一个ResolvableApiException
,但他们没有努力为这种情况进行编码分辨率处理。因此,您必须接受这样一个事实,即拥有密码的用户将无法从智能锁中受益。为了进行测试,您可以重置密码。请参阅说明:https://support.google.com/chrome/answer/165139