desktop icon indicating copy to clipboard operation
desktop copied to clipboard

macOS: When moving a folder into a Nextcloud directory, files within subfolders will not sync

Open briankendall opened this issue 7 years ago • 5 comments

This is quite a serious bug, especially since macOS bundles will not sync correctly when they're moved into the Nextcloud directory.

Expected behaviour

When moving a folder into my Nextcloud directory, all files contained with subfolders should be synced.

Actual behaviour

Any files contained within a subdirectory are not synced

Steps to reproduce

  1. Setup Nextcloud desktop in macOS (has been reproduced in 10.14.6)

  2. Execute the following terminal commands to create a folder with a subdirectory and some files and move it into the Nextcloud directory, replacing /path/to/Nextcloud with the path of the Nextcloud directory:

     mkdir test
     echo data > test/file.txt
     mkdir test/subdir
     echo moredata > test/subdir/missing_file1.txt
     echo stillmoredata > test/subdir/missing_file2.txt
     mv test /path/to/Nextcloud
    
  3. Wait for Nextcloud Desktop to sync

  4. Use the Nextcloud web interface to see what files were actually synced

  5. Note that missing_file1.txt and missing_file2.txt are not synced!

Some more noteworthy info:

This appears to be a macOS only bug. I cannot reproduce it in Windows. (I have not tried in Linux.)

Moving test into the Nextcloud directory using the Finder also triggers the bug.

I can work around the bug by copying a folder into my Nextcloud directory instead of moving it.

I can also force Nextcloud to sync the missing files by using touch to change their modification dates, e.g.: find /path/to/Nextcloud/test -exec touch {} \;

Client configuration

Client version: Version 2.6.1stable (build 20191105).

Operating system: macOS 10.14.6

OS language: English

Installation path of client: /Applications/nextcloud.app

Server configuration

Nextcloud version: NextcloudPi docker v1.17.1

Logs

  1. Client logfile:

https://gist.github.com/briankendall/f0b926010333211d1166fea48abd58dd Contents of log directly after moving test into the root of my Nextcloud directory. (Server URL has been redacted. Path to my Nextcloud directory has been replaced with /path/to/Nextcloud.)

  1. Web server error log:

/var/log/apache2/error.log contains no recent entries, including for today

/var/log/apache2/nc-error.log contains no recent entries, and nothing is logged when I trigger the bug

Here are the lines that appear in nc-access.log when I trigger the bug by moving test into the root of my Nextcloud directory: https://gist.github.com/briankendall/199aed9e42b9bafc934e0c81677818f5

  1. Server logfile: nextcloud log (data/nextcloud.log):

The following gets added to nextcloud.log when I move test into the root of my Nextcloud directory: https://gist.github.com/briankendall/da6347d9cb1da16f72e014ca99b17087

briankendall avatar Nov 20 '19 06:11 briankendall

Can confirm that the issue also exists on my mac: macOS 10.15.2 Nextcloud client: 2.6.2stable (build 20191224) Nextcloud server: 17.0.2

When I copy the content of the folder, then it works.

At this moment I cannot recommend Nextcloud to any clients as it is a very severe bug AND it is well-known since October 2019 and no one seems to care.

manueldotai avatar Jan 28 '20 10:01 manueldotai

Can confirm this issue! I think it's quite a severe bug and needs some attention!

I found this problem when analysing issues with deleted files in nextcloud (files deleted in storage, but still shown in browser -> files do exist in filecache table, but do not exist in storage). All macOS environment. This bug may be one reason for these often seen and very annoying problems, which cause broken syncs.

More Info: If nested folders are moved in finder into the synced nextcloud folder: 'nested_folder/nested_folder1/nested_folder2/nested_folder3/files' -> synced is only 'nested_folder/nested_folder1/' (only first subfolder without content) When the folder containing subfolders and data is copied (instead of moved) everything works as it should.

Client: macOS 10.14.6 (same problem macOS 10.13) with APFS Nextcloud Client: Version 2.6.2stable (build 20191224) Nextcloud Server: Nextcloud 17.0.2 (Same problem Nextcloud 16.0.7)

Edit: After a system reboot (macOS) I tried to reproduce the behavior but everything worked normal - after some minutes of moving and copying to the synced folder the issue occured again as described.. Nested folders to reproduce the issue: nested__00.zip

To reproduce: Move nested folders into nc-syncfolder - sync works first time correctly - move nested folders to desktop, sync, move nested folders back to nc-syncfolder -> incomplete sync occurs.

Logfiles sync-client: Move to nc-syncfolder

#=#=#=# Syncrun started 2020-01-29T15:46:56Z
#=#=#=#=# Propagation starts 2020-01-29T15:46:56Z (last step: 270 msec, total: 270 msec)
15:46:56||nested__00|INST_NEW|Up|1580312308||128|144082106oceec8726cce|4||201|0|0||||
15:46:57||nested__00/nested__01|INST_NEW|Up|1580312357||128|144082107oceec8726cce|4||201|0|0||||
#=#=#=# Syncrun finished 2020-01-29T15:46:57Z (last step: 772 msec, total: 1042 msec)

Delete from nc-syncfolder

