OneKeePass / mobile

A secure password manager for iOS and Android platforms
GNU General Public License v3.0
79 stars 5 forks source link

Prompt to re-select database after already selecting. #7

Closed gregordinary closed 9 months ago

gregordinary commented 9 months ago

Please agree to the following

Summary

When clicking on an existing database in the UI and entering the password to unlock, the app is prompting me to select the database from the file browser.

Steps To Reproduce

Prerequisites:

  1. OneKeePass 0.7.0 App installed on Android 13
  2. Existing KeePass database that's been opened previously with OneKeePass

Steps to Reproduce:

  1. Open OneKeePass Android App
  2. From the welcome screen UI, click on an existing database to open.
  3. When prompted, enter the password and press Continue.
  4. OneKeePass returns the message: "Please pick the database file Test DB.kdbx"
  5. This message appears even though the database was selected at the beginning.

(the database I clicked was named (Test DB", presumably this will display the name of whichever DB was clicked)

Expected Result

If a previously opened database is selected at app launch, provided the file is in the same location as when it was first created/last opened, it should open after entering the correct password with no additional prompts.

Actual Result

After selecting a previously opened database and entering the correct password, OneKeePass prompts the user to re-select the database file from the file explorer.

Screenshots or Videos

  1. Existing Database selected from the welcome screen:

Screenshot_20230808-183630544

  1. Password entered:

Screenshot_20230808-183644493

  1. Prompt given to select the database that was just selected: Screenshot_20230808-183651740

Additional Context

The database will still open just fine after selecting from the file browser, but the extra step of re-selecting should not occur.

Operating System

Android

Operating System Version

13

Device

Asus Zenfone 8 Flip

Build Version

0.7.0

jeyasankar commented 9 months ago

Hi gregordinary, Thanks for creating the ticket with the details. Typically this happens if the database file handle/reference is no more valid. For example, the database is updated outside the app or synchronized etc. In such cases mobile OS File Manager invalidates the previous file reference that the app holds and expecting user to pick the file again. However, I will try to provide a proper message so that it is clear to the user why this is happening

gregordinary commented 9 months ago

I just did a couple more tests, this happens on a brand new database. Here are some additional observations:

  1. If I close the database and leave the app running, I'm able to click on it again, re-enter the password and it opens.
  2. If I close the database, exit the application, and re-open the application and click to open the database, I get prompted to browse for the DB even though it has not had any changes and is not being synced by a cloud service.

I'll look into it a bit more and see if I can pin down a more precise pattern to it.

jeyasankar commented 9 months ago

Fixed in release 0.8.0.