jamie-mh / AuthenticatorPro

📱 Two-Factor Authentication (2FA) client for Android + Wear OS
https://authenticatorpro.jmh.me
GNU General Public License v3.0
2.98k stars 198 forks source link

Authenticator does not always open first time #851

Open NebularNerd opened 1 year ago

NebularNerd commented 1 year ago

Describe the bug When opening Authenticator it may not open the first time, it opens but immediately dumps you out. Second attempt will open the app.

To Reproduce Steps to reproduce the behavior:

  1. Try to open Authenticator

Expected behavior Should open first time

App Version 1.20.1

Additional context I've had this issue for a while on my ancient Galaxy S8 and thought it was down to that. But just installed on new S22 Ultra and it will still do it now and again.

jamie-mh commented 1 year ago

Hi,

I've never experienced this issue on my S22. Is there anything in the logs, an indication of a crash or something?

Thanks

NebularNerd commented 1 year ago

@jamie-mh, Where can I view the logs to take a look?

I also run this through WSA on my desktop PC, on that it performs without issue every time, makes it very nice to have 2FA on my desktop 🙂

milindgoel15 commented 1 year ago

Where can I view the logs to take a look?

You can use logcat reader.

Or maybe scoop which detects realtime crash reports when you try to open the app.

NebularNerd commented 1 year ago

@milindgoel15 Thanks for the suggestions, I tried logcat which as expected produced a million lines of logging data, there are some odd lines about files not being found but I cannot see anything obvious and error looking. I can share those with @jamie-mh if needed.

Scoop appears to be an excellent tool but it could not detect a crash. I guess this means that whatever is causing Authenticator to close is making it appear as if it's cleanly exiting.

its-very-strange-danny-roberts

NebularNerd commented 1 year ago

Today it decided to actually crash and flashed up an error report, first time that has happened. I've emailed it in but adding here as it might be part of the reason for it not opening every time. After this crash it opened fine as per how it seems to behave on the phone.

App version: 1.21.0

Device name: samsung SM-S9080

Android version: 13 (API Tiramisu)

Error log:

System.InvalidOperationException: Connection not open
   at AuthenticatorPro.Droid.Database.GetConnection()
   at AuthenticatorPro.Droid.Persistence.AsyncRepository`2.<GetAllAsync>d__4[[AuthenticatorPro.Core.Entity.IconPack, AuthenticatorPro.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at AuthenticatorPro.Droid.Persistence.View.Impl.IconPackView.LoadFromPersistenceAsync()
   at AuthenticatorPro.Droid.Interface.Fragment.ChangeIconBottomSheet.OnViewCreated(View view, Bundle savedInstanceState)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object )
   at Android.App.SyncContext.<>c__DisplayClass2_0.<Post>b__0()
   at Java.Lang.Thread.RunnableImplementor.Run()
   at Java.Lang.IRunnableInvoker.n_Run(IntPtr , IntPtr )
   at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V , IntPtr , IntPtr ) 
jamie-mh commented 1 year ago

Hi @NebularNerd ,

Have you tried beta 1.22.0? Is there any improvement?

Thanks

NebularNerd commented 1 year ago

Hi @NebularNerd ,

Have you tried beta 1.22.0? Is there any improvement?

Thanks

Just tried it and having the same issues, with fingerprint on it closes and a notification appears saying Fingerprint operation cancelled, without fingerprint on it just dumps you back out. As before we-reopening it behaves as expected. If you have a debug version that logs as it goes along I'm happy to give that a go for you.

jamie-mh commented 1 year ago

Thanks for getting back to me.

I'm wondering if this is a low-tech problem, simply the password dialog being dismissed by a phantom tap on the screen. I've updated the APKs in the beta release with a change that might work if this is the case.

A couple of questions though:

Thanks

NebularNerd commented 1 year ago
  • Do you have a screen protector on your phone?
  • Is the problem identical with no app password?

I do have a screen protector, I switched from a terrible 3rd party one that caused issues with all things fingerprint, to a genuine Samsung one. No other issues relating to phantom taps with other apps.

Just updated the BETA and without a password the app starts first time every time.

Interestingly, I just tested turning on the password option for the copy I have on my WSA install, that just borked the app, could not open at all, I imagine if it were a real device it would present the same issue as the phone, had to force close and wipe the data (no big I have Google Drive backups to restore from)

DerSaxxe commented 7 months ago

Hi, here i have to start Authenticator (F-Droid) 2-4 times to work. The app shows the finger print icon and crashs immediately. No problems with other apps and finger print (i.e. Aegis). I had his problem since my first installation last year but mostly Authenticator runs after second start. With the latest F-Droid version 1.24.1 i have to start the app mostly 3 times. Thank you

Sesivany commented 4 months ago

Not sure if it's the same problem, but I have problems to unlock the app with the fingerprint. I use the finger and the dialog reappears as if nothing happened. I can repeat it again and again with the same result. No error messages. I've observed that it happens after the app has not been used for some time and probably suspended. If I terminate the app and reopen it, it always starts working again. I'm using Galaxy S22.

DerSaxxe commented 3 months ago

Hi, here i have to start Authenticator (F-Droid) 2-4 times to work. The app shows the finger print icon and crashs immediately. No problems with other apps and finger print (i.e. Aegis). I had his problem since my first installation last year but mostly Authenticator runs after second start. With the latest F-Droid version 1.24.1 i have to start the app mostly 3 times. Thank you

Hello since v1.25.1 i have to start the app only two times. First start failes everytime when the app is completely closed. If the app is in the background there is no problem.