#=#=#=# Syncrun started 2020-01-29T15:47:25Z
#=#=#=#=# Propagation starts 2020-01-29T15:47:25Z (last step: 601 msec, total: 601 msec)
15:47:25||nested__00|INST_REMOVE|Up|1580312817|5e31a8f1641b9|0|144082106oceec8726cce|4||204|0|0||||
#=#=#=# Syncrun finished 2020-01-29T15:47:26Z (last step: 356 msec, total: 958 msec)

Copy to nc-syncfolder

#=#=#=# Syncrun started 2020-01-29T15:47:50Z
#=#=#=#=# Propagation starts 2020-01-29T15:47:51Z (last step: 700 msec, total: 700 msec)
15:47:51||nested__00|INST_NEW|Up|1580312308||128|144082126oceec8726cce|4||201|0|0||||
15:47:51||nested__00/nested__01|INST_NEW|Up|1580312357||128|144082127oceec8726cce|4||201|0|0||||
15:47:51||nested__00/nested__01/nested__02|INST_NEW|Up|1580312357||128|144082128oceec8726cce|4||201|0|0||||
15:47:51||nested__00/nested__01/nested__02/nested__03|INST_NEW|Up|1580312363||128|144082129oceec8726cce|4||201|0|0||||
15:47:51||nested__00/nested__01/nested__02/nested__03/nested__04|INST_NEW|Up|1580312363||128|144082130oceec8726cce|4||201|0|0||||
15:47:52||nested__00/nested__01/nested__02/nested__03/nested__04/nested__05|INST_NEW|Up|1580312369||128|144082131oceec8726cce|4||201|0|0||||
15:47:52||nested__00/nested__01/nested__02/nested__03/nested__04/nested__05/nested__06|INST_NEW|Up|1580312369||128|144082132oceec8726cce|4||201|0|0||||
15:47:52||nested__00/nested__01/nested__02/nested__03/nested__04/nested__05/nested__06/nested_07|INST_NEW|Up|1580306196||96|144082133oceec8726cce|4||201|0|0||||
15:47:52||nested__00/nested__01/nested__02/nested__03/nested__04/nested__05/nested__06/nested_07/nested_08|INST_NEW|Up|1580306196||96|144082134oceec8726cce|4||201|0|0||||
15:47:52||nested__00/nested__01/nested__02/nested__03/nested__04/nested__05/nested__06/nested_07/nested_08/nested_09|INST_NEW|Up|1580306196||96|144082135oceec8726cce|4||201|0|0||||
15:47:53||nested__00/nested__01/nested__02/nested__03/nested__04/nested__05/nested__06/nested_07/nested_08/nested_09/nested_10|INST_NEW|Up|1580306196||96|144082136oceec8726cce|4||201|0|0||||
15:47:53||nested__00/nested__01/nested__02/nested__03/nested__04/nested__05/nested__06/nested_07/nested_08/nested_09/nested_10/nested_11|INST_NEW|Up|1580306196||96|144082137oceec8726cce|4||201|0|0||||
15:47:53||nested__00/nested__01/nested__02/nested__03/nested__04/nested__05/nested__06/nested_07/nested_08/nested_09/nested_10/nested_11/nested_12|INST_NEW|Up|1580306196||96|144082138oceec8726cce|4||201|0|0||||
15:47:53||nested__00/nested__01/nested__02/nested__03/nested__04/nested__05/nested__06/nested_07/nested_08/nested_09/nested_10/nested_11/nested_12/nested_13|INST_NEW|Up|1580306346||96|144082139oceec8726cce|4||201|0|0||||
15:47:53||nested__00/nested__01/nested__02/nested__03/nested__04/nested__05/nested__06/nested_07/nested_08/nested_09/nested_10/nested_11/nested_12/nested_13/sbb.ch.URL|INST_NEW|Up|1580306291|9c605b0e5388f9ee23e20874040e0744|40|144082140oceec8726cce|4||201|0|0||||
#=#=#=# Syncrun finished 2020-01-29T15:47:54Z (last step: 3075 msec, total: 3775 msec)

jbrrrr avatar Jan 29 '20 11:01 jbrrrr

For what it's worth, I've also reproduced this issue in macOS 10.12.6 with an HFS+ formatted drive, so it's not specifically an issue with APFS.

I don't mean to be pushy, but I really hope we get some response from the devs about this soon. This is a really, really critical bug that makes Nextcloud downright dangerous to use in macOS. Just moving any file that's a bundle, be it an application, framework, a project file from something like Xcode or Logic Pro X, or just a simple folder will cause syncing to silently fail with no clear way to fix it. If someone doesn't realize what's going on and god forbid deletes the complete version of an improperly synced folder or bundle they may experience significant data loss.

briankendall avatar Jan 29 '20 16:01 briankendall

I've had the same issue. Could any of the developers please give an update?

tschuele avatar Feb 06 '20 08:02 tschuele

By the way: A simple restart of the sync client solves the problem. [quit and start] This is probably the reason why this bug does not lead to large data losses. After a restart of the client(-computer), the incomplete synchronization will be performed correctly again.

Additional info: SyncClient Version 2.3.3 (build 4) (macOS 10.13.6) works without errors and does not show the behaviour described in this issue.

jbrrrr avatar Feb 12 '20 07:02 jbrrrr