desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Nextcloud Windows Desktop Client sync crashes due invalid modification time of Files

Open ambergerit opened this issue 2 years ago • 25 comments

the Nextcloud Desktop Client didn't sync files, where last modification date is 01.01.1970 and tells "invalid modification time. Not uploaded to the Server". So the 01.01.1970 is a default initialisation date (if no other is available) from many systems. The Files should be syncroniszed with this date, too.

Steps to reproduce

Create a file with random created and last access date (e.g. today, now) and last modification Date at 01. January 1970 01:00:00

Start Nextcloud Desktop Sync Client in actual Version 3.4.3 and try to sync the folder where the file is in to the NC Server (here actual stabile Version 23.0.2).

The Client will give red warnings withe "Filepath\FILENAME.EXT has an invalid modification time. Not uploaded to the Server"

The Nextcloud Logfile on the Client says (i masked the real path of the files with "PATHMASKED"): _

#=#=#=#=# Propagation starts 2022-03-04T08:31:06Z (last step: 12350 msec, total: 12350 msec) ||PATHMASKED/IMG_2576_HEVC.MOV|8|1|0||2777532||2|Die Datei PATHMASKED\IMG_2576_HEVC.MOV hat eine ungültige Änderungszeit. Nicht auf den Server hochladen.|0|0|0|| ||PATHMASKED/IMG_2577_HEVC.MOV|8|1|0||3014659||2|Die Datei PATHMASKED\IMG_2577_HEVC.MOV hat eine ungültige Änderungszeit. Nicht auf den Server hochladen.|0|0|0|| ||PATHMASKED/IMG_2578_HEVC.MOV|8|1|0||3729151||2|Die Datei PATHMASKED\IMG_2578_HEVC.MOV hat eine ungültige Änderungszeit. Nicht auf den Server hochladen.|0|0|0|| ||PATHMASKED/IMG_2579_HEVC.MOV|8|1|0||3249471||2|Die Datei PATHMASKED\IMG_2579_HEVC.MOV hat eine ungültige Änderungszeit. Nicht auf den Server hochladen.|0|0|0|| #=#=#=# Syncrun finished 2022-03-04T08:31:06Z (last step: 146 msec, total: 12497 msec)

_

This is perfectly reproducible on two Windows 11 systems (connected to the same Nextcloud account). I'm using a traditional setup with a single Nextcloud folder that is locally synchronized (no virtual folders).

Expected behaviour Nextcloud uploads the file without a notice, as it did for years.

Actual behaviour Nextcloud did not upload the files and is resyncing to death again and again, because it couldn't upload the files due the old modification date.

Client configuration Client version: 3.4.3 Operating system: Windows 11 (21H2 Build 22000.493) OS language: German Installation path of client: C:\Program Files\Nextcloud

Server configuration Nextcloud version: 23.0.2 Storage backend (external storage): local

ambergerit avatar Mar 04 '22 08:03 ambergerit

see https://github.com/nextcloud/desktop/issues/4016

PhilippSchlesinger avatar Mar 07 '22 16:03 PhilippSchlesinger

No, #4016 is not the same issue. Here if you got a new created file where modofication date is 1970 (as e.g. Did from icloud photo sync client for new downloaded live photos video files) the nc client throughs that error. It is not changing filedates due upload, it didnt even upload the file due modification date is 01.01.1970

ambergerit avatar Mar 07 '22 19:03 ambergerit

No, #4016 is not the same issue. Here if you got a new created file where modofication date is 1970 (as e.g. Did from icloud photo sync client for new downloaded live photos video files) the nc client throughs that error. It is not changing filedates due upload, it didnt even upload the file due modification date is 01.01.1970

It is not a duplicate, but the fixes related to that bug result in the issue you describe.

PhilippSchlesinger avatar Mar 08 '22 09:03 PhilippSchlesinger

Hi @PhilippSchlesinger @ambergerit Link https://github.com/nextcloud/desktop/issues/4188

The issue is reproduced but without marking files with last modification Date at 01. January 1970 01:00:00

The Nextcloud version: Hub II 23.0.2 Desktop client version: 3.4.3 image image

When do create a new folder sync connection it starts to modify metadata of the files instantly. Screenshot 1. Modified seconds ago image

Screenshot 2. Same file properties shows Invalid date image

Screenshot 3. Downloaded file shows modified time as current. image

Screenshot 4. Error in notifications another file from affected batch: image

Screenshot 5. Errors. image

uniuuu avatar Mar 18 '22 07:03 uniuuu

Hi @PhilippSchlesinger @ambergerit Link #4188

The issue is reproduced but without marking files with last modification Date at 01. January 1970 01:00:00

Using find . -type f -newermt "1969-01-01" ! -newermt "1971-01-01" from next workaround https://help.nextcloud.com/t/client-desktop-mac-change-date-to-01-01-1970-after-download/129765/4 I've found that in my case it's also the same issue with modification Date at "Jan 1 1970"

www-data@33fd18776539:~/html$ ls -lha _path-to-file_
-rw-r--r-- 1 www-data www-data 79K Jan  1  1970   _path-to-file_
 
www-data@33fd18776539:~/html$ find . -type f -newermt "1969-01-01" ! -newermt "1971-01-01" | wc -l
185

uniuuu avatar Mar 19 '22 10:03 uniuuu

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

