Description
Steps to reproduce
- Install OmniPresence webdav client on a Mac.
- Run initial setup using ownCloud webdav as server.
- Watch compatibility test fail with message:
We could not connect to your selected cloud location.
WebDAV server failed conformance test.
Should be able to move a file over an existing file when overwrite is enabled.
Expected behavior
Compatibility tests built into OmniPresence should pass.
For comparison, I tested this ownCloud installation using litmus 0.13 and it passes all tests except propget high-unicode as expected due to running on OS X. (Yes, I know ownCloud on OS X is currently listed in unsupported due to the unicode issue.)
Actual behavior
OmniPresence compatibility test fails.
Server configuration
Operating system:
OS X 10.9.2 Server
Web server:
Apache 2.2.6
Database:
MySQL Ver 14.14 Distrib 5.5.15, for osx10.6 (i386) using readline 5.1
PHP version:
php 5.4.24
ownCloud version: (see ownCloud admin page)
6.0.2
Updated from an older ownCloud or fresh install:
fresh install
List of activated apps:
Activity
Calendar
Contacts
Deleted files
Documents
First Run Wizard
Full Text Search
PDF Viewer
Pictures
Share Files
Text Editor
Updater
Versions
Video Viewer
The content of config/config.php:
(password and salt removed)
<?php
$CONFIG = array (
'instanceid' => 'oc8def944989',
'trusted_domains' =>
array (
0 => 'cloud.net-kitchen.com',
),
'datadirectory' => '/Volumes/Shared/ownCloud',
'dbtype' => 'mysql',
'version' => '6.0.2.2',
'installed' => true,
'forcessl' => true,
'maxZipInputSize' => 0,
'allowZipDownload' => true,
'dbname' => 'ownCloud',
'dbhost' => '127.0.0.1',
'dbtableprefix' => 'oc_',
'dbuser' => 'oc_admin',
);
Are you using external storage, if yes which one: local/smb/sftp/...
No.
Are you using encryption: yes/no
No.
Client configuration
Browser:
NA, using OmniPresence v1.1. See: http://www.omnigroup.com/omnipresence
Operating system:
OS X 10.9.2
Logs
Web server error log
(IP address has been replaced with ???.???.???.???)
[Wed Apr 02 14:54:55 2014] [error] [client ???.???.???.???] PHP Fatal error: Call to undefined method OC_Connector_Sabre_Directory::getETag() in /Library/Server/Web/Data/Sites/cloud.net-kitchen.com/3rdparty/Sabre/DAV/Locks/Plugin.php on line 504
[Wed Apr 02 14:54:58 2014] [error] [client ???.???.???.???] PHP Fatal error: Call to undefined method OC_Connector_Sabre_Directory::getETag() in /Library/Server/Web/Data/Sites/cloud.net-kitchen.com/3rdparty/Sabre/DAV/Locks/Plugin.php on line 504
ownCloud log (data/owncloud.log)
{"app":"webdav","message":"Exception: Sabre_DAV_Exception_NotFound: File with name OmniDAV-Conformance-Tests could not be located","level":4,"time":"2014-04-02T18:54:52+00:00"}
{"app":"PHP","message":"Call to undefined method OC_Connector_Sabre_Directory::getETag() at \/Library\/Server\/Web\/Data\/Sites\/cloud.net-kitchen.com\/3rdparty\/Sabre\/DAV\/Locks\/Plugin.php#504","level":3,"time":"2014-04-02T18:54:55+00:00"}
{"app":"PHP","message":"Call to undefined method OC_Connector_Sabre_Directory::getETag() at \/Library\/Server\/Web\/Data\/Sites\/cloud.net-kitchen.com\/3rdparty\/Sabre\/DAV\/Locks\/Plugin.php#504","level":3,"time":"2014-04-02T18:54:58+00:00"}
{"app":"webdav","message":"Exception: Sabre_DAV_Exception_PreconditionFailed: The destination node already exists, and the overwrite header is set to false","level":4,"time":"2014-04-02T18:55:08+00:00"}
{"app":"webdav","message":"Exception: Sabre_DAV_Exception_PreconditionFailed: The destination node already exists, and the overwrite header is set to false","level":4,"time":"2014-04-02T18:55:10+00:00"}
{"app":"webdav","message":"Exception: Sabre_DAV_Exception_PreconditionFailed: The destination node already exists, and the overwrite header is set to false","level":4,"time":"2014-04-02T18:55:11+00:00"}
{"app":"webdav","message":"Exception: Sabre_DAV_Exception_PreconditionFailed: The destination node already exists, and the overwrite header is set to false","level":4,"time":"2014-04-02T18:55:12+00:00"}
Browser log
NA
Activity
DeepDiver1975 commentedon Apr 3, 2014
Looks like some issues with dav locking.
@ddmckay Can you please let us know which uri is passed into this lock call? access.log should contain all the information
@evert Looks like the sabre code is missing a null check?
ddmckay commentedon Apr 3, 2014
I'm not sure I can pinpoint the URL. The access_log for the minute or so the test runs looks like this (IP address was replaced with ???.???.???.???):
DeepDiver1975 commentedon Apr 3, 2014
hmmm - I would have expected a LOCK request ....
evert commentedon Apr 3, 2014
This error did not happen during creation of a new LOCK, but during validating an
Ifheader. In 1.7 this is handled by the LOCK plugin, because it's also used to validate lock-tokens.Ifwas used here to validate etags though, but incorrectly. For some reason the client tries to validate an etag on a collection.This is a sabredav bug, but it may or may not also be a bug in that client. I'll look into this from the sabre/dav side though.
DeepDiver1975 commentedon Apr 4, 2014
Awesome Evert. Thanks a lot.
Von Samsung Mobile gesendet
-------- Ursprüngliche Nachricht --------
Von: Evert Pot [email protected]
Datum:04.04.2014 00:46 (GMT+01:00)
An: owncloud/core [email protected]
Cc: Thomas Müller [email protected]
Betreff: Re: [core] OmniPresence webdav client and getETag() (#8033)
This error did not happen during creation of a new LOCK, but during validating an If header. In 1.7 this is handled by the LOCK plugin, because it's also used to validate lock-tokens.
If was used here to validate etags though, but incorrectly. For some reason the client tries to validate an etag on a collection.
This is a sabredav bug, but it may or may not also be a bug in that client. I'll look into this from the sabre/dav side though.
—
Reply to this email directly or view it on GitHub.
evert commentedon Apr 4, 2014
That bug is now fixed.
ybart commentedon May 21, 2014
After manually updated Sabre to 1.7.12 which is shipping the fix for the issue.
The check still fails with the following message from OmniPresence against ownCloud 6.0.3.1 running on PHP 5.4.27/FPM on OVH shared hosting server:
Error Connecting!
We could not connect to your selected cloud location.
Unable to perform WebDAV operation.
The owncloud server returned "precondition failed" (412) in response to a request to "MOVE" /remote.php/webdav/OmniDAV-Conformance-Tests/fortestReplacedCollectionUpdatedModificationDate: /parent/tmp/doc
DeepDiver1975 commentedon May 21, 2014
Looks like we need to upgrade SabreDAV to 1.7.12 for OC7
@karlitschek FYI
ybart commentedon May 21, 2014
It seems there is still a problem with OmniPresence even after manual upgrade of Sabre to 1.7.12.
DeepDiver1975 commentedon May 21, 2014
Here is the sabredav diff fruux/sabre-dav@1.7.11...1.7.12#files_bucket
evert commentedon May 22, 2014
To add on what I said about this the first time round:
I suspected that, even though this is a sabredav bug.. that this bug was only triggered as a result of a bug that was in omnipresence. We basically returned an incorrect error (500 instead of 412).
So we are doing things correctly now. I would report a bug at omnipresence.
tjw commentedon Jul 11, 2014
Howdy -- I'm the main developer on OmniPresence, so I thought I'd chime in with a few notes. If I'm misreading this thread, my apologies!
The source for the test in question is here https://github.com/omnigroup/OmniGroup/blob/master/Frameworks/OmniDAV/ODAVConformanceTest.m#L682
This test sets up a destination directory and records the final ETag. It then attempts to move another directory to replace it, with the precondition that the ETag on the destination hasn't changed, and with overwrite enabled. This should fail if the destination was modified since we gathered the ETag and it should fail w/o overwrite, but since neither of these are the case, the
MOVEshould succeed (so we should be getting back a 2xx code instead of 500 or 412 -- Apache sends 204 No Content).If you'd like to run our conformance tests directly, you can:
For extra details, you can edit the scheme to add an ODAVConnectionDebug=10 environment variable.
When run against my local Apache instance (which has a custom log format to emit If tests in the log), I get the following logs:
And for the actual
MOVEcommand, the extra logging noted above shows that we send this (formatted more plist-y than as a HTTP request):In particular, note that the
Ifheader is applying the ETag predicate to the destination of theMOVE, not the source.I hope this helps!
evert commentedon Jul 11, 2014
SabreDAV does not support ETags on collections.
The ETag generally only says something about the result of a GET request with a certain set of
Accept*headers.Collections in sabredav should not emit etags because we don't really support GET-like operations on collections. GET may be supported when the browser plugin is enabled, but even if the browser plugin is enabled, sabredav should not be emitting etags for those requests.
So I see two potential explanations for this issue:
Is this a correct assumption? It would be especially helpful if someone from owncloud can comment on the fact that you're doing something specific with etags that baseline sabredav does not, because i know you guys have made a number of modifications to facilitate sync applications.
DeepDiver1975 commentedon Jul 11, 2014
Regarding etags on collections: we use these etags to detect changes of the folder and subfolders within.
we implemented a mechanism to propagate changes up to the root folder.
17 remaining items
ownclouders commentedon Jan 13, 2018
Hey, this issue has been closed because the label
status/STALEis set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.(This is an automated comment from GitMate.io.)
PVince81 commentedon Jan 15, 2018
Please reopen if the problem still exists with 10.0.5 RC3.
Also note that we will not replace the syncing mechanism with a new approach as it would involve rewriting all the clients.
DavidShepherdson commentedon Apr 21, 2018
Just noting for the record that I upgraded my ownCloud installation today to 10.0.7, and it still fails the OmniPresence conformance tests, with a similar message to the posts earlier:
Let me know if there are any other logs I can supply that would be useful (assuming the problem is on the ownCloud side, of course).
qin-nz commentedon Jul 16, 2018
@PVince81 it still fails in 10.0.8 (stable). Please reopen this issue.
qin-nz commentedon Jul 18, 2018
Please note that there is a space in the path.
The owncloud server returned "precondition failed" (412) in response to a request to "MOVE" /remote.php/webdav/OmniDAV-Conformance-Tests/fortestReplacedCollectionUpdatedModificationDate: /parent/tmp/docDate: /parentCorneeldH commentedon Sep 13, 2018
Hi there, news from the SURFdrive community. We have also customers reporting the desire to work via OmniPresence, but receiving the very same error. Any updates / workarounds?
michaelstingl commentedon Sep 13, 2018
@CorneelDragon please open support ticket and reference this issue.
michaelstingl commentedon Sep 14, 2018
@CorneelDragon This could be a workaround:
Let ownCloud desktop client sync data to the directory Omni Sync Server server uses. Then OmniPresence client can access oC data via Omni Sync Server.
It seems the Omni WebDAV universe isn't compatible with the ownCloud WebDAV universe.
dmin7b5 commentedon Oct 30, 2019
It still fails in 17.0.0 (stable).