ios
ios copied to clipboard
Sync Eror: X-OC-MTime header must be a valid positive integer
Steps to reproduce
Error appears when trying to sync files, not all files seem to be affected, but hundreds are. Not sure whats in common. Only uploading photos from camera roll.
Actual behavior
internal server error X-OC-MTime header must be a valid positive integer
Screenshots

Logs
Server Logs
[webdav] Error: InvalidArgumentException: X-OC-MTime header must be a valid positive integer at <<closure>>
0. /config/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php line 424
OCA\DAV\Connector\Sabre\MtimeSanitizer::sanitizeMtime()
1. /config/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 378
OCA\DAV\Connector\Sabre\Node->sanitizeMtime()
2. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1137
OCA\DAV\Connector\Sabre\File->put()
3. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 492
Sabre\DAV\Server->updateFile("*** sensitive parameters replaced ***")
4. /config/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
Sabre\DAV\CorePlugin->httpPut()
5. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
Sabre\DAV\Server->emit()
6. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
Sabre\DAV\Server->invokeMethod()
7. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
Sabre\DAV\Server->start()
8. /config/www/nextcloud/apps/dav/lib/Server.php line 360
Sabre\DAV\Server->exec()
9. /config/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
OCA\DAV\Server->exec()
10. /config/www/nextcloud/remote.php line 171
require_once("/config/www/nex ... p")
Environment data
iOS version: e.g. iOS 16.3.1
Nextcloud iOS app version: 4.8.0.5
Server operating system: Unraid/ Docker
Web server: Nginx
Database: Type: mysql Version: 10.11.2
PHP version: Version: 8.1.17
Nextcloud version: see Nextcloud admin page 25.0.4
Fixed NextcloudKit 2.4.0
@marinofaggiana does reference the following? https://github.com/nextcloud/NextcloudKit/pull/28/commits/915441859529c472aca149140e34f1d7ca4d2534
I'm not a swift developer, but I'm not seeing any reference to a time header. Also, if it's another commit that I'm not seeing here, when would this make it's way to the iOS app?
If it helps at all, the left is an image that DID load just fine, and the right is an image that has the X-OC-MTime issue. The difference here is the left photo was taken with this iOS device, and the right was not, but was loaded into the iCloud. This seems consistent with all of the errors.
The bug persists.
iOS app 4.8.6.4 Nextcloud 27.0.2
A bit unclear here mid-operation: Is this resulting in failed transfers? I intend to fix fs timestamps post-upload anyway, but this is part of a migration and I would hate to in a couple of years discover that this bug cost us precious family photos.
Issue is still happening for me too…
I still have this error
And yet this issue is still closed, might be good to make a new one @devonkinghorn , not sure the devs are going to revisit this ticket again :(
witch version of Nextcloud iOS you use ?
4.8.6.4 on my end, same issue. It's for older photos which don't have that particular header in the exif data (my assumption)
can you update ? we are to 4.9.2
I was on the latest on the App Store. I just saw 4.9.2 was released yesterday and barely updated. Same error message
The server version is "Nextcloud hub 6 (27.1.3)"
Just updated to 4.9.2
ok, REOPEN
all time based exif information for photo that doesn't work
File Modification Date/Time : 2023:05:29 11:45:40-04:00
File Access Date/Time : 2023:11:20 13:38:15-05:00
File Inode Change Date/Time : 2023:05:29 11:45:46-04:00
Modify Date : 2010:07:03 12:07:37
Date/Time Original : 2010:07:03 12:07:37
Create Date : 2010:07:03 12:07:37
Date Created : 2010:07:03
Digital Creation Date : 2010:07:03
Profile Date Time : 2003:07:01 00:00:00
Create Date : 2010:07:03 12:07:37.000-07:00
Date/Time Original : 2010:07:03 12:07:37.000-07:00
Modify Date : 2010:07:03 12:07:37.000-07:00
Date/Time Created : 2010:07:03 12:07:37
Digital Creation Date/Time : 2010:07:03 12:07:37
all time based exit info for photo that does work
File Modification Date/Time : 2023:10:30 10:06:46-04:00
File Access Date/Time : 2023:11:22 10:25:15-05:00
File Inode Change Date/Time : 2023:11:22 10:25:09-05:00
Modify Date : 2023:10:30 10:06:46
Date/Time Original : 2023:10:30 10:06:46
Create Date : 2023:10:30 10:06:46
GPS Date Stamp : 2023:10:30
Profile Date Time : 2022:01:01 00:00:00
Profile Copyright : Copyright Apple Inc., 2022
Create Date : 2023:10:30 10:06:46.829-04:00
Date/Time Original : 2023:10:30 10:06:46.829-04:00
Modify Date : 2023:10:30 10:06:46-04:00
GPS Date/Time : 2023:10:30 14:06:45.73Z
This weird photo of what looks to be a memorial (I took it 13 years ago, no idea) is free for y'all to use for testing, it produces this error for me.
One thought that did occur to me, after looking at the EXIF data, which looks fine, (nothing obviously different to me), is perhaps this only affects uploaded photos or non HEIC photos? Photos that the iPhone took itself seem to be the only photos working.
about the Photo we look the creationDate content the iPhone asset not the EXIF data
you can try the version in TestFlight if solved
https://testflight.apple.com/join/RXEJbWj9
I think the version in test flight worked. Let me finish the sync and check for any lingering issues
Update: The sync works. It puts photos and videos in the correct folder partitioned by month. But in the media tab, the dates are way off. Photos from 2012 are showing up today.
Update: The sync works. It puts photos and videos in the correct folder partitioned by month. But in the media tab, the dates are way off. Photos from 2012 are showing up today.
The negative time is the date before 1/1/1970 and this date are not accept from the server, so if the ctime or/and mtime of photo is negative I don't send the date, so it take the "today" (when upload it) date. simple.
I think it could be improved.
As an example, one photo was taken June 2012. It is saved to the folder 2012/06. In media it should show up in June 2012 and not dec 2023.
Somewhere the metadata exists so Nextcloud saves it to the right year/month.
Is there any update regarding this?
Just installed the latest nextcloud server and iOS app. Experiencing the same issue while uploading the camera roll.