View Issue Details

IDProjectCategoryView StatusLast Update
0013806Tine 2.0CalDAVpublic2018-04-21 11:17
ReportershochdoerferAssigned Topschuele 
PriorityurgentSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version2018.02.1 Community Edition 
Target VersionFixed in Version2018.02.3 Community Edition 
Summary0013806: CalDAV Server responds with 404
DescriptionSometimes the CalDAV Server responds with 404 reponse which some clients happily ignore, iCal on iOS presents this error to the user by showing an alert box. This is what I have found out so far:

This is the request that returns a 404 in our Tine 2.0 instance (I assume it is a problem with "wrong" data in our database, but I might be wrong):

c8baa johndoe - 2018-03-22T12:34:46+00:00 INFO (6): Tinebase_Server_WebDAV::handle::106 Starting to handle WebDAV request ( requestUri:/principals/users/986691f61f9daa5f97f37634fb83ca4e34b41365/ PID: 34)

The CalDAV client sends this request to the server:
c8baa johndoe - 2018-03-22T12:34:46+00:00 DEBUG (7): Tinebase_Server_WebDAV::handle::127 <<< *DAV request
<?xml version="1.0" encoding="UTF-8"?>
<A:expand-property xmlns:A="DAV:">
  <A:property name="calendar-proxy-read-for" namespace="http://calendarserver.org/ns/">
    <A:property name="calendar-user-address-set" namespace="urn:ietf:params:xml:ns:caldav"/>
    <A:property name="email-address-set" namespace="http://calendarserver.org/ns/"/>
    <A:property name="displayname" namespace="DAV:"/>
  </A:property>
  <A:property name="calendar-proxy-write-for" namespace="http://calendarserver.org/ns/">
    <A:property name="calendar-user-address-set" namespace="urn:ietf:params:xml:ns:caldav"/>
    <A:property name="email-address-set" namespace="http://calendarserver.org/ns/"/>
    <A:property name="displayname" namespace="DAV:"/>
  </A:property>
</A:expand-property>

This leads to to couple of notices stating that "Group/list principal does not exist" like this (for this specific request I got about 15 of those messages):

c8baa johndoe - 2018-03-22T12:34:46+00:00 NOTICE (5): Tinebase_WebDav_PrincipalBackend::getPrincipalByPath::176 Group/list principal does not exist: 645585e475809352e11c589e47f5dd25676a7712
c8baa johndoe - 2018-03-22T12:34:46+00:00 NOTICE (5): Tinebase_WebDav_PrincipalBackend::getPrincipalByPath::176 Group/list principal does not exist: 98d2c501897d8312bfadb8bcacd9d0b6cfc8c6ab

What seems to kill the request in the end is this SabreDAV exception for the last notice:
c8baa johndoe - 2018-03-22T12:34:46+00:00 NOTICE (5): Tinebase_WebDav_PrincipalBackend::getPrincipalByPath::176 Group/list principal does not exist: 6af35127394a0af1467b250c4fe9f1b96f2b3dca
c8baa johndoe - 2018-03-22T12:34:46+00:00 DEBUG (7): Tinebase_Server_WebDAV::handle::202 >>> *DAV response:
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
  <s:message>Principal with name 6af35127394a0af1467b250c4fe9f1b96f2b3dca not found</s:message>
  <s:file>/var/www/html/vendor/sabre/dav/lib/Sabre/DAVACL/AbstractPrincipalCollection.php</s:file>
  <s:line>116</s:line>
  <s:code>0</s:code>
  <s:stacktrace>#0 /var/www/html/vendor/sabre/dav/lib/Sabre/DAV/ObjectTree.php(72): Sabre\DAVACL\AbstractPrincipalCollection->getChild('6af35127394a0af...')
