nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
3.05k stars 801 forks source link

[Bug]: creating a new folder in dir1 und move all files from dir1 into this newly created folder will delete all the moved files #6151

Open Githopp192 opened 1 year ago

Githopp192 commented 1 year ago

⚠️ Before submitting, please verify the following: ⚠️

Bug description

creating a new folder in dir1 und move all files from (except dir folder) dir1 into this newly created folder will delete all the moved files

Virtual Agent is ACTIVE for this client (Windows System)

Steps to reproduce

  1. Windows Explorer: Navigate to folder "dir1"
  2. when in - create a new folder "newfolder"
  3. move all files in dir1 (execpt dir1 of course) into newfolder
  4. there are no more files in dir1 (exptected)
  5. list content of newfolder - newfolder is empty - so ALL FILES ARE GONE !
  6. login to the WEB (Edge Browser)
  7. all moved files are deleted, newfolder is empty too !
  8. check contents of Recycle bin - the just moved files are there

Expected behavior

Which files are affected by this bug

folder: newfolder

Operating system

Windows

Which version of the operating system you are running.

Windows 11 Home 22H2

Package

Other

Nextcloud Server version

26.05

Nextcloud Desktop Client version

Version 3.10.0, windows-10.0.22621

Is this bug present after an update or on a fresh install?

Updated from a minor version (ex. 3.4.2 to 3.4.4)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

Nextcloud Server logs

No response

Additional info

No response

Githopp192 commented 1 year ago

happenend again today - now being on NC 27.1.2 and Windows Desktop 3.10.1

This Agent has the "Virtual Agent" active.

Scenario: (affected file: IMG_0600.jpg) see the log entries below

I think - if users are copying thousands of files and the users are not aware of this behave/bug - this can lead to data loss !

Githopp192 commented 1 year ago

2023-10-31 20:33:35:003 [ info nextcloud.sync.discovery C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\discovery.cpp:464 ]: Processing "Photos/Events/directory/IMG_0600.jpg" | (db/local/remote) | valid: true/true/true | mtime: 1698779990/1698779990/1698779990 | size: 3202729/3202729/3202729 | etag: "2394e8dc930494944ca38384b08883"//"2394e8dc930494944ca38384b08883" | checksum: ""//"" | perm: "WDNVR"//"WDNVR" | fileid: "28383833oxnucdewanh"//"28383833oxnucdewanh" | type: CSyncEnums::ItemTypeFile/CSyncEnums::ItemTypeFile/CSyncEnums::ItemTypeFile | e2ee: false/false | e2eeMangledName: ""/"" | file lock: not locked//not locked | metadata missing: /false/

2023-10-31 20:32:49:306 [ info nextcloud.gui.shellextensions.server C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\shellextensionsserver.cpp:126 ]: "Photos/Events/directory/IMG_0600.jpg" record._lastShareStateFetchedTimestamp has less than 120000 ms difference with QDateTime::currentMSecsSinceEpoch(). Returning data from SyncJournal.

GHBLoos commented 7 months ago

I have experienced the same issue multiple times. When moving a folder or multiple files on a desktop comptuer, they sometimes are deleted. They are moved to the NC recycle bin. I have two ideas that may initiate the problem:

NC 28.0.3

GHBLoos commented 5 months ago

Same issue described here: https://help.nextcloud.com/t/virtual-files-deleted-after-moving/115814/2

camilasan commented 5 months ago

Is this reproducible with 3.13? Does it happen in a subfolder of a groupfolder?

GHBLoos commented 5 months ago

Yes, this is reproducable on one of my computers (the others work fine).

NC 28.04 Desktop client 3.13 Using virtual files on Windows

Steps

Step 1: use windows file explorer to create Folder_1 on root level Step 2: use windows file explorer to create Folder_2 on root level Step 3: use nextcloud web interface to upload a file in Folder 1 Step 4: after windows desktop has synced, drag the uploaded file from Folder_1 to Folder_2

Result

The file is deleted / moved to the trash bin on Nextcloud (see the web interface) In windows file explorer the file is still in Folder_2, with status syncing. Nextcloud desktop seems to be stuck now, because new files are no longer synced. Closing and starting Nextcloud is needed to get it working again

image

I am not using group folders, because at first I thought the issue was related to group folders. But I think the issue is both on personal files as on group folders.

GHBLoos commented 4 months ago

@camilasan : are you able to reproduce the bug?

JohanBoshoffWebAware commented 4 weeks ago

Any update on this? The issue is still happening even on Desktop Client 3.14.1 and Nextcloud 28.0.8. Is there a fix for this yet or a workaround?

prilly-dev commented 4 weeks ago

I have this issue with desktop client 3.14.1 and nextcloud 30.0.1

GHBLoos commented 4 weeks ago

I have three computers (2 x W10 and 1 x W11) with the same NC client and they all are using the same NC server. One of the computers has this issue (W10). The others don't. So I guess it has something to do with the setup or configuration of Windows in combination with the client. I reinstalled the client on the computer that has the issue, but that didn't work. Apart from the issue above, I also notice that sometimes a new, copied file is not synchronized (the status is that it has to be syncrhonized with the two arrows in a circle). But if I change the name, it starts synchronizing. Also restarting nextcloud makes the synchonization of these files start. I had the idea that this might be a conflict with MS OneDrive. I disabled the startup of OneDrive when windows starts, but that didn't make a difference. This issue makes it impossible to use NC client on the computer, which to me is the way to work with files. Hopefully the problem will be found soon. If I can test anything, let me know.

prilly-dev commented 4 weeks ago

In my case its W11