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
453 stars 183 forks source link

dropbox and syncthing sync don't work properly #1681

Closed elgidiom closed 1 month ago

elgidiom commented 2 months ago

Describe the bug

Sync and storage in dropbox doesnt work properly. The data seems to be saved in dropbox but the dropbox database actually is not updated

To Reproduce Steps to reproduce the behavior:

  1. Create a database and save directly in dropbox
  2. make any transactions

you would notice that dropbox database is not update

Expected behavior The dropbox database is update

Device Information:

Additional context Dropbox not works properly. Even if i import the database, some times the app doesnt show any transactions

guanlisheng commented 2 months ago

what's your synchronization setting? the screenshot on F-Droid is a good example.

elgidiom commented 2 months ago

Screenshot_20240428_090941_Money Manager Ex

now i moved the source of database but still dont working. I think that the issue is with sync in general.

i dont know how see the logs, but some times an no file error appear after "remote database update" message

guanlisheng commented 2 months ago

Based on the screenshot, your database is in your shared(external) storage: Documents.

Each app restart or the interval you set, the app will sync the data between application folder and your Documents folder.

elgidiom commented 1 month ago

I will explain my case to you in detail. First, I left Dropbox because sync never worked. Now I put my database on external SD storage and synchronized with syncthings to my PC (settings in mmex sync on startup). That's what's happening:

1) my database named db.mmb is in the directory and on my PC with the same modification date 2) if I do a transaction from the application and restart it, what I expect to happen is the database in the directory is updated, but no, instead db.mmb stays the same and another database called db is created. sync-conflict- (name continues).mmb 3) the new database has changes but the original does not

imagen

IN DROPBOX 1) the process is repeated. The Dropbox database and the application start in sync. 2) I make a transaction in the app and force the sync (a sync successful message appears) 3) the first sync works but then it starts creating other files and the original continues without modifications

imagen

after that, more files are created but the original one (the files that the application actually uses remain outdated?

after that other files are created but original (the files apps actuallly uses remaining downdated?

guanlisheng commented 1 month ago

thanks @elgidiom ,

Both DropBox and Shared Storage + Syncthing are good options.

for MMEX4Android, its sync has two stages:

  1. bi-sync between the application folder and your chosen folder (Documents or Dropbox)
  2. Syncthing or Dropbox bi-syncs between local storage and remote (either desktop and cloud)

based on your screenshots, the conflict happened in stage 2. Can you list your detailed steps?

you can refer to https://github.com/moneymanagerex/android-money-manager-ex/issues/1571

guanlisheng commented 1 month ago

https://moneymanagerex.org/docs/features/usecloud/ This is also helpful to explain current sync

elgidiom commented 1 month ago

Hi @guanlisheng looking at the bug you mentioned. I searched for system updates and found a few. After installation, syncing with Dropbox works pretty well. It's not perfect, it still creates some error files sometimes, but with manual syncing or reopening the app, the main file syncs.

imagen

In logs is this. imagen

thank you for your awesome job!

guanlisheng commented 1 month ago

Great that it works somehow. we will keep enhancing the synchronization and encryption.

would you help close the issue?