samschott / maestral

Open-source Dropbox client for macOS and Linux
https://maestral.app
MIT License
3.12k stars 64 forks source link

Maestral ignores differing local and remote file versions #910

Open redbeam opened 1 year ago

redbeam commented 1 year ago

Describe the bug Maestral seems to ignore differing file versions of several of my files in my local folder and in Dropbox servers. Initially, the files were created in the local folder and were correctly uploaded. Changes have been made to the files later, but Maestral did not upload those changes to the Dropbox servers. Restarting Maestral does not help. The last time this happened, I tried to rebuild the index, but that did not fix the problem -- it got rather worse, since many conflicts were created. Note that other than this, everything seems to work. New files are uploaded and downloaded without problems, but this leaves my Dropbox folder in quite an inconsistent state, since some files are uploaded, and some are not.

To Reproduce I don't really have any idea how to reproduce this.

Expected behaviour I expected the changes to be uploaded to Dropbox servers.

System:

Additional context Here is the local directory listing (Maestral has access to this):

-rw-r--r--. 1 student student   13799 24 apr 13:17 MAPS.xlsx
-rw-r--r--. 1 student student   14559  4 máj 07:21 OLDmainESTIM_HIST.c
-rw-r--r--. 1 student student   12422  5 apr 19:29 base-WF.csv
-rwxr--r--. 1 student student  144839 16 máj 03:26 bk-wf.dwf3work
-rw-r--r--. 1 student student    9776 17 máj 06:13 client.py
drwxr-xr-x. 8 student student     178 16 máj 08:41 mcu
-rwxr--r--. 1 student student 6615029  4 máj 07:53 mcuBAK.zip
-rwxr--r--. 1 student student 4770444  4 máj 07:53 mcuBAK2.rar
-rwxr--r--. 1 student student  638317  4 máj 07:52 mcuBAK3.rar
-rwxr--r--. 1 student student  579632  4 máj 07:52 mcuBAK4.rar
-rwxr--r--. 1 student student 1794054  4 máj 07:52 mcuBAK5.rar
-rwxr--r--. 1 student student 7668421 12 máj 13:30 mcuBAK6.rar
-rw-r--r--. 1 student student   78954 12 apr 03:21 rotation-speed-WF.csv
drwxr-xr-x. 2 student student     230 18 máj 02:37 text

Here is the remote directory listing (this is available in the cloud and to other devices):

-rw-r--r--@ 1 student  staff     13799 24 apr 13:17 MAPS.xlsx
-rw-r--r--@ 1 student  staff     14559  4 máj 07:21 OLDmainESTIM_HIST.c
-rw-r--r--@ 1 student  staff     12422  5 apr 19:29 base-WF.csv
-rw-r--r--@ 1 student  staff     97199 16 máj 01:11 bk-wf.dwf3work
-rw-r--r--@ 1 student  staff      9776 17 máj 06:13 client.py
drwxr-xr-x@ 9 student  staff       288 16 máj 08:41 mcu
-rw-r--r--@ 1 student  staff  21517158  8 dec 17:07 mcuBAK.zip
-rw-r--r--@ 1 student  staff  14665412 20 feb 21:12 mcuBAK2.rar
-rw-r--r--@ 1 student  staff   6823952 16 apr 08:09 mcuBAK3.rar
-rw-r--r--@ 1 student  staff   5602419 19 apr 04:23 mcuBAK4.rar
-rw-r--r--@ 1 student  staff  25254971 26 apr 19:01 mcuBAK5.rar
-rw-r--r--@ 1 student  staff   7668421 12 máj 13:30 mcuBAK6.rar
-rw-r--r--@ 1 student  staff     78954 12 apr 03:21 rotation-speed-WF.csv
drwxr-xr-x@ 8 student  staff       256 18 máj 02:36 text

The difference is apparent with the mcuBAK* files. The versions in the local folder are newer, but they are not uploaded.

samschott commented 1 year ago

Are you seeing this issue across all file types, or only archives?

There are in principle two possibilities here: (1) Maestral is not receiving file system events for those changes or (2) it thinks the files are already synced even though they are not.

Could you check the following to help distinguish those:

  1. Run maestral activity in another terminal window. This will show a live view of all sync activity, including anything triggered by local file changes. Then make a change to the local version and see if it is picked up.
  2. Increase the log level to DEBUG with maestral log level DEBUG and start Maestral in the foreground with maestral start -f -v. The -v|--verbose option will result in debug logs being streamed to the terminal. Wait until the initial startup sync is complete and again make local changes. You should now see a detailed log of which file events are picked up and how they are handled. Do you see anything picked up? And if yes, what do conflict checks report?
redbeam commented 1 year ago

Sorry for the late reply, I actually couldn't get to the computer that has the original local files.

Are you seeing this issue across all file types, or only archives?

