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

Error while syncing chunked files: server replied: Precondition failed (An If-Match header was specified and the resource did not exist) #5854

Closed
umgfoin opened this issue Jun 22, 2017 · 8 comments

Comments

@umgfoin
Copy link

umgfoin commented Jun 22, 2017

I'm adding a reference to this nextcloud issue as it might be client-related.

Expected behaviour

All files are synced.

Actual behaviour

File upload starts and stops after some progress with error:
Certain files are not synced if upload is chunked.

Steps to reproduce

  1. Create a jpg with size 10.1 MB in a synced folder
  2. Watch sync progress and log

Server configuration

Operating system:
CentOS 6.9

Web server:
nginx version: nginx/1.11.10

Database:
Postgres 9.6.3

PHP version:
PHP 7.1.6 (fpm-fcgi)

ownCloud version:
Nextcloud 12.0.0

Storage backend (external storage):

Client configuration

Client version:
Version 2.3.2beta (build 1).

Operating system:
Win7 x64

OS language:
DE

Qt version used by client package (Linux only, see also Settings dialog):

Client package (From ownCloud or distro) (Linux only):

Installation path of client:

Logs

Please use Gist (https://gist.github.com/) or a similar code paster for longer
logs.

Template for output < 10 lines

  1. Client logfile:
22.06.2017 15:03:29, InstantUpload/2017/06/2017-06-17 17-38-12 3036_stitch.jpg, Nextcloud,Error transferring https://<fqdn>/remote.php/dav/files/hias/InstantUpload/2017/06/2017-06-17 17-38-12 3036_stich.jpg-chunking-3292803479-2-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist).
  1. Web server error log:

  2. Server logfile: ownCloud log (data/owncloud.log):

Sabre\DAV\Exception\PreconditionFailed: HTTP/1.1 412 An If-Match header was specified and the resource did not exist
/var/www/<nondisclosed>/3rdparty/sabre/dav/lib/DAV/Server.php - line 474: Sabre\DAV\Server->checkPreconditions(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/<nondisclosed>/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/<nondisclosed>/apps/dav/lib/Server.php - line 253: Sabre\DAV\Server->exec()
/var/www/<nondisclosed>/apps/dav/appinfo/v2/remote.php - line 33: OCA\DAV\Server->exec()
/var/www/<nondisclosed>/remote.php - line 162: require_once('/var/www/<nondisclosed>...')
{main}
@guruz
Copy link
Contributor

guruz commented Jun 22, 2017

Sorry, this is for sure (99.9% chance) a nC server issue and has nothing to do with oC/nC client.
Especially if it happens after a server upgrade as the linked issue said

Cant sync - Precondition failed after upgrade from 11.0.2 to 12.0

@PVince81
Copy link
Contributor

It could be what I observed here: owncloud/core#28197

@umgfoin are the files that don't sync received shared files ? (direct file shares, not folder shares).
If yes, then it's the problem from owncloud/core#28197

@PVince81
Copy link
Contributor

Desktop client version owncloud-client-2.3.2-1.5.x86_64 on openSUSE Tumbleweed. for me

@umgfoin
Copy link
Author

umgfoin commented Jun 23, 2017

are the files that don't sync received shared files ? (direct file shares, not folder shares).

No, unshared (instantUpload folder).
Although the error was still shown (periodically with every sync attempt), the files were correctly uploaded after a while and not on the first attempt.
Deleting and re-creating the file (in local filesystem), fixed the problem so far.

++umgfoin.

@PVince81
Copy link
Contributor

Are these small files (< 10 MB) being overwritten by big files (> 10 MB) ?

@umgfoin
Copy link
Author

umgfoin commented Jun 23, 2017

Basically, they were created in the local file-system by photoshop (filesize > 10MB). It is possible, that the initial sync succeeded and the errors appeared after successively saving modifications. The activity log shows an initial creation-event, but no update-events. Additionally, I'm unsure if photoshop creates a file in an atomic operation or several open/close/append steps.

@guruz
Copy link
Contributor

guruz commented Jun 26, 2017

@umgfoin You found a client bug after all :-)

Let's close in favor of #5855

@guruz guruz closed this as completed Jun 26, 2017
@guruz
Copy link
Contributor

guruz commented Jul 4, 2017

The nightly build for tomorrow should have this

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

4 participants