github-actions[bot] avatar Apr 16 '22 16:04 github-actions[bot]

Issue is still not fixed in 3.4.4

ambergerit avatar Apr 16 '22 17:04 ambergerit

Same issue here and i can't fix the invalid timestamps on the server. I am using an external webdav storage (not mine) via Nextcloud server and some files there don't have a modification/creation date. So the Nextcloud server also doesn't provide any modification date to the client.

Nextcloud Client Error: NextcloudClientModificationDateError

Properties of the webdav file in windows file explorer: WEBDAV_INFORMATION_Properties

zimauri avatar Apr 23 '22 09:04 zimauri

Issue is still not fixed in 3.5.0

ambergerit avatar May 13 '22 08:05 ambergerit

Still not fixed in 3.5.1

ambergerit avatar May 26 '22 18:05 ambergerit

As a workaround you may change the modification time of the files:

touch -m -t [[CC]YY]MMDDhhmm[.ss] <FILENAME>

Afterwards scan for changed files using occ command:

sudo -u www-data php occ files:scan --help
  Usage:
  files:scan [-p|--path="..."] [-q|--quiet] [-v|vv|vvv --verbose] [--all]
  [user_id1] ... [user_idN]

Arguments:
  user_id               will rescan all files of the given user(s)

Options:
  --path                limit rescan to the user/path given
  --all                 will rescan all files of all known users
  --quiet               suppress any output
  --verbose             files and directories being processed are shown
                        additionally during scanning
  --unscanned           scan only previously unscanned files

That worked to solve my issue. In case there is a large number of files, you may use find command or something else.

Feuerwehr54 avatar Jun 02 '22 06:06 Feuerwehr54

No thats NOT WORKING in this case. Cause you are on server side, here the problem is on client side. Files are not uploaded due they have a last modification date on 01.01.1970 (like downloads from HEIC-Picture-Movement-Video-files have, if they are downloaded to windows from Apple Cloud for example).

So they didn't get uploaded to nextcloud at all and this is definately a bug, because you cannot change everytime the modificaition date of your files to get them uploaded to the nextcloud. Here the nextcloud client should be fixed by e.g. checking if the date is wrong for him (as it does now) but upload ether maybe by changeing the date or still irgnore it if too far behind...

ambergerit avatar Jun 02 '22 07:06 ambergerit

On my fresh installed windows 10 21H2, latest nextcloud client 3.5.1. with virtual files support and self hosted nextcloud server 24.0.1, this is happening for almost all files when I want to sync. So currently there are no local files.

skoa-h avatar Jun 03 '22 09:06 skoa-h

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

github-actions[bot] avatar Jul 01 '22 16:07 github-actions[bot]

Still Not fixed with actual Version

ambergerit avatar Jul 01 '22 19:07 ambergerit

please fix the problem..........

Dsw77 avatar Jul 07 '22 20:07 Dsw77

https://github.com/nextcloud/desktop/wiki/How-to-fix-the-error-invalid-or-negative-modification-date

szaimen avatar Jul 08 '22 10:07 szaimen

In case you are not able to run that on your own because you do not own the server, you need to contact your provider.

szaimen avatar Jul 08 '22 10:07 szaimen

https://github.com/nextcloud/desktop/wiki/How-to-fix-the-error-invalid-or-negative-modification-date

This is the wrong idea, because it is on servers site. The problem i describe in this ticket is only on client site if you upload a file that has a old modification time as it gets on windows pcs if you download e.g. Icloud files from apple cloud with time shift pictures where the videoparts get modification time 01.01.1970 then they cannot be uploaded to the cloud using the nextcloud desktop client because it says wrong modification date…you cannot fix this at servers site

ambergerit avatar Jul 15 '22 19:07 ambergerit

Still not fixed in 3.5.3

ambergerit avatar Jul 30 '22 10:07 ambergerit

Same here: Still not fixed in 3.5.3

WE ARE LOSING DATA, MEN!

raman777 avatar Jul 30 '22 15:07 raman777

Still not fixed in 3.5.4

ambergerit avatar Aug 10 '22 19:08 ambergerit

still not fixed in: Version 3.5.82 (macOS) (beta channel)

neosec-eu avatar Aug 25 '22 16:08 neosec-eu

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

github-actions[bot] avatar Sep 22 '22 16:09 github-actions[bot]

Still not fixed in 3.6.0

ambergerit avatar Sep 22 '22 18:09 ambergerit

I don't think it's a problem that has its root in wrong modification times.

IMHO the screenshot of @uniuuu shows the root cause: Windows is complaining that "This file came from another computer..." and blocks access to the file as well as to its metadata. Not seeing any valid metadata, the NC client assumes a modification date of epoch, i.e., time stamp 0.

Hence, the problem that has to be fixed is letting Windows unconditionally trust the files the NC client pulls from the server.

tkurbad avatar Sep 28 '22 08:09 tkurbad

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

github-actions[bot] avatar Oct 26 '22 16:10 github-actions[bot]

Still Not fixed :(

ambergerit avatar Oct 26 '22 18:10 ambergerit

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

github-actions[bot] avatar Nov 24 '22 00:11 github-actions[bot]

This issue is still not fixed. Ubuntu snap nextcloud latest version. Windows client latest version.

Dsw77 avatar Nov 24 '22 06:11 Dsw77