It's happening across all file types (confirmed with zip, rar, c source and header files).

Now, during those 3 weeks, a number of conflicting files appeared in the folder I listed in my comment above. I made no changes to the folder from my other PC's or accounts.

-rw-r--r--. 1 student student    13799 apr 24 13:17 MAPS.xlsx
-rw-r--r--. 1 student student    14559 máj  4 07:21 OLDmainESTIM_HIST.c
-rw-r--r--. 1 student student    12422 apr  5 19:29 base-WF.csv
-rw-r--r--. 1 student student    97199 máj 29 22:33 bk-wf.dwf3work
-rwxr--r--. 1 student student   144839 máj 16 03:26 bk-wf (XX's conflicted copy 2023-05-29).dwf3work
-rw-r--r--. 1 student student     9776 máj 17 06:13 client.py
drwxr-xr-x. 8 student student      178 máj 16 08:41 mcu
-rwxr--r--. 1 student student  6615029 máj  4 07:53 mcuBAK (XX's conflicted copy 2023-05-29).zip
-rw-r--r--. 1 student student 21517158 máj 29 22:32 mcuBAK.zip
-rwxr--r--. 1 student student  4770444 máj  4 07:53 mcuBAK2 (XX's conflicted copy 2023-05-29).rar
-rw-r--r--. 1 student student 14665412 máj 29 22:32 mcuBAK2.rar
-rwxr--r--. 1 student student   638317 máj  4 07:52 mcuBAK3 (XX's conflicted copy 2023-05-29).rar
-rw-r--r--. 1 student student  6823952 máj 29 22:32 mcuBAK3.rar
-rwxr--r--. 1 student student   579632 máj  4 07:52 mcuBAK4 (XX's conflicted copy 2023-05-29).rar
-rw-r--r--. 1 student student  5602419 máj 29 22:32 mcuBAK4.rar
-rwxr--r--. 1 student student  1794054 máj  4 07:52 mcuBAK5 (XX's conflicted copy 2023-05-29).rar
-rw-r--r--. 1 student student 25254971 máj 29 22:33 mcuBAK5.rar
-rwxr--r--. 1 student student  7668421 máj 12 13:30 mcuBAK6.rar
-rw-r--r--. 1 student student    78954 apr 12 03:21 rotation-speed-WF.csv
drwxr-xr-x. 2 student student      230 máj 18 02:37 text

Notice they are the files that differed between their local and remote versions. I found other conflicting files elsewhere dated 2023-05-15 which suggests that these files are created during the regular 14 day reindexing (which I didn't know about; I only found out in the latest release notes).

  1. Run maestral activity in another terminal window. This will show a live view of all sync activity, including anything triggered by local file changes. Then make a change to the local version and see if it is picked up.

I made a change to one of the zip files. No activity was recorded in maestral activity. After a restart, the change was recognized and uploaded (this was not always the case, sometimes the restart didn't help).

  1. Increase the log level to DEBUG with maestral log level DEBUG and start Maestral in the foreground with maestral start -f -v. The -v|--verbose option will result in debug logs being streamed to the terminal. Wait until the initial startup sync is complete and again make local changes. You should now see a detailed log of which file events are picked up and how they are handled. Do you see anything picked up? And if yes, what do conflict checks report?

Nothing happened. It seems like the file events are not recognized.

2023-06-07 20:54:13 sync DEBUG: Waiting for local changes since cursor: 1686163709.704812
2023-06-07 20:54:40 sync DEBUG: Detected remote changes: False
2023-06-07 20:54:40 manager DEBUG: Checking path root...
2023-06-07 20:54:40 dropbox_client DEBUG: Request to users/get_current_account
2023-06-07 20:54:40 manager DEBUG: Path root is up to date
2023-06-07 20:54:40 sync DEBUG: Waiting for remote changes since cursor: AAHZy[...]856A
2023-06-07 20:54:40 dropbox_client DEBUG: Request to files/list_folder/longpoll
jasonsnell commented 1 year ago

I'm seeing something similar, which is that while editing a text file on Dropbox from one computer (using the standard dropbox client), something is happening which is piling up "conflicted copy" versions of that file. There's only one place where the file is being modified, and that's where I'm working. There should be no conflicts. But when Maestral is active on another computer, the conflicted files pile up.

image
redbeam commented 1 year ago

@jasonsnell Is the issue still present in version 1.8.0? This sounds very much like my own experience.

jasonsnell commented 1 year ago

I don't know, after this experience I deleted Maestral and have begun telling people to be wary about installing it.

redbeam commented 1 year ago

That may be a bit harsh, consider that it's free software and provides no warranty. Being cautious of your files is recommended when using this kind of software. On the other hand, the bugs I presented in this issue lead me to temporarily stop using Maestral. Fortunately I don't need to use it at the moment, but that will probably change.