-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Some virtual files cannot be sync'd: "Conflict when uploading a file. It's going to get removed!" #4636
Comments
I have also seen the same error today, but when renaming files. After the files in a folder have been renamed, they returned to their previous name. If I try to rename them again, the same happens. However, that not happened on other almost identical folders in the same path. |
I also have this problem, some users are reporting this issue on my nc, I'm not sure what is going on, no logs apparently, it just send this message and auto delete the files. Using Nextcloud Desktop 3.5.2 (server is 24.0.2) but happens some months already (or at least since that file timestamp bug that removed many files). It happens also when creating folders too, it creates a folder, then trigger this and auto delete the folder, sometimes creating new folders get same result, sometimes not, changing name of created folder stop the bahavior, sometimes not, or creating outside the folder tree. I can find the files in trash and recover in most times. I'll try to find some info on log if triggers again and post here. |
Same issue i think. I created this ticket a while back and bot closed it ;( #4269 |
You should delete that image... it's not really yours by the name of it... otherwise just grab from your Adobe Account as you had bought it, isn't? Moving to the topic, can't really find any info on this on the logs, if I can find I'll post here. |
Confirming that I've seen (am seeing) a similar behavior on Windows. I created a file at 16:30, then modified it until 17:10, the file never showed a check-mark icon and when it finally did, it was back to the 16:30 version. Windows notifications are full of UpdateI was able to recover the file by stopping sync, disabling virtual file support, and re-synching. It then showed me unresolved conflicts for this file: |
Can confirm I’m also seeing this issue with my Raspian 32bit build. I find that “removed conflicts” are sent to my trash bin thankfully, but in the past, with the trash disabled, it’s gone for good. |
I also faced same problem with V3.5.4 on windows11. |
The part which causes all the trouble is in libsync, more specifically in a lambda function in discovery.cpp. Corresponding translations of the error message are here: e.g de, ... The place where things get deleted (why???) should only be reached for new files and renames, which perfectly matches the description of this issue. Furthermore there is some note in the code // TODO: We may want to execute the same logic for non-VFS mode, as, moving/renaming the same folder by 2 or more clients at the same time is not possible in Web UI.
// Keeping it like this (for VFS files and folders only) just to fix a user issue. This also explains why this happens only if VFS is used. And there is some user issue mentioned. The whole stuff got "recently" changed with pull request 3449 by @allexzander and @mgallien. I don't know how the Nextcloud Client works in detail, but it could be that the symptoms of the present issue is some sort of regression of those changes or likely in combination with yet another change. I'd really appreciate if either @allexzander or @mgallien could comment on this. |
Any chance you could come up with steps that always trigger the issue? |
I'm sorry for late. not always, I think so I can't tell the bug reproduces but just one of possibility. |
@allexzander the way ive seen this issues come up with me is if i have a folder with alot of files and i drag and drop them into the nc dir and files are gone. I just did it right now and all files got removed |
@allexzander I was able to replate it and I got some logs for you please see attached |
Yesterday I've moved on windows explorer one folder inside another (double click mouse madness) then I've tried to move back the folder to the right place after a few seconds and got all files with same error (conflict it will be deleted thing). So | /originalfolder -> moved to /wrong/originalfolder (all fine no error). No files in trash but after investigating found them in /originalfolder (on the server and missing from nc desktop or web cloud) so a occ files:scan for the folder worked and all went back. NC Desktop: 3.6.0 Logs from the moment: |
Yes, i would agree. Maybe an option once the desktop client detects that there's a conflict and its going to get removed there's a user prompt to keep it and try to resync the files instated of removing them Maybe something like Keep & Resync or Remove button |
@claucambra @camilasan can we have an update on this issue please? |
I have experienced the same issue (with several recent versions of the sync client) and NC 24.0.5. The server resides on EC2 with external Azure filestore and S3 attached. At any given time there's a minimum of 32 virtual sync clients, up to 50, attached. There's ~ 2.5T, mostly images and drone footage totaling ~ 700K files. If a mistake is made while files are uploaded and the error corrected (ie. renaming or moving files), the offending client errors with "conflict when uploading a file. It's going to be removed". All other client error with sync conflicts. Depending on the HW resources of the client machine, it can render the system useless. In many cases, the sync client crashes/resets and forces a re-scan, which places enormous load on the server. In the case where files have been deleted from Azure, the DB records still exist. Thus, various clients and web interface still displays references, as if the files still exist. |
I have a similar issue. NC 25.0.1 / Client version 3.6.2 on macOS, virtual files enabled. |
I've had the problem minimum twice (also today), but in Windows and without virtual files.
-- Translation of the screenshot, from bottom up: "You created whateverfolder." (the Folder) -- But it also says: "You deleted whateverfile.mp4". Why that? And I think that's very problematic because then the files are just gone. I didn't copy it, moved it in. So, as I said, the file is simply gone, because it wasn't a copy. This shouldn't happen and is very annoying. Why can the client even completely delete files? Not even in the trash? What? Thanks in advance for looking into this and helping! |
This comment was marked as off-topic.
This comment was marked as off-topic.
So, I can see the root cause when performing a move of a folder with many files while the previous move has not been completed yet. Here is what happens:
Possible solutions:
In a nutshell, possible solutions are either to try to update the local database for all the nested items (there can be thousands and more files) in one SQL query, or, limit the freedom of multiple moves (renames) such that the user can not mess with folder locations until the move has completed. Correct me if I am wrong, but after studying all replies, I am coming to a single use-case for this issue (that I can reproduce) - moving a folder with many files multiple times while the previous sync is still running. Workaround: Not really a workaround, but, a recommendation until this is fixed - to not move folders too quickly, while the previous move is not finalized yet. For the future: I also have the idea that setting file records to the local database needs optimization such that if we are syncing with VFS mode for the first time we would not spend too much time inserting every record into the database, which would speed up the initial sync as files are not downloaded to disk. This, however, might become an issue if the client is killed/crashed in the middle of such sync. @mgallien @camilasan @claucambra Any other ideas? |
Not yet in a 100% working state (placeholder can't be hydrated without client restart after move, possibly need to handle placeholder update after move differently with new database logic code). The idea with mass update of all nested items recursively works with custom SQL function and UPDATE query https://github.com/nextcloud/desktop/tree/feature/single-sql-query-on-move. Move is now really fast to reflect in the database (a 1000 files is move recorded in just 3-5 seconds instead of moving them one by one that takes X amount of time depending of number of items). |
As for the scenario of a new folder just moved from a non-Nextcloud folder, I could not reproduce it. But I have an idea of how to prevent this from happening. Now we create file records in the local db only after a new file/folder gets uploaded with success from the server. Maybe we can change this, and first create a db record like we already know about the new directory and all its items we just moved to the Nextcloud sync folder, and introduce a state column in the DB, like "LocalNew", or "LocalNewPendingUpload", then, if anything happens - like an error on the server or Cf API error, we will have a record in the local DB it will prevent corresponding files/folders from removal? |
I've done a few tests and I think that binary content is the most decisive factor: Cases that do not cause the bug:
Cases that do cause the bug:
The last test case is very disturbing. Of course, there's no special added server-side processing (such as anti-virus), all the files in the test case were in the same sourced folder and moved/copied to the same Nextcloud virtual folder. Windows Desktop Client 3.12.1 Edit: 302Mio zip file works too |
Yeah that makes sense - it seems that most of the files I've lost were That being said, I have had some issues with plain text files too, but |
Hello I happend to face this situation again. |
This is really bad. The software is literally erasing peoples data without even asking or taking a backup. This ticket should be treated as a priority ASAP. |
I renamed a folder that had photos in it. I say 'had' because now all the photos in the explorer folder are gone. Using windows sync app 3.13, Nextcloud 28.0.5. Renamed the folder in Explorer, then the sync app threw the notice as per title, "Conflict when uploading a file. It's going to get removed!". I checked the folder, and there were no files listed. I created a Debug Archive, but will not attach here. I then checked via the web UI, in chrome, and the files are there. I right-click and "Move or Copy", and then it proceeds to copy into the same folder name, but with "(copy)" appended. I checked Explorer, and sure enough all the files in the copied version populated in the nextcloud sync app. I'll come back and edit if anything changes after a restart. Edit: |
Happened today (xcp-ng-8.2.1-20231130.iso), i can't check my logs rn but here it is : https://pastebin.com/SV7VAq9d (unmodified) It happened by the past and I lost some of my files by uploading them as they wasn't backed up yet. (Files are not recoverable on the WebUI nor Windows Recycle Bin, and are not on the server disk) Here's some of it :
|
I can't reproduce anymore (Desktop client 3.15.0) |
Bug description
After having uploaded a few thousand JPG images from another computer (Windows 10) without issue, when these changes have been synchronized to my Linux laptop (Kubuntu 22.04) with virtual files enabled, all the files in some specific subdirectories disappearing after the client (v 3.5.1), while showing the message "Conflict when uploading a file. It's going to get removed!" for each one of them. See attached screenshot:
As I mentioned, only files in a few subdirectories have disappeared, but no from others. I can't find a reasonable pattern.
These files have only been deleted from the local machine, but remain in the server and in the Windows PC, so I believe it's an issue linked with the desktop client in the linux machine.
One more thing, these files are stored in an external storage and accessed via SMB.
Steps to reproduce
Expected behavior
All files from the server should appear in the client directory tree.
Which files are affected by this bug
No clear pattern. All affected files were .JPG
Operating system
Linux
Which version of the operating system you are running.
Kubuntu 22.04
Package
Distro package manager
Nextcloud Server version
23.0.2
Nextcloud Desktop Client version
3.5.1
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 relevant logs in the server. The issue seems to be exclusively from the side of the client.
Additional info
(I can provide the Debug Archive log if necessary, but the file is more than 500MB in size and contains lots of sensitive information)
The text was updated successfully, but these errors were encountered: