com.firebase.ui.auth.FirebaseUiException: Error when saving credential - android

This error occurs when signing in to my app using Firebase.ui.auth and google sign-in, unable to get data from firestore too because of the error.
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)

This happens when your passwords on Google account are protected with a passphrase. I think this should be a ResolvableApiException, but they did not put an effort into coding resolution handling for the situation. So you have to live with the fact that users with passphrases will not be able to benefit from Smart Lock. For testing, you can reset your passphrase. See instructions: https://support.google.com/chrome/answer/165139

Related

on android Java, I am using firebase auth and UI

I was working fine for the last 1 year, but now if I logging with an id that is logged in on some other device then it gives me the following error
A sign-in error occurred.
com.firebase.ui.auth.FirebaseUiException: Error when saving credential.
at com.firebase.ui.auth.viewmodel.smartlock.SmartLockHandler.lambda$saveCredentials$0$SmartLockHandler(SmartLockHandler.java:97)
at com.firebase.ui.auth.viewmodel.smartlock.-$$Lambda$SmartLockHandler$pN6hZnWoFDaT_06xqjJRcsW8NkU.onComplete(Unknown Source:2)
at com.google.android.gms.tasks.zzj.run(com.google.android.gms:play-services-tasks##17.2.0:4)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: com.google.android.gms.common.api.ApiException: 16: Cannot find an eligible account.
at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(com.google.android.gms:play-services-base##17.5.0:4)
at com.google.android.gms.common.internal.zap.zaa(com.google.android.gms:play-services-base##17.5.0:2)
at com.google.android.gms.common.internal.zar.onComplete(com.google.android.gms:play-services-base##17.5.0:6)
at com.google.android.gms.common.api.internal.BasePendingResult.zab(com.google.android.gms:play-services-base##17.5.0:177)
at com.google.android.gms.common.api.internal.BasePendingResult.setResult(com.google.android.gms:play-services-base##17.5.0:136)
at com.google.android.gms.internal.auth-api.zzo.setResult(com.google.android.gms:play-services-auth##19.0.0:6)
at com.google.android.gms.internal.auth-api.zzp.zzd(com.google.android.gms:play-services-auth##19.0.0:4)
at com.google.android.gms.internal.auth-api.zzu.zzc(com.google.android.gms:play-services-auth##19.0.0:9)
at com.google.android.gms.internal.auth-api.zzc.onTransact(com.google.android.gms:play-services-auth##19.0.0:13)
at android.os.Binder.execTransactInternal(Binder.java:1154)
at android.os.Binder.execTransact(Binder.java:1123)

Flutter AWS Cognito app in release mode crashes on Android

I have created a Flutter application that uses amplify_auth_cognito and amplify_core packages for authentication.
In debug mode, the app works fine without any issues. The iOS version works fine as well, even when installed from the TestFlight.
However, when I run in release mode created apk on a physical Android device, whenever I click on a button that calls Amplify.Auth.signIn(username, password) function, the whole app crashes.
App crash log says:
time: 1604934616377
msg: java.lang.NoSuchFieldException: SUCCESS
stacktrace: java.lang.AssertionError: java.lang.NoSuchFieldException: SUCCESS
at c.b.b.w.n.n$j0.<init>(Unknown Source:87)
at c.b.b.w.n.n$w.a(Unknown Source:29)
at c.b.b.e.a(Unknown Source:74)
at c.b.b.w.n.i.a(Unknown Source:42)
at c.b.b.w.n.i.a(Unknown Source:123)
at c.b.b.w.n.i.a(Unknown Source:22)
at c.b.b.e.a(Unknown Source:74)
at c.b.b.e.a(Unknown Source:4)
at c.b.b.e.a(Unknown Source:8)
at c.b.b.e.a(Unknown Source:5)
at c.b.b.e.a(Unknown Source:13)
at com.amazonaws.amplify.amplify_auth_cognito.types.FlutterFetchCognitoAuthSessionResult.a(Unknown Source:4)
at com.amazonaws.amplify.amplify_auth_cognito.types.FlutterFetchCognitoAuthSessionResult.a(Unknown Source:42)
at com.amazonaws.amplify.amplify_auth_cognito.AuthCognito$prepareCognitoSessionResult$1.run(Unknown Source:8)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7398)
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:924)
Caused by: java.lang.NoSuchFieldException: SUCCESS
at java.lang.Class.getField(Class.java:1604)
at c.b.b.w.n.n$j0.<init>(Unknown Source:34)
... 20 more
Any idea why is this happening and how to fix it?

Firebase Internal Error: java.lang.RuntimeException: Internal error in Firestore (19.0.2)

While using Firebase, Cloud Vision API, and the Google Translate API, there was a conflict between the dependencies and the case was resolved, but I faced this problem. I don't know what is the problem. In the case of Firebase code, it worked fine until I put in the cloud and Google Translate API.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.voca, PID: 32584
java.lang.RuntimeException: Internal error in Firestore (19.0.2).
at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$5(com.google.firebase:firebase-firestore##19.0.2:379)
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$5.run(Unknown Source:2)
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: java.lang.ExceptionInInitializerError
at com.google.firestore.v1.ListenRequest.getDefaultInstance(com.google.firebase:firebase-firestore##19.0.2:915)
at com.google.firestore.v1.FirestoreGrpc.getListenMethod(com.google.firebase:firebase-firestore##19.0.2:408)
at com.google.firebase.firestore.remote.WatchStream.<init>(com.google.firebase:firebase-firestore##19.0.2:62)
at com.google.firebase.firestore.remote.Datastore.createWatchStream(com.google.firebase:firebase-firestore##19.0.2:149)
at com.google.firebase.firestore.remote.RemoteStore.<init>(com.google.firebase:firebase-firestore##19.0.2:167)
at com.google.firebase.firestore.core.FirestoreClient.initialize(com.google.firebase:firebase-firestore##19.0.2:263)
at com.google.firebase.firestore.core.FirestoreClient.lambda$new$2(com.google.firebase:firebase-firestore##19.0.2:117)
at com.google.firebase.firestore.core.FirestoreClient$$Lambda$2.run(Unknown Source:8)
at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$4(com.google.firebase:firebase-firestore##19.0.2:311)
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$4.call(Unknown Source:2)
at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$3(com.google.firebase:firebase-firestore##19.0.2:287)
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$3.run(Unknown Source:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.firestore.util.AsyncQueue$DelayedStartFactory.run(com.google.firebase:firebase-firestore##19.0.2:205)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.RuntimeException: Unable to get message info for com.google.firestore.v1.ListenRequest
at com.google.protobuf.GeneratedMessageInfoFactory.messageInfoFor(GeneratedMessageInfoFactory.java:62)
at com.google.protobuf.ManifestSchemaFactory$CompositeMessageInfoFactory.messageInfoFor(ManifestSchemaFactory.java:143)
at com.google.protobuf.ManifestSchemaFactory.createSchema(ManifestSchemaFactory.java:55)
at com.google.protobuf.Protobuf.schemaFor(Protobuf.java:93)
at com.google.protobuf.Protobuf.schemaFor(Protobuf.java:107)
at com.google.protobuf.GeneratedMessageLite.makeImmutable(GeneratedMessageLite.java:171)
at com.google.firestore.v1.ListenRequest.<clinit>(com.google.firebase:firebase-firestore##19.0.2:911)
at com.google.firestore.v1.ListenRequest.getDefaultInstance(com.google.firebase:firebase-firestore##19.0.2:915) 
at com.google.firestore.v1.FirestoreGrpc.getListenMethod(com.google.firebase:firebase-firestore##19.0.2:408) 
at com.google.firebase.firestore.remote.WatchStream.<init>(com.google.firebase:firebase-firestore##19.0.2:62) 
at com.google.firebase.firestore.remote.Datastore.createWatchStream(com.google.firebase:firebase-firestore##19.0.2:149) 
at com.google.firebase.firestore.remote.RemoteStore.<init>(com.google.firebase:firebase-firestore##19.0.2:167) 
at com.google.firebase.firestore.core.FirestoreClient.initialize(com.google.firebase:firebase-firestore##19.0.2:263) 
at com.google.firebase.firestore.core.FirestoreClient.lambda$new$2(com.google.firebase:firebase-firestore##19.0.2:117) 
at com.google.firebase.firestore.core.FirestoreClient$$Lambda$2.run(Unknown Source:8) 
at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$4(com.google.firebase:firebase-firestore##19.0.2:311) 
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$4.call(Unknown Source:2) 
at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$3(com.google.firebase:firebase-firestore##19.0.2:287) 
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$3.run(Unknown Source:4) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at com.google.firebase.firestore.util.AsyncQueue$DelayedStartFactory.run(com.google.firebase:firebase-firestore##19.0.2:205) 
at java.lang.Thread.run(Thread.java:764) 
Caused by: java.lang.UnsupportedOperationException
at com.google.firestore.v1.ListenRequest.dynamicMethod(com.google.firebase:firebase-firestore##19.0.2:903)
at com.google.protobuf.GeneratedMessageLite.dynamicMethod(GeneratedMessageLite.java:252)
at com.google.protobuf.GeneratedMessageLite.buildMessageInfo(GeneratedMessageLite.java:280)
at com.google.protobuf.GeneratedMessageInfoFactory.messageInfoFor(GeneratedMessageInfoFactory.java:60)
at com.google.protobuf.ManifestSchemaFactory$CompositeMessageInfoFactory.messageInfoFor(ManifestSchemaFactory.java:143) 
at com.google.protobuf.ManifestSchemaFactory.createSchema(ManifestSchemaFactory.java:55) 
at com.google.protobuf.Protobuf.schemaFor(Protobuf.java:93) 
at com.google.protobuf.Protobuf.schemaFor(Protobuf.java:107) 
at com.google.protobuf.GeneratedMessageLite.makeImmutable(GeneratedMessageLite.java:171) 
at com.google.firestore.v1.ListenRequest.<clinit>(com.google.firebase:firebase-firestore##19.0.2:911) 
at com.google.firestore.v1.ListenRequest.getDefaultInstance(com.google.firebase:firebase-firestore##19.0.2:915) 
at com.google.firestore.v1.FirestoreGrpc.getListenMethod(com.google.firebase:firebase-firestore##19.0.2:408) 
at com.google.firebase.firestore.remote.WatchStream.<init>(com.google.firebase:firebase-firestore##19.0.2:62) 
at com.google.firebase.firestore.remote.Datastore.createWatchStream(com.google.firebase:firebase-firestore##19.0.2:149) 
at com.google.firebase.firestore.remote.RemoteStore.<init>(com.google.firebase:firebase-firestore##19.0.2:167) 
at com.google.firebase.firestore.core.FirestoreClient.initialize(com.google.firebase:firebase-firestore##19.0.2:263) 
at com.google.firebase.firestore.core.FirestoreClient.lambda$new$2(com.google.firebase:firebase-firestore##19.0.2:117) 
at com.google.firebase.firestore.core.FirestoreClient$$Lambda$2.run(Unknown Source:8) 
at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$4(com.google.firebase:firebase-firestore##19.0.2:311) 
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$4.call(Unknown Source:2) 
at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$3(com.google.firebase:firebase-firestore##19.0.2:287) 
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$3.run(Unknown Source:4) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at com.google.firebase.firestore.util.AsyncQueue$DelayedStartFactory.run(com.google.firebase:firebase-firestore##19.0.2:205) 
at java.lang.Thread.run(Thread.java:764) 

I am getting error while login in google via firebase auth

I am using firebase authentication for sign in into app through google but when I clicked on sign in button list of account appear but after choosing an account nothing happens. in logs, I am getting API exception 7
Error Logs :
2019-08-01 16:48:30.591 5073-5073/rishab.listview.com.stepcounter W/google sign in failed: com.google.android.gms.common.api.ApiException: 7:
at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(Unknown Source:4)
at com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(Unknown Source:8)
at rishab.listview.com.stepcounter.MainActivity.onActivityResult(MainActivity.java:184)
at android.app.Activity.dispatchActivityResult(Activity.java:7276)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4264)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4312)
at android.app.ActivityThread.-wrap19(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1644)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Firebase sign in error with Firebase UI Auth

I was following this tutorial.
It should go to HomeActivity but it's not: it shows MainActivity instead.
I am new to coding and don't know what to do.
I already added SHA-1 to Firebase.
E/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: 16: No eligible accounts can be found.
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)

Categories

Resources