jelmer / xandikos

A CalDAV/CardDAV server backed by Git
https://www.xandikos.org/
GNU General Public License v3.0
414 stars 42 forks source link

Vivaldi browser calendar client reports "0 calendars" #135

Open castaway opened 3 years ago

castaway commented 3 years ago

The only thing I see happening on the terminal where xandikos is running, is:

WARNING:root:Client requested unknown property {http://calendarserver.org/ns/}xmpp-uri on / ([])
INFO:aiohttp.access:127.0.0.1 [24/Apr/2021:09:31:28 +0000] "PROPFIND / HTTP/1.1" 207 840 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.91 Safari/537.36"

However the vivaldi client seems fine against a sabre-caldav, which doesn't (as far as I can tell) support XMPP.

The settings are URL, user, pass - there's no place for a full url for a single calendar, sadly.

Any ideas? Happy to edit/test things

jelmer commented 3 years ago

The xmpp warning should be harmless - the client is asking whether the server supports the xmpp property, and Xandikos is noting that it doesn't support this property.

Can you try running with --dump-dav-xml ? that should hopefully give us a clue as to what is going on.

castaway commented 3 years ago
IN: <?xml version="1.0" encoding="UTF-8"?>
    <D:propfind xmlns:D="DAV:"
      xmlns:CS="http://calendarserver.org/ns/">
      <D:prop>
        <D:getetag />
        <D:displayname />
        <CS:getctag />
        <D:resourcetype />
        <supported-calendar-component-set xmlns="urn:ietf:params:xml:ns:caldav" />
        <supported-address-data xmlns="urn:ietf:params:xml:ns:carddav" />
        <xmpp-uri xmlns="http://calendarserver.org/ns/" />
        <calendar-color xmlns="http://apple.com/ns/ical/" />
        <D:supported-report-set />
        <D:sync-token />
      </D:prop>
    </D:propfind>
WARNING:root:Client requested unknown property {http://calendarserver.org/ns/}xmpp-uri on / ([])
OUT: <ns0:multistatus xmlns:ns0="DAV:" xmlns:ns1="http://calendarserver.org/ns/" xmlns:ns2="urn:ietf:params:xml:ns:caldav" xmlns:ns3="urn:ietf:params:xml:ns:carddav" xmlns:ns4="http://apple.com/ns/ical/"><ns0:response><ns0:href>/</ns0:href><ns0:propstat><ns0:status>HTTP/1.1 200 OK</ns0:status><ns0:prop><ns0:resourcetype /></ns0:prop></ns0:propstat><ns0:propstat><ns0:status>HTTP/1.1 404 Not Found</ns0:status><ns0:prop><ns0:getetag /><ns0:displayname /><ns1:getctag /><ns2:supported-calendar-component-set /><ns3:supported-address-data /><ns1:xmpp-uri /><ns4:calendar-color /><ns0:supported-report-set /><ns0:sync-token /></ns0:prop></ns0:propstat></ns0:response></ns0:multistatus>
INFO:aiohttp.access:127.0.0.1 [25/Apr/2021:10:37:31 +0000] "PROPFIND / HTTP/1.1" 207 840 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.91 Safari/537.36"
jelmer commented 3 years ago

Ah, I see what's happening - the client isn't using discovery to find out the users calendar set, but instead browsing the root of the dav server. By default, Xandikos doesn't provide a hierarchy at the root - but I suppose we could do that.

castaway commented 3 years ago

Well that's cheeky of it, how hard is that? I can python if I must.. :)

jelmer commented 3 years ago

On Sun, Apr 25, 2021 at 09:56:12AM -0700, Jess wrote:

Well that's cheeky of it, how hard is that? I can python if I must.. :)

If you can specify a full URL, you could pass a URL to vivaldi that included the user part of the path.

Alternatively, we could do some refactoring in the Xandikos code. The code was sort of written to allow the resource hierarchy to be built up dynamically, but in practice the abstractions assume the current setup - a root without DAV children, and one directory hierarchy per user.

Jelmer

-- Jelmer Vernooij @.***> PGP Key: https://www.jelmer.uk/D729A457.asc

castaway commented 3 years ago

sadly, as mentioned above.. Vivaldi has no setting for "just give me the calendar url" :(

jelmer commented 2 years ago

You could define RootPage.members() and have it return the list of Principals.