android-money-manager-ex
android-money-manager-ex copied to clipboard
Sync issue Google drive
1 Open a file on GDrive modify it and sync. After that sync date and hour on GDrive seems to be updated. 2 Open gdrive file on other device (the date/hour indicated on gdrive is the same that on first device) and file opened is older then point 1.
MMX version 2024.03.24 in both android 11 device
hi @ggraziotti, can you show us your sync setting in the app?
any other details, e.g. interval and detailed steps to produce the issue?
5 minutes.
hi @ggraziotti , thanks.
And detailed steps to reproduce the issue?
Happens to me too. My 2 devices are Android 10 phone and Windows 10 Professional PC (using Google Drive Windows application). I have the option "sync on app start" on, or from the toast menu I manually select "Synchronize", or "Settings - Synchronization - Download", (what's the difference between the 2 menu commands anyway???) but Android doesn't update the db from the remote Drive which has been modified on Windows; The other way round seems to work (i.e., modify on Android, synchronize, open on Windows, the changes are there).
EDIT: app version is 2024.03.26 (1025) updated from F-Droid
- Synchronize is to perform ad-hoc sync.
- while Synchronization provides more settings. (including force download and upload)
can you check whether the file is synced to google drive, e.g. via browser
I think that the problem is when changes are limited to details of existing transactions. For example, a change of the status of an existing transaction from "none" to "reconciled" is not synced. I have never missed a new transaction added to the db between synchronization so far, but changes to existing transactions are often missed.
that's weird. both are to modify the database file, and Google Drive should sync it. hence whether the file is synced in google is important.
for your case, can you verify by adding a new transaction?
Here's a test I've done right now:
-
Open db in WIndows, delete a transaction, then permanently delete the transaction also from the delete transactions folder.
-
Close the Windows application
-
Check the date / time in Google Drive from browser, it's been updated with the current time
-
Open the Android app, which is set with "sync on start" on: the notification "the database is up to date" appears, but the deleted transactions is still shown
-
From the toast menu in the Android app, select "Synchronize": again, the notification "the database is up to date" appears, but the deleted transactions is still shown
-
From the toast menu in the Android app, select "Settings" -> "Synchronization" -> "Download": the database is finally synchronized, the deleted transaction is not there anymore also in the Android app.
Now, I wonder why "Download" and "Upload" are in the Settings menu, anyway - also, it seems that "Synchronize" does not work as it should.
I still can't find a reproducible test scenario for the case of transaction status change. I notice anyway that the Android app calls the "unreconciled" status as "none", differently from the Windows desktop application. IMO it's worthy to have a consistent spelling between the two applications; I don' think this can be the cause of some bug in synchronization of the status of transactions, although there's a small possibility - isn't it?
Thanks. it is very detailed.
"Download" and "Upload" in the Settings menu are for single direction op and it is force.
"Synchronize" will perform in either direction based on mtime
.
I suspect the mtime
from Google Drive is not fetched correctly. may I have your Google Drive app version?
I suspect the
mtime
from Google Drive is not fetched correctly. may I have your Google Drive app version?
I am using the Drive app from Google v 88.0.0 on WIndows, just reinstalled yesterday; my phone is on Android 10, maybe this is a more critical issue.
I wanted to use Box as a cloud provider but Box recently dropped support for Android 10.
i mean the Android Google Drive app version. this is the one interaction with MMEX app.
i mean the Android Google Drive app version. this is the one interaction with MMEX app.
It's version 2.24.117.0.all.alldpi
thanks. can you upgrade it (google drive) to v2.24.127.0? i see there are some bug fixes.
No, the update is not offered... the last version I can see from Play Store is 117 (19 Mar 2024). BTW I have saved the logcat from MMEX (attached), maybe you can extract some useful information?
No, the update is not offered... the last version I can see from Play Store is 117 (19 Mar 2024). BTW I have saved the logcat from MMEX (attached), maybe you can extract some useful information?
Before running the app, I had modified the db on Windows; then I just started the app, performed nothing and saved the logcat. Just a few seconds had passed.
I spotted the lines
04-01 15:50:18.811 20422 20491 D SyncService: local file has changes: false 04-01 15:50:18.811 20422 20491 D SyncService: Remote file has changes: false
They don't give much information on the process of finding the changed status of the local and (mainly!) the remote files... (the latter was changed)
the result in logcat is the result instead of reason.
can you open your Google Drive app to see the database file's last modification time?
I was just doing that check and I've found that if I just open the Google Drive app, before opening MMEX, then the synchronization happens. I only waited a couple of minutes, but independently of how much time passes between the change on the other device (Windows) and the opening on Android, the synchronization only realizes that there's a change in the remote file if I open the Drive app on my phone before opening MMEX.
ok. i think this is reasonable
- both desktop and android app are 100% relying on 3rd storage or service to perform the sync.
- desktop use posix interface, i think the according google drive was running in your windows
- android use SAF interface, it also expected google drive to fetch/sync the file (metadata at least)
this is documented in MMEX development arch, data, and user
Yes, as a developer it seems reasonable to me too; but as an end user, it doesn't... knowing this workaround, I will continue using it, but I wouldn't suggest this app to a non-technical person. On the other hand, I have promoted the usage of Keepass2Android to all my family members, paired with KeePass2 on Windows and GoogleDrive; on Windows a plug-in has to be installed in order to have cloud access (an easy task), while on Android, GoogleDrive and a bunch of other clouds are supported internally by the app. I didn't investigate into the sources (it's here on GitHub) but I think it was a complex task.
understood.
In theory, the Google Drive app/service would be called implicitly
by MMEX. An explicit google drive app open is weird.
I have tried opening Mixplorer, between an update on desktop and reopening on Android, instead of opening Google Drive. In Mixplorer I have added my Google Drive account, and it shows the latest modification date / time; still, it's not enough to have MMEX catch the latest mtime, I have to open just the Google Drive app.
Oh, it might be a problem with Android 10. It would be nice to be able to make tests on different versions of OS and see if the issue can be related to Android 10. @ggraziotti is on Android 11... can you please check if opening the Drive app makes MMEX catch the synchronization?
hi @pdelamotar, this is close to your scenario. can you share your android/google drive versions?
My case
- 2 devices: + Smartphone android 11, running google drive version 2.24.127.0.all.alldpi, mmex version 2024.03.26 (1025) + Tablet android 11, running google drive version 2.24.127.0.all.alldpi, mmex version 2024.03.26 (1025) Testing 1/ Open database on tablet, add transaction. Click "Synchronize". 2/ Check file status in google drive, it doesn't sync 3/ Open file from smartphone, nothing change. ---> Update 4/3/2024 9:37 pm Testing new rounds, synchronize progress works with database file opened from google drive. I'm testing with latest version of Google Drive, MMEX on my tablet and smartphone. Ensure your devices run lastest version of all apps, and go to "Synchronization" setting, enable "Sync enable". Then enjoy! Try it again with Google Drive, guys.
dup with #1702