Dear nextcloud community,
a few days ago, my windows desktop sync stopped working after working like a charm for months. It is user specific, the other users do not have any problems when synchronizing with their clients.
From my ~100000 files, i get the error “could not update metadata due to invalid modification time: 0” about 40 000x (see image)
Does anyone have a solution for this issue? I tried to uninstall the clients from all pc’s and phones, including the appdata-files. When reinstalling, I always get the same problem again. Also the same when i try to install it on a fresh machine.
Thanks a lot in advance!
Alex
EDIT: Installed client version 3.3.6, everything works fine again.
Same problems here. The problem started after 3.4.0 update. Currently there is hundreds deletet files in trash, and some of there seems to be unable to restore, because invalid modified time for …
however I tried this already, and no files found with those timestamps. As I mentioned in my other post, all timestamps on the file is “marts 03 2022”, and the filesync still report an error.
i just tried the find command " find . -type f -newermt “1969-01-01” ! -newermt “1971-01-01”
" - without the “delete option” afterwards, and still no files found with this timestamp
Perhaps i need to mention that those files are located on an external share which is mounted using nextcloud mount option. I did run this command on the fileserver itself where the files are based and no files with this timestamp located.
PowerShell command for updating modification date with creation date:
Get-ChildItem -Force -Recurse "C:\Users\michael\Desktop\test" * | ForEach-Object -Begin{$count=0} -Process{++$count} -End{"--- Count: $count (files and folders)"} { if ($_.LastWriteTime -lt (get-date 1970-01-02)){ Write-Host 'Process ' $_.FullName; try{ $_.LastWriteTime = $_.CreationTime; Write-Host ' -> updated to ' $_.CreationTime } catch { Write-Host ' -> ERROR!' } } else { Write-Host 'Nothing to do for ' $_.FullName } }
NOTE:
Replace the directory path with your directory.
I replace the last modified-date with creation-date since all my files had accurate creation dates and it is better to keep the file history.
In case your files are also missing a proper creation date, then you could use $_.LastWriteTime = (Get-Date) instead of $_.LastWriteTime = $_.CreationTime.
I just created a help.nextcloud account so I could thank you for this, your script was perfect and exactly what I needed to solve the problem. Thank you!