#1 /var/www/html/vendor/sabre/dav/lib/Sabre/CalDAV/Plugin.php(380): Sabre\DAV\ObjectTree->getNodeForPath('principals/grou...')
0000002 [internal function]: Sabre\CalDAV\Plugin->beforeGetProperties('principals/user...', Object(Tinebase_WebDav_Principal), Array, Array)
#3 /var/www/html/vendor/sabre/dav/lib/Sabre/DAV/Server.php(433): call_user_func_array(Array, Array)
0000004 /var/www/html/vendor/sabre/dav/lib/Sabre/DAV/Server.php(1519): Sabre\DAV\Server->broadcastEvent('beforeGetProper...', Array)
#5 /var/www/html/vendor/sabre/dav/lib/Sabre/DAVACL/Plugin.php(1204): Sabre\DAV\Server->getPropertiesForPath('principals/user...', Array, 0)
#6 /var/www/html/vendor/sabre/dav/lib/Sabre/DAVACL/Plugin.php(1132): Sabre\DAVACL\Plugin->expandProperties('principals/user...', Array, 0)
#7 /var/www/html/vendor/sabre/dav/lib/Sabre/DAVACL/Plugin.php(1007): Sabre\DAVACL\Plugin->expandPropertyReport(Object(DOMDocument))
0000008 [internal function]: Sabre\DAVACL\Plugin->report('{DAV:}expand-pr...', Object(DOMDocument), 'principals/user...')
#9 /var/www/html/vendor/sabre/dav/lib/Sabre/DAV/Server.php(433): call_user_func_array(Array, Array)
0000010 /var/www/html/vendor/sabre/dav/lib/Sabre/DAV/Server.php(1066): Sabre\DAV\Server->broadcastEvent('report', Array)
#11 [internal function]: Sabre\DAV\Server->httpReport('principals/user...')
0000012 /var/www/html/vendor/sabre/dav/lib/Sabre/DAV/Server.php(474): call_user_func(Array, 'principals/user...')
#13 /var/www/html/vendor/sabre/dav/lib/Sabre/DAV/Server.php(214): Sabre\DAV\Server->invokeMethod('REPORT', 'principals/user...')
0000014 /var/www/html/Tinebase/Server/WebDAV.php(199): Sabre\DAV\Server->exec()
#15 /var/www/html/Tinebase/Core.php(260): Tinebase_Server_WebDAV->handle(Object(Zend\Http\PhpEnvironment\Request))
0000016 /var/www/html/index.php(24): Tinebase_Core::dispatchRequest()
#17 {main}</s:stacktrace>
</d:error>

Given I am not so deep involved in CalDAV and the implementation in Tine 2.0, I am wondering why those Group/list principal are read, especially since those are mostly internal groups from our LDAP instance that get synched into Tine 2.0. They are not related at all to certain events.

The ids mentioned above seem to be entries of the tine20_addressbook_lists table, those entries do still exist, and those lists have vaild members in the tine20_addressbook_list_members table. I did a quick check and could not find orphaned references in there. Not sure where the error is coming from or how to fix it.
Additional InformationThis issue is based on a "bug report" in the Tine 2.0 forum, see here https://www.tine20.org/forum/viewtopic.php?f=12&t=18756&p=68388

We recently moved from a very old 2016.* instance of Tine 2.0 to the 2018.02.1 version. All db migrations went fine. I kind of think that some checks within Tine 2.0 were hardened and maybe some references cannot be found any more. But not sure what and which.
TagsNo tags attached.
mwticket

Relationships

has duplicate 0013708 resolvedpmehrer Hidden groups break webdav due to missing 

Activities

lab-at-nohl

lab-at-nohl

2018-03-22 23:54

developer   ~0021566

Looks like a Duplikate of 0013708 to me. Can you confirm that?

Reproduce: Set all groups your user belongs to to „Show in Addressbook“. 404-error gone away?

If so please set this bug as „duplicate of“ in relations.
shochdoerfer

shochdoerfer

2018-03-23 08:52

reporter   ~0021568

Can confirm that this is an issue of 0013708.
pschuele

pschuele

2018-04-19 16:31

administrator   ~0021642

Last edited: 2018-04-19 16:33

View 2 revisions

this should be fixed in 2018.02.3. can you confirm that this is no longer an issue? or better: reopen this if it still is ... ;)

shochdoerfer

shochdoerfer

2018-04-21 11:17

reporter   ~0021678

Goods good to me. Cannot reproduce the problem any more.

Issue History

Date Modified Username Field Change
2018-03-22 17:09 shochdoerfer New Issue
2018-03-22 23:54 lab-at-nohl Note Added: 0021566
2018-03-23 08:52 shochdoerfer Note Added: 0021568
2018-04-19 16:31 pschuele Note Added: 0021642
2018-04-19 16:32 pschuele Assigned To => pschuele
2018-04-19 16:32 pschuele Status new => resolved
2018-04-19 16:32 pschuele Resolution open => fixed
2018-04-19 16:32 pschuele Fixed in Version => 2018.02.3 Community Edition
2018-04-19 16:32 pschuele Relationship added has duplicate 0013708
2018-04-19 16:33 pschuele Note Edited: 0021642 View Revisions
2018-04-21 11:17 shochdoerfer Status resolved => closed
2018-04-21 11:17 shochdoerfer Note Added: 0021678