moneymanagerex / android-money-manager-ex

Manage your finances on-the-go, encrypted for security, sync via your own cloud
http://android.moneymanagerex.org/
GNU General Public License v3.0
454 stars 183 forks source link

Wrong database path #1641

Closed shay4567 closed 2 months ago

shay4567 commented 3 months ago

Describe the bug Opening the app for the first time asks to create or open a database int he internal storage. Setting up a database in the Documents/MME folder results in your_data.mmb being 0 bytes. The path specified in settings/database is: /storage/emulated/0/Android/data/com.money.manager.ex/files/databases/your_data.mmb and can't be changed. Opening the app other times results in a looping error message: "Error: the passphrase appears to be cleared. This happens bydefault th..." and impossibility to modify the previously set database (no data from it is shown in the app) To Reproduce Steps to reproduce the behavior:

  1. Open the app after clean install
  2. Create/open a database located in Documents/MME or similar folder
  3. Close and open the app a second time

Expected behavior The path chosen is remembered and the app functions normally

Device Information:

Additional context This was actually present in the previous version 2024.03.19 as well Opening Setting/database after the app enters the buggy state (second opening) results in returning to home screen

guanlisheng commented 3 months ago

there is an assumption that *.mmb is not encrypted, saying leave password empty/blank.

reaffirm commented 3 months ago

Also seeing this error on Android.

Note: I've even tried tapping the menu and going to load database and inputing the password, but I still get the looping error message.

I feel that the expected UX here would be for the app to prompt for the password to decrypt the db when you load it after it has been stopped, but I would settle for anything that would get my db to load after the very first time I create it.

Edit:

Found a workaround: Create a db that has a blank password (unencrypted). If you want your real data to be encrypted, make another db that's encrypted and keep all your data in there. Then you need to either make sure that the unencrypted db is the last one open before closing the app, or upon opening the app again, open the fake (unencrypted) db, then reopen your real (encrypted) db at which time you'll be prompted for the password. As I mentioned, ideal UX would be to be prompted for the password on startup (if the db is encrypted).

guanlisheng commented 3 months ago

thanks @reaffirm, there is much room for uex.

  1. for unencrypted files, please use *.mmb suffix and leave the password blank.
  2. for the encrypted one, please use *.emb suffix and set your password.
reaffirm commented 3 months ago

@guanlisheng, when I do that then when I reopen the *.emb file, it's just blank and doesn't have the accounts I set up. Is there some save button I have to press before closing it?

guanlisheng commented 3 months ago

reopening the app should be sufficient. while reopening the file means force pulling from the remote.

sync and setting -> sync will be helpful here.

guanlisheng commented 2 months ago

hi @shay4567 , closing this and feel free to re-open