This is 100% repeatable both my client Nextcloud instance and on my lab environment. In a perverse way, I’m pleased I’m managing to repeat it in my lab as that means is support want to engage, I can try various things.
As I’ve mentioned elsewhere, my main Nextcloud client has sadly reached the end of their tether and has asked me to migrate it to SharePoint. A fun task in itself. But a core way to do this is to use robocopy to copy from the Nextcloud sync folder to the OneDrive sync folder - and spend a lot of time looking at downloads & uploads. 600GB to copy here.
I started with a relative small folder containing 961MB in 2,643 files. Small enough to allow my script to be tested but big enough to stress is.
Observation: Nextclient client kept crashing during the execution of a command like this:
robocopy “E:\Data\Nextcloud\Malt\Test1” “E:\Temp\Test1” /ndl /xj /mt /r:0 /np /mir /copy:DTA
A pretty innocuous robocopy command used many times by IT people over the years. What happens is that it merrily starts copying but after a while robocopy starts throwing up “The cloud file provider exited unexpectedly” errors and the Nextcloud client crashes/exits. Note that I gave up copying to OneDrive - just copying here to a local drive on my PC.
If I restart Nextcloud and re-run the command, a few more files are copied. Repeated it several times - doesn’t always crash at the same place.
If I tell Nextcloud to keep all the files in Test1 first, the copy works fine. The problem only occurs when the files copied are been downloaded first by Nextcloud.
I can’t supply logs right now because the folder I’m copying is actually a very sensitive folder. Even the folder and file names are sensitive. However, I’ve just spent an hour or so writing a PowerShell script that replaces the contents with random data and scrambles the file/folder names. Once I’ve worked out how to zap all previous logs, I’ll supply the logs.
This isn’t the first time I’ve seen Nextcloud client randomly crashing when lots activity is carried out.
I’m going to repeat the test without the /MT flag - that causes robocopy to use multiple threads to copy multiple files at once.