Skip to content
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

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

Closed
ambergerit opened this issue Mar 4, 2022 · 39 comments

Comments

@ambergerit
Copy link

ambergerit commented Mar 4, 2022

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 ambergerit added the bug label Mar 4, 2022
@PhilippSchlesinger
Copy link

see #4016

@ambergerit
Copy link
Author

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

@PhilippSchlesinger
Copy link

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.

@uniuuu
Copy link

uniuuu commented Mar 18, 2022

Hi @PhilippSchlesinger @ambergerit
Link #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
Copy link

uniuuu commented Mar 19, 2022

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

@github-actions
Copy link

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 github-actions bot added the stale label Apr 16, 2022
@ambergerit
Copy link
Author

Issue is still not fixed in 3.4.4

@github-actions github-actions bot removed the stale label Apr 17, 2022
@zimauri
Copy link

zimauri commented Apr 23, 2022

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

@ambergerit
Copy link
Author

Issue is still not fixed in 3.5.0

@ambergerit
Copy link
Author

Still not fixed in 3.5.1

@Feuerwehr54
Copy link

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.

@ambergerit
Copy link
Author

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...

@skoa-h
Copy link

skoa-h commented Jun 3, 2022

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.

@github-actions
Copy link

github-actions bot commented Jul 1, 2022

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 github-actions bot added the stale label Jul 1, 2022
@ambergerit
Copy link
Author

Still Not fixed with actual Version

@github-actions github-actions bot removed the stale label Jul 2, 2022
@Dsw77
Copy link

Dsw77 commented Jul 7, 2022

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

@szaimen
Copy link
Contributor

szaimen commented Jul 8, 2022

@szaimen
Copy link
Contributor

szaimen commented Jul 8, 2022

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.

@ambergerit
Copy link
Author

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
Copy link
Author

Still not fixed in 3.5.3

@raman777
Copy link

Same here: Still not fixed in 3.5.3

WE ARE LOSING DATA, MEN!

@ambergerit
Copy link
Author

Still not fixed in 3.5.4

@neosec-eu
Copy link

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

@github-actions
Copy link

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!

@ambergerit
Copy link
Author

Still not fixed in 3.6.0

@github-actions github-actions bot removed the stale label Sep 23, 2022
@tkurbad
Copy link

tkurbad commented Sep 28, 2022

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.

@github-actions
Copy link

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 github-actions bot added the stale label Oct 26, 2022
@ambergerit
Copy link
Author

Still Not fixed :(

@github-actions github-actions bot removed the stale label Oct 27, 2022
@github-actions
Copy link

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 github-actions bot added the stale label Nov 24, 2022
@Dsw77
Copy link

Dsw77 commented Nov 24, 2022

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

@github-actions github-actions bot removed the stale label Nov 24, 2022
@github-actions
Copy link

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 github-actions bot added the stale label Dec 22, 2022
@Dsw77
Copy link

Dsw77 commented Dec 22, 2022

This bug is still not fixed.
Windows 11 client, standard setup.
Ubuntu with Nextcloud Snap 24.8

@github-actions github-actions bot removed the stale label Dec 23, 2022
@github-actions
Copy link

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 github-actions bot added the stale label Jan 20, 2023
@ambergerit
Copy link
Author

Still Not fixed in actual Nextcloud Windows Desktop Client

@github-actions github-actions bot removed the stale label Jan 20, 2023
@flurmind
Copy link

flurmind commented Feb 10, 2023

The same problem! Not fixed!
NC client for windows 3.7.3.
NC server Nextcloud Hub 3 25.0.3
In web-app: when I try to put files with old date (30.03.1601) into nextcloud, I get an error (but the file is loaded and NC modifies the file time to the current date!):
InvalidArgumentException: X-OC-MTime header must be a valid positive integer /config/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php - line 424: OCA\DAV\Connector\Sabre\MtimeSanitizer::sanitizeMtime() /config/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php - line 378: OCA\DAV\Connector\Sabre\Node->sanitizeMtime() /config/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 151: OCA\DAV\Connector\Sabre\File->put() /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1098: OCA\DAV\Connector\Sabre\Directory->createFile() /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 504: Sabre\DAV\Server->createFile() /config/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89: Sabre\DAV\CorePlugin->httpPut() /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 472: Sabre\DAV\Server->emit() /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 253: Sabre\DAV\Server->invokeMethod() /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 321: Sabre\DAV\Server->start() /config/www/nextcloud/apps/dav/appinfo/v1/webdav.php - line 85: Sabre\DAV\Server->exec() /config/www/nextcloud/remote.php - line 171: require_once("/config/www ... p")

In windows app: the file is not loading and I get an error (cyclically):
......has invalid modified time. Do not upload to server
In web-app (on server) logs are missing, so this is a problem of the client for windows! Please fix!

@github-actions
Copy link

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 github-actions bot added the stale label Mar 10, 2023
@ambergerit
Copy link
Author

Still Not fixed :(

@github-actions github-actions bot removed the stale label Mar 10, 2023
@github-actions
Copy link

github-actions bot commented Apr 8, 2023

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 github-actions bot added the stale label Apr 8, 2023
@github-actions
Copy link

This bug report is getting automatically closed due to no answer since the issue has been staled. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests