core icon indicating copy to clipboard operation
core copied to clipboard

Owncloud client / WebDav broken in Owncloud 6.0.1

Open ndjdev opened this issue 12 years ago • 7 comments

Expected behaviour

Connection can be made using owncloud-client

Actual behaviour

"No connection to Owncloud"

Steps to reproduce

  1. wget http://download.owncloud.org/community/owncloud-latest.tar.bz2
  2. Try and connect using owncloud-client built from Git revision 58035a on Jan 20, 2014

Server configuration

Operating system: CentOS release 5.9

Web server: Apache 2.2

Database: PostgreSQL 9.0

PHP version: PHP 5.3.28

ownCloud version: (see ownCloud admin page) 6.0.1

Updated from an older ownCloud or fresh install: Updated from 6.0.0a using full upgrade option (wipe and extract)

List of activated app: 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: (Without the database password and passwordsalt)

'oc8045829e76', 'passwordsalt' => , 'datadirectory' => '/home/cdowncloud/public_html/data', 'dbtype' => 'pgsql', 'version' => '6.0.0.16', 'dbname' => 'owncloud', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc_', 'dbuser' => 'owncloud', 'dbpassword' => '', 'installed' => true, 'maxZipInputSize' => 838860800, 'allowZipDownload' => true, 'forcessl' => true, 'loglevel' => '1', 'theme' => '', 'maintenance' => false, ); Are you using external storage, if yes which one: No ### Client configuration Not relevant ### Logs #### Web server error log No errors #### ownCloud log (data/owncloud.log) Multiple of these for various tags: {"app":"PHP","message":"simplexml_load_string() [function.simplexml-load-string<\/a>]: Entity: line 47: parser error : Opening and ending tag mismatch: meta line 14 and head at \/home\/cdowncloud\/public_html\/3rdparty\/Sabre\/DAV\/Client.php#529","level":2,"time":"2014-01-22T14:01:27+00:00"} {"app":"PHP","message":"simplexml_load_string() [function.simplexml-load-string<\/a>]: \t\t\t<\/head> at \/home\/cdowncloud\/public_html\/3rdparty\/Sabre\/DAV\/Client.php#529","level":2,"time":"2014-01-22T14:01:27+00:00"} {"app":"PHP","message":"simplexml_load_string() [function.simplexml-load-string<\/a>]: \t\t\t ^ at \/home\/cdowncloud\/public_html\/3rdparty\/Sabre\/DAV\/Client.php#529","level":2,"time":"2014-01-22T14:01:27+00:00"} {"app":"PHP","message":"simplexml_load_string() [function.simplexml-load-string<\/a>]: Entity: line 71: parser error : Opening and ending tag mismatch: meta line 13 and html at \/home\/cdowncloud\/public_html\/3rdparty\/Sabre\/DAV\/Client.php#529","level":2,"time":"2014-01-22T14:01:27+00:00"} {"app":"PHP","message":"simplexml_load_string() [function.simplexml-load-string<\/a>]: <\/html> at \/home\/cdowncloud\/public_html\/3rdparty\/Sabre\/DAV\/Client.php#529","level":2,"time":"2014-01-22T14:01:27+00:00"} {"app":"PHP","message":"simplexml_load_string() [function.simplexml-load-string<\/a>]: ^ at \/home\/cdowncloud\/public_html\/3rdparty\/Sabre\/DAV\/Client.php#529","level":2,"time":"2014-01-22T14:01:27+00:00"} {"app":"PHP","message":"simplexml_load_string() [function.simplexml-load-string<\/a>]: Entity: line 72: parser error : Premature end of data in tag head line 9 at \/home\/cdowncloud\/public_html\/3rdparty\/Sabre\/DAV\/Client.php#529","level":2,"time":"2014-01-22T14:01:27+00:00"} {"app":"PHP","message":"simplexml_load_string() [function.simplexml-load-string<\/a>]: at \/home\/cdowncloud\/public_html\/3rdparty\/Sabre\/DAV\/Client.php#529","level":2,"time":"2014-01-22T14:01:27+00:00"} {"app":"PHP","message":"simplexml_load_string() [function.simplexml-load-string<\/a>]: ^ at \/home\/cdowncloud\/public_html\/3rdparty\/Sabre\/DAV\/Client.php#529","level":2,"time":"2014-01-22T14:01:27+00:00"} {"app":"PHP","message":"simplexml_load_string() [function.simplexml-load-string<\/a>]: Entity: line 72: parser error : Premature end of data in tag html line 7 at \/home\/cdowncloud\/public_html\/3rdparty\/Sabre\/DAV\/Client.php#529","level":2,"time":"2014-01-22T14:01:27+00:00"} {"app":"PHP","message":"simplexml_load_string() [function.simplexml-load-string<\/a>]: at \/home\/cdowncloud\/public_html\/3rdparty\/Sabre\/DAV\/Client.php#529","level":2,"time":"2014-01-22T14:01:27+00:00"} {"app":"PHP","message":"simplexml_load_string() [function.simplexml-load-string<\/a>]: ^ at \/home\/cdowncloud\/public_html\/3rdparty\/Sabre\/DAV\/Client.php#529","level":2,"time":"2014-01-22T14:01:27+00:00"} {"app":"core","message":"isWebDAVWorking: NO - Reason: The passed data is not valid XML (InvalidArgumentException)","level":2,"time":"2014-01-22T14:01:27+00:00"}

It looks like something is wrong with your WebDAV connection (which the sync client uses) Can you check the permissions of your config and data folder ?

PVince81 avatar Jan 22 '14 14:01 PVince81

The config and data folders haven't been touched (did the wipe and extract upgrade method) and were working with Owncloud 6.0.0a. /config/ is apache:apache 777 and /data/ is apache:apache 770.

ndjdev avatar Jan 22 '14 14:01 ndjdev

The issue you're having is that the webdav interface is returning a HTML error page instead of the requested URL, which causes the issues you see. I thought the error in question could be about permissions.

Please try the following command:

curl --max-redirs 0 http://localhost/owncloud/remote.php/webdav/ >>test1.html 

Replace localhost/owncloud to your owncloud's path.

test1.html should contain the error message.

We need to look into how to propagate the error message correctly in the future.

PVince81 avatar Jan 22 '14 14:01 PVince81

Similar to #6119

PVince81 avatar Jan 22 '14 14:01 PVince81

Never mind it was the apps directory permissions. Sorry.

ndjdev avatar Jan 22 '14 14:01 ndjdev

The question is if we can support this case better.

In case there is an issue with the overall owncloud setup - like permissions on config, app, data or database offline we should return a proper dav response with valid xml and a correct http status code.

The only way to accomplish this from my point of view is to change the way base.php is working: instead of rendering an html error page we shall throw a proper exception which we can convert to the proper error response:

  • create a dav xml error response
  • display a thml error page
  • render a json error message

@PVince81 objections?

DeepDiver1975 avatar Jan 22 '14 14:01 DeepDiver1975

Yes, makes sense. Let's use #6119 which is still open.

PVince81 avatar Jan 22 '14 14:01 PVince81