Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Biometric unlock broken #1150

Open
technodrome opened this issue Jun 12, 2024 · 5 comments
Open

Biometric unlock broken #1150

technodrome opened this issue Jun 12, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@technodrome
Copy link

Describe the bug
Biometric unlock on 1.25.1 does not work. On app startup, I always have to log in using password. When I head to settings and try to enable BU there, modal with fingerprint scan pops up and I can scan my finger. Then the pill button briefly shows BU enabled but then immediately switches back to disabled BU state.

To Reproduce
Steps to reproduce the behavior:

  1. Open app, enter password (cannot use BU)
  2. Click on Settings, try to enable BU, scan, shows BU enabled for a moment, then switches automatically back to BU disabled

Error Failed to store cipher appears in log:

1718214892.080 10250 12351 12351 E uthenticatorpr: Invalid ID 0x00000000.
1718214893.317 10250 12351 12351 E AUTHPRO : Failed to store cipher
1718214893.317 10250 12351 12351 E AUTHPRO : System.ArgumentNullException: ArgumentNull_Generic Arg_ParamName_Name, s
1718214893.317 10250 12351 12351 E AUTHPRO :    at System.Text.Encoding.GetBytes(String )
1718214893.317 10250 12351 12351 E AUTHPRO :    at System.Text.UTF8Encoding.UTF8EncodingSealed.GetBytes(String )
1718214893.317 10250 12351 12351 E AUTHPRO :    at AuthenticatorPro.Droid.Storage.BiometricStorage.Store(String password, Cipher cipher)
1718214893.317 10250 12351 12351 E AUTHPRO :    at AuthenticatorPro.Droid.Activity.SettingsActivity.<>c__DisplayClass21_0.<EnableBiometrics>b__0(Object _, AuthenticationResult result)

Expected behavior
Working BU.

App Version
1.25.1, Android 11, OnePlus 7Pro

Additional context
Full log attached.
12_06-19-54-39_102.log

@technodrome technodrome added the bug Something isn't working label Jun 12, 2024
@jamie-mh
Copy link
Owner

Hi,

Thanks for the detailed report.
Can you try clearing and setting the app password before enabling biometric unlock?

Cheers

@technodrome
Copy link
Author

After doing that, the app is completely broken. I cannot even start it, it completely crashes with the following SQLite error which repeats upon every app start.

SQLite.SQLiteException: file is not a database
   at SQLite.SQLite3.Prepare2(sqlite3 , String )
   at SQLite.SQLiteCommand.Prepare()
   at SQLite.SQLiteCommand.<ExecuteDeferredQuery>d__121[[SQLite.SQLiteConnection.ColumnInfo, SQLite-net, Version=1.9.172.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at System.Collections.Generic.List1[[SQLite.SQLiteConnection.ColumnInfo, SQLite-net, Version=1.9.172.0, Culture=neutral, PublicKeyToken=null]]..ctor(IEnumerable1 )
   at System.Linq.Enumerable.ToList[ColumnInfo](IEnumerable1 )
   at SQLite.SQLiteCommand.ExecuteQuery[ColumnInfo]()
   at SQLite.SQLiteConnection.Query[ColumnInfo](String , Object[] )
   at SQLite.SQLiteConnection.GetTableInfo(String )
   at SQLite.SQLiteConnection.CreateTable(Type , CreateFlags )
   at SQLite.SQLiteConnection.CreateTable[Authenticator](CreateFlags )
   at SQLite.SQLiteAsyncConnection.<>c__DisplayClass36_01[[AuthenticatorPro.Core.Entity.Authenticator, AuthenticatorPro.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].<CreateTableAsync>b__0(SQLiteConnectionWithLock conn)
   at SQLite.SQLiteAsyncConnection.<>c__DisplayClass33_01[[SQLite.CreateTableResult, SQLite-net, Version=1.9.172.0, Culture=neutral, PublicKeyToken=null]].<WriteAsync>b__0()
   at System.Threading.Tasks.Task`1[[SQLite.CreateTableResult, SQLite-net, Version=1.9.172.0, Culture=neutral, PublicKeyToken=null]].InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__281_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread , ExecutionContext , ContextCallback , Object )
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread , ExecutionContext , ContextCallback , Object )
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& , Thread )
--- End of stack trace from previous location ---
   at AuthenticatorPro.Droid.Database.MigrateAsync(Boolean firstLaunch)
   at AuthenticatorPro.Droid.Database.OpenAsync(String password, Origin origin)
   at AuthenticatorPro.Droid.Database.OpenAsync(String password, Origin origin)
   at AuthenticatorPro.Droid.Activity.MainActivity.OnResumeAsync()
   at AuthenticatorPro.Droid.Activity.AsyncActivity.OnResume()
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Android.App.SyncConDisplayClass2_0.<Post>bPost>b__0()
   at Java.Lang.Thread.RunnableImplementor.Run()
   at Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this)
   at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz)

@technodrome
Copy link
Author

technodrome commented Jun 19, 2024

Had to uninstall the app, reinstall and restore from backup. Lost all the settings. Upon fresh install, app works without SQLite or biometric unlock issues. Could be caused by version upgrade but it is definitely not user-friendly or smooth experience.

@jamie-mh I'll leave it up to you to close this if you do not want to investigate.

@ghost
Copy link

ghost commented Jun 21, 2024

It works for me using 1.25.1.

OS: One UI 6.0, based of Android 14 (Samsung)

@theAkito
Copy link

For the sake of helping this issue, I tried it on my Android 11 based custom OS.
Works fine.

However, I just installed this app and didn't add any entries yet. Maybe some older update broke something earlier, which becomes only visible in rare scenarios?

At least, the following strongly suggests, this is the case.

Upon fresh install, app works without SQLite or biometric unlock issues.

@jamie-mh

Maybe add a warning to an FAQ or the README, so people are aware of such an issue, when upgrading from older versions? 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants