I'm trying to authenticate my users using firebase authentication, but this error pops up.
I've already added the SHA1, but it still doesn't work.
E/AuthUI: A sign-in error occurred.
com.firebase.ui.auth.FirebaseUiException: Code: 16, message: 16:
at com.firebase.ui.auth.data.remote.GoogleSignInHandler.onActivityResult(GoogleSignInHandler.java:110)
at com.firebase.ui.auth.ui.idp.SingleSignInActivity.onActivityResult(SingleSignInActivity.java:128)
at android.app.Activity.dispatchActivityResult(Activity.java:7454)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4353)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4402)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
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)
Related
What I tried to run :
KeysetHandle keyHandler = KeysetHandle.generateNew(KeyTemplates.get("AES128_GCM"));
Error I got :
java.security.GeneralSecurityException: cannot find key template: AES128_GCM
at com.google.crypto.tink.KeyTemplates.get(KeyTemplates.java:37)
at com.example.AppName.password_pin.onCreate(password_pin.java:59)
at android.app.Activity.performCreate(Activity.java:7136)
at android.app.Activity.performCreate(Activity.java:7127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
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)
Am I missing something? Did I skip some step accidentally?
The registration is missing, e.g.:
AeadConfig.register();
see also the Tink documentation (current Version v1.6.1).
I used this answer in order to setup my Licence Verfication Library. In order to compile my app without errors I needed to add
android
{
useLibrary 'org.apache.http.legacy'
}
in the build.gradle of library. However, when I launch my app it crashes instantly, even if I remove abort(). Using debugger I could reach the line checker.checkAccess(licenseCheckerCallback). Maybe someone else tried it with Kotlin? How can I solve this?
Edit:
I noticed that I'm getting and error as in the step 24 of answer: Service Intent must be explicit: Intent { act=com.android.vending.licensing.ILicensingService }. However I don't know how can I solve it in Kotlin.
My stacktrace in red is:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: dreamy.protest, PID: 1539
java.lang.RuntimeException: Unable to start activity ComponentInfo{dreamy.protest/ dreamy.protest.MainActivity}: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.android.vending.licensing.ILicensingService }
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2951)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.android.vending.licensing.ILicensingService }
at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1519)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1663)
at android.app.ContextImpl.bindService(ContextImpl.java:1612)
at android.content.ContextWrapper.bindService(ContextWrapper.java:698)
at android.content.ContextWrapper.bindService(ContextWrapper.java:698)
at com.google.android.vending.licensing.LicenseChecker.checkAccess(LicenseChecker.java:150)
at dreamy.protest.MainActivity.doCheck(MainActivity.kt:57)
at dreamy.protest.MainActivity.onCreate(MainActivity.kt:104)
at android.app.Activity.performCreate(Activity.java:7144)
at android.app.Activity.performCreate(Activity.java:7135)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Unsupported Font Family restricted policy in Android Studio
in my play console of pre-lauch report showing this warning. i don't why this is happening. Some api blacklisted by Android in Pie and Q. so this api is not private it is public then why issue is producing here anyone who have idea what's happend acutly
Thanks in advance!
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V
at android.os.StrictMode.lambda$static$1(StrictMode.java:428)
at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
at java.lang.Class.getDeclaredMethodInternal(Native Method)
at java.lang.Class.getPublicMethodRecursive(Class.java:2075)
at java.lang.Class.getMethod(Class.java:2063)
at java.lang.Class.getMethod(Class.java:1690)
at androidx.appcompat.widget.a1.b(Unknown Source:19)
at androidx.appcompat.app.h.z(Unknown Source:271)
at androidx.appcompat.app.h.A(Unknown Source:4)
at androidx.appcompat.app.h.c(Unknown Source:0)
at androidx.appcompat.app.e.setContentView(Unknown Source:4)
at sjtechnologies.muslimapp.MainActivity.onCreate(Unknown Source:6)
at android.app.Activity.performCreate(Activity.java:7144)
at android.app.Activity.performCreate(Activity.java:7135)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:184)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
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)
I've noticed that every time I use Ringtone.play/stop on android 29 it prints this stacktrace as level INFO:
2019-07-30 19:28:05.657 14498-14498/com.tinycorp.rise I/Ringtone: stop java.lang.Throwable
at android.media.Ringtone.stop(Ringtone.java:458)
at android.media.RingtoneManager.getRingtone(RingtoneManager.java:515)
at com.tinycorp.rise.ringtone.AndroidRingtones.init(AndroidRingtones.kt:27)
at com.tinycorp.rise.di.module.RingtoneModule.providesAndroidRingtones(RingtoneModule.java:36)
at com.tinycorp.rise.di.module.RingtoneModule_ProvidesAndroidRingtonesFactory.proxyProvidesAndroidRingtones(RingtoneModule_ProvidesAndroidRingtonesFactory.java:52)
at com.tinycorp.rise.di.module.RingtoneModule_ProvidesAndroidRingtonesFactory.provideInstance(RingtoneModule_ProvidesAndroidRingtonesFactory.java:37)
at com.tinycorp.rise.di.module.RingtoneModule_ProvidesAndroidRingtonesFactory.get(RingtoneModule_ProvidesAndroidRingtonesFactory.java:30)
at com.tinycorp.rise.di.module.RingtoneModule_ProvidesAndroidRingtonesFactory.get(RingtoneModule_ProvidesAndroidRingtonesFactory.java:11)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at com.tinycorp.rise.di.module.FragmentModule_ProvidesViewModelFactoryFactory.provideInstance(FragmentModule_ProvidesViewModelFactoryFactory.java:113)
at com.tinycorp.rise.di.module.FragmentModule_ProvidesViewModelFactoryFactory.get(FragmentModule_ProvidesViewModelFactoryFactory.java:75)
at com.tinycorp.rise.di.module.FragmentModule_ProvidesViewModelFactoryFactory.get(FragmentModule_ProvidesViewModelFactoryFactory.java:20)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at com.tinycorp.rise.di.component.DaggerAppComponent$FragmentComponentImpl.injectHomeFragment(DaggerAppComponent.java:380)
at com.tinycorp.rise.di.component.DaggerAppComponent$FragmentComponentImpl.inject(DaggerAppComponent.java:357)
at com.tinycorp.rise.ui.home.HomeFragment.onCreate(HomeFragment.java:64)
at androidx.fragment.app.Fragment.performCreate(Fragment.java:2414)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:844)
at androidx.fragment.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:1196)
at androidx.fragment.app.FragmentTransition.calculateFragments(FragmentTransition.java:1079)
at androidx.fragment.app.FragmentTransition.startTransitions(FragmentTransition.java:118)
at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1844)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1802)
at androidx.fragment.app.FragmentManagerImpl.execSingleAction(FragmentManagerImpl.java:1679)
at androidx.fragment.app.BackStackRecord.commitNow(BackStackRecord.java:530)
at com.tinycorp.rise.ui.home.HomeActivity.onCreate(HomeActivity.java:28)
at android.app.Activity.performCreate(Activity.java:7149)
at android.app.Activity.performCreate(Activity.java:7140)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1288)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3017)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3172)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1906)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6863)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
If I run the same code on android 25, then none of the stacktraces appear...
Could this be an Android bug or am I doing something wrong on my end?
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)