{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/contacts/issues/1058","labels_url":"https://api.github.com/repos/owncloud/contacts/issues/1058/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/contacts/issues/1058/comments","events_url":"https://api.github.com/repos/owncloud/contacts/issues/1058/events","html_url":"https://github.com/owncloud/contacts/issues/1058","id":108851237,"number":1058,"title":"CardDAV sync is broken on OSX 10.11 El Capitan","user":{"login":"fernandodeperto","id":10230238,"avatar_url":"https://avatars.githubusercontent.com/u/10230238?v=3","gravatar_id":"","url":"https://api.github.com/users/fernandodeperto","html_url":"https://github.com/fernandodeperto","followers_url":"https://api.github.com/users/fernandodeperto/followers","following_url":"https://api.github.com/users/fernandodeperto/following{/other_user}","gists_url":"https://api.github.com/users/fernandodeperto/gists{/gist_id}","starred_url":"https://api.github.com/users/fernandodeperto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fernandodeperto/subscriptions","organizations_url":"https://api.github.com/users/fernandodeperto/orgs","repos_url":"https://api.github.com/users/fernandodeperto/repos","events_url":"https://api.github.com/users/fernandodeperto/events{/privacy}","received_events_url":"https://api.github.com/users/fernandodeperto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2015-09-29T11:35:22Z","updated_at":"2015-10-02T11:34:47Z","closed_at":null,"body":"### Steps to reproduce\r\n1. Add a new CardDAV account throught system options\r\n2. Fill form using address given from the Contacts app in Owncloud\r\n\r\n### Expected behaviour\r\nAccount should be created and contacts should be loaded\r\n\r\n### Actual behaviour\r\nThere are two ways to add an account on OSX 10.11 El Capitan (called just OSX from now on). The first one is using the option \"Manual\", which gives only one field to use, server. In this case, both ```https://server/owncloud/remote.php/carddav/addressbooks/user/contacts``` and ```https://server/owncloud/remote.php/carddav/principals/user/``` were used, with the same result.\r\n\r\nThe application UI accepts the configuration. On the left menu an exclamation mark appears. Clicking on it gives the error ```The operation couldn’t be completed. (CoreDAVHTTPStatusErrorDomain error 405.)```.\r\n\r\nThe OSX Console app shows the following erro while trying to refresh the account:\r\n\r\n```\r\n29/09/15 14:05:49,219 Contacts[7795]: [CardDAVPlugin-ERROR] -getPrincipalInfo:[_controller discoverServer https://fernando@tyrael.mendonca.xyz:443(null)] Error Domain=CoreDAVHTTPStatusErrorDomain Code=405 \"(null)\" UserInfo={CoreDAVHTTPHeaders=<CFBasicHash 0x7ffc514fa740 [0x7fff786de890]>{type = immutable dict, count = 7,\r\nentries =>\r\n\t0 : Server = <CFString 0x7ffc533bc920 [0x7fff786de890]>{contents = \"Apache/2.4.16 (Debian)\"}\r\n\t1 : Content-Type = <CFString 0x7ffc533d5800 [0x7fff786de890]>{contents = \"text/html; charset=iso-8859-1\"}\r\n\t2 : Allow = <CFString 0x7ffc533c1830 [0x7fff786de890]>{contents = \"GET,HEAD,POST,OPTIONS\"}\r\n\t6 : Date = <CFString 0x7ffc533e56c0 [0x7fff786de890]>{contents = \"Tue, 29 Sep 2015 12:05:49 GMT\"}\r\n\t10 : Keep-Alive = <CFString 0x7ffc533c5a40 [0x7fff786de890]>{contents = \"timeout=5, max=98\"}\r\n\t11 : Content-Length = 323\r\n\t12 : Connection = <CFString 0x7fff78682190 [0x7fff786de890]>{contents = \"Keep-Alive\"}\r\n}\r\n}\r\n```\r\n\r\nThe other way is using \"Advanced\". With this option you can choose the server address and location. In this case, the server was the same and both server locations were tried, with the same result.\r\n\r\nThe error given by the application UI is ```Unable to verify account name or password```.\r\n\r\nThe OSX Console app shows the following errors:\r\n\r\n```\r\n29/09/15 14:09:04,102 WindowServer[163]: send_datagram_available_ping: pid 19317 failed to act on a ping it dequeued before timing out.\r\n29/09/15 14:09:04,213 accountsd[7816]: [CardDAVPlugin-ERROR] No 'AddlInfoKey' present to save: {\r\n}\r\n29/09/15 14:09:04,213 accountsd[7816]: Could not verify credentials for account fernando (C9C1D1C7-B52F-4B39-A48D-E36DC5A4EF17): Error Domain=NSURLErrorDomain Code=-1002 \"unsupported URL\" UserInfo={NSLocalizedDescription=unsupported URL, NSUnderlyingError=0x7ff00a703640 {Error Domain=kCFErrorDomainCFNetwork Code=-1002 \"unsupported URL\" UserInfo={NSLocalizedDescription=unsupported URL}}}\r\n```\r\n\r\nUsing both options, \"Manual and \"Advanced\", nothing new appeared on the logs for Apache errors and Owncloud. That leads me to think that the problem is on OSX's end. I decided to create the issue because (1) I am not sure this is the case and (2) maybe this can trigger some investigation that reaches Apple and helps them solve the problem.\r\n\r\n### Server configuration\r\n\r\n- Debian testing/stretch\r\n\r\n**Web server:**\r\n\r\n- Apache 2.4.16-3 from Debian repo\r\n\r\n**Database:**\r\n\r\n- MySQL 5.6.25-4 from Debian repo\r\n\r\n**PHP version:**\r\n\r\n- Package version 5.6.13+dfsg-2 from Debian repo\r\n\r\n**ownCloud version:** (see ownCloud admin page)\r\n\r\n- Using Owncloud repo, installed version 8.1.3-13.1\r\n\r\n**Updated from an older ownCloud or fresh install:**\r\n\r\n- Fresh install from repo\r\n\r\n**List of activated apps:**\r\n\r\n- I manually activated the Contacts and Calendars apps only. Other apps were already activated by default.\r\n\r\n**Result of the ```php occ app:list``` execution**\r\n\r\n```\r\nEnabled:\r\n - activity: 2.0.2\r\n - calendar: 0.7.3\r\n - contacts: 0.4.0.0\r\n - files: 1.1.10\r\n - files_locking: \r\n - files_pdfviewer: 0.7\r\n - files_sharing: 0.6.2\r\n - files_texteditor: 0.4\r\n - files_trashbin: 0.6.3\r\n - files_versions: 1.0.6\r\n - files_videoviewer: 0.1.3\r\n - firstrunwizard: 1.1\r\n - gallery: 0.6.0\r\n - provisioning_api: 0.2\r\n - tasks: 0.8\r\n - templateeditor: 0.1\r\n - updater: 0.6\r\nDisabled:\r\n - encryption\r\n - external\r\n - files_external\r\n - user_external\r\n - user_ldap\r\n - user_webdavauth\r\n```\r\n**The content of config/config.php:**\r\n\r\n```\r\n<?php\r\n$CONFIG = array (\r\n  'instanceid' => 'removed',\r\n  'passwordsalt' => 'NEQremoved',\r\n  'secret' => 'removed',\r\n  'trusted_domains' => \r\n  array (\r\n    0 => 'removed',\r\n  ),\r\n  'datadirectory' => '/var/www/owncloud/data',\r\n  'overwrite.cli.url' => 'https://removed/owncloud',\r\n  'dbtype' => 'mysql',\r\n  'version' => '8.1.3.0',\r\n  'dbname' => 'owncloud',\r\n  'dbhost' => 'localhost',\r\n  'dbtableprefix' => 'oc_',\r\n  'dbuser' => 'owncloud',\r\n  'dbpassword' => 'removed',\r\n  'logtimezone' => 'UTC',\r\n  'installed' => true,\r\n  'mail_smtpmode' => 'smtp',\r\n  'mail_from_address' => 'removed',\r\n  'mail_domain' => 'removed,\r\n  'mail_smtpauth' => 1,\r\n  'mail_smtphost' => 'removed',\r\n  'mail_smtpport' => '25',\r\n  'mail_smtpname' => 'removed',\r\n  'mail_smtppassword' => 'removed',\r\n  'mail_smtpsecure' => 'tls',\r\n  'mail_smtpauthtype' => 'PLAIN',\r\n);\r\n```\r\n\r\n**Are you using external storage, if yes which one:**\r\n\r\n- No\r\n\r\n**Are you using encryption:** yes/no\r\n\r\n- No\r\n\r\n**Are you using an external user-backend, if yes which one:** \r\n\r\n- No\r\n\r\n### Client configuration\r\n**Application:**\r\n\r\n- Apple Contacts app\r\n\r\n**Operating system:**\r\n\r\n- OSX 10.11 El Capitan\r\n\r\n### Logs\r\n#### ownCloud log (data/owncloud.log)\r\n\r\n- Upon trying the steps mentioned on this issue nothing new appeared on this log.\r\n\r\n#### Webserver log\r\n\r\n- I am not sure what log to use here in this case. Apache's error log doesn't say anything new at all.\r\n\r\n- Apache's access log gives some lines after I add the account. But no new lines appear when I try to refresh the connection by closing and opening the app.\r\n\r\n```\r\n194.199.27.187 - - [29/Sep/2015:13:53:24 +0200] \"PROPFIND /owncloud/remote.php/carddav/addressbooks/fernando/contacts HTTP/1.1\" 401 2565 \"-\" \"Mac OS X/10.11 (15A282b) AddressBook/1679\"\r\n194.199.27.187 - fernando [29/Sep/2015:13:53:24 +0200] \"PROPFIND /owncloud/remote.php/carddav/addressbooks/fernando/contacts HTTP/1.1\" 207 1657 \"-\" \"Mac OS X/10.11 (15A282b) AddressBook/1679\"\r\n194.199.27.187 - - [29/Sep/2015:13:53:25 +0200] \"OPTIONS /owncloud/remote.php/carddav/principals/fernando/ HTTP/1.1\" 401 1129 \"-\" \"Mac OS X/10.11 (15A282b) AddressBook/1679\"\r\n194.199.27.187 - fernando [29/Sep/2015:13:53:25 +0200] \"OPTIONS /owncloud/remote.php/carddav/principals/fernando/ HTTP/1.1\" 200 1081 \"-\" \"Mac OS X/10.11 (15A282b) AddressBook/1679\"\r\n194.199.27.187 - fernando [29/Sep/2015:13:53:30 +0200] \"PROPFIND /owncloud/remote.php/carddav/principals/fernando/ HTTP/1.1\" 207 2382 \"-\" \"Mac OS X/10.11 (15A282b) AddressBook/1679\"\r\n194.199.27.187 - - [29/Sep/2015:13:53:30 +0200] \"PROPFIND /owncloud/remote.php/carddav/addressbooks/fernando/ HTTP/1.1\" 401 1129 \"-\" \"Mac OS X/10.11 (15A282b) AddressBook/1679\"\r\n194.199.27.187 - fernando [29/Sep/2015:13:53:30 +0200] \"PROPFIND /owncloud/remote.php/carddav/addressbooks/fernando/ HTTP/1.1\" 207 4895 \"-\" \"Mac OS X/10.11 (15A282b) AddressBook/1679\"\r\n194.199.27.187 - - [29/Sep/2015:13:53:52 +0200] \"PROPFIND /.well-known/carddav HTTP/1.1\" 405 2080 \"-\" \"Mac OS X/10.11 (15A282b) AddressBook/1679\"\r\n194.199.27.187 - - [29/Sep/2015:13:53:52 +0200] \"PROPFIND / HTTP/1.1\" 405 635 \"-\" \"Mac OS X/10.11 (15A282b) AddressBook/1679\"\r\n194.199.27.187 - - [29/Sep/2015:13:53:52 +0200] \"PROPFIND /principals/ HTTP/1.1\" 405 636 \"-\" \"Mac OS X/10.11 (15A282b) AddressBook/1679\"\r\n```"},"comment":{"url":"https://api.github.com/repos/owncloud/contacts/issues/comments/144995462","html_url":"https://github.com/owncloud/contacts/issues/1058#issuecomment-144995462","issue_url":"https://api.github.com/repos/owncloud/contacts/issues/1058","id":144995462,"user":{"login":"gvde","id":12151414,"avatar_url":"https://avatars.githubusercontent.com/u/12151414?v=3","gravatar_id":"","url":"https://api.github.com/users/gvde","html_url":"https://github.com/gvde","followers_url":"https://api.github.com/users/gvde/followers","following_url":"https://api.github.com/users/gvde/following{/other_user}","gists_url":"https://api.github.com/users/gvde/gists{/gist_id}","starred_url":"https://api.github.com/users/gvde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvde/subscriptions","organizations_url":"https://api.github.com/users/gvde/orgs","repos_url":"https://api.github.com/users/gvde/repos","events_url":"https://api.github.com/users/gvde/events{/privacy}","received_events_url":"https://api.github.com/users/gvde/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T11:34:47Z","updated_at":"2015-10-02T11:34:47Z","body":"@perlbo Forget about before: modifying the system apache config files won't last long. The system recreates those files whenever you modify the NAS settings thus you'll loose it very quickly.\r\nInstead, create a new file called .htaccess in the document root directory, i.e. /share/Web locally on the server. In this file put those two lines Redirect lines I have mentioned before (i.e. it only contains those two lines).\r\nThat will last..."}}