0013806: CalDAV Server responds with 404 #6828

Closed
Gloirin opened this Issue Jun 9, 2018 · 5 comments

Comments

Projects
None yet
1 participant
@Gloirin

Gloirin commented Jun 9, 2018

Reported by shochdoerfer on 22 Mar 2018 16:09

Version: 2018.02.1 Community Edition

Sometimes 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/&quot;/>
<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/&quot;/>
<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...')
#2 [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)
#4 /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))
#8 [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)
#10 /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...')
#12 /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...')
#14 /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))
#16 /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 information: This issue is based on a "bug report" in the Tine 2.0 forum, see here https://www.tine20.org/forum/viewtopic.php?f=12&amp;t=18756&amp;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.

@Gloirin Gloirin added this to the 2018.02.3 Community Edition milestone Jun 9, 2018

@Gloirin Gloirin self-assigned this Jun 9, 2018

@Gloirin Gloirin closed this Jun 9, 2018

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by lab-at-nohl on 22 Mar 2018 22:54

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.

Gloirin commented Jun 11, 2018

Comment posted by lab-at-nohl on 22 Mar 2018 22:54

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.

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by shochdoerfer on 23 Mar 2018 07:52

Can confirm that this is an issue of 0013708.

Gloirin commented Jun 11, 2018

Comment posted by shochdoerfer on 23 Mar 2018 07:52

Can confirm that this is an issue of 0013708.

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 19 Apr 2018 14:31

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 ... ;)

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 19 Apr 2018 14:31

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 ... ;)

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 19 Apr 2018 14:32

https://gerrit.tine20.com/customers/#/c/8455/

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 19 Apr 2018 14:32

https://gerrit.tine20.com/customers/#/c/8455/

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by shochdoerfer on 21 Apr 2018 09:17

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

Gloirin commented Jun 11, 2018

Comment posted by shochdoerfer on 21 Apr 2018 09:17

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment