kopano-dev / kdav Goto Github PK
View Code? Open in Web Editor NEWImplements CalDAV and CardDAV support for Kopano 8.6.2 or newer.
License: GNU Affero General Public License v3.0
Implements CalDAV and CardDAV support for Kopano 8.6.2 or newer.
License: GNU Affero General Public License v3.0
Hello all,
we installed kdav on us kopano Server on UCS. It works with accounts with a few contacts, but with the central address book with over 400 contacts, we get an error. But don’t know what is to do, or where is the issue. Here is the end of the Log:
https://darkdevil.osit.cc/index.php/s/zc2YJFyEiXaAxTr
On some vcard i get this error in the webbrowser:
<d:error><s:sabredav-version>3.2.2</s:sabredav-version><s:exception>Sabre\VObject\ParseException</s:exception><s:message>Invalid Mimedir file. Line starting at 10 did not follow iCalendar/vCard conventions</s:message></d:error>
This is the last one in the list. So i think there is the error. But how i can identify what contact this is?
In an otherwise perfectly working setup, setting DEVELOPER_MODE to false breaks sabredav.
When the dav URL is accessed, the following is printed in the browser:
<d:error><s:sabredav-version>3.2.2</s:sabredav-version><s:exception>Sabre\DAV\Exception\NotImplemented</s:exception> <s:message>There was no plugin in the system that was willing to handle this GET method. Enable the Browser plugin to get a better result here.</s:message></d:error>
until now i havent found a way to make kdav work with my contacts in public folders.
any thougths on this? when will it be possible ?
thanks in advance
The vcard api produces cards like these
BEGIN:VCARD
VERSION:3.0
PRODID:-//Kopano//libicalmapi 8.7.25//EN
N:;X U.
FN:X U.
ORG:Dr. X
TEL;TYPE=WORK:(0511) xxx xxx
ADR;TYPE=WORK:;;Sutelstr. xxx
30659 Hannover
UID:040000008200E00074C5B7101A82E0080000000080C5729AF2E9D801000000000000000001000000D0FA8F9481F447F7BB93FF61B3A0B9BE
NOTE:
REV:2022-10-27T10:55:19Z
END:VCARD
The linebreak for ADR;TYPE is wrong. Because the new line with 30659 is treated as a new vcard entry and causes an error, because it is unknown.
Same happens e.g. for NOTE where multi line entries maybe more common in germany.
The current solutions result not being able to sync contacts as long there is any contact with a multi line entry. The adresesses were actually broken because all of them were german and in Kopano everything was placed in the street field. That could be fixed by fixing the data. Contacts with notes could be fixed by deleting the note or remove line breaks. That is not a good solution.
There might be a use case for linebreaks in the street field in the future. Especially with non german adresses.
I found how multi line entries should be handled here mangstadt/ez-vcard#3
Hi,
I am running Kopano server 11.0.2 together with the latest version of Kopano kdav.
My SabreDAV version is 3.2.2.
When I create an all day event, it is shown correctly in Microsoft Outlook as well as in Kopano WebApp.
It is also displayed correctly on my iPhone's calendar app.
But when I use Kopano kDAV, all day events are shown one day too early.
All other events are shown correctly.
I've already checked my Kopano server for timezone issues - Ubuntu, PHP, MySQL and Z-Push are all configured to use "Europe/Berlin".
Does anybody know how to solve this issue?
Thanks in advance,
David
I am not able to sync a calender from another user. I tried using .../calendars/otheruser but it ends up in my own calendars. The web ui to browse through what is avaiable in the dav api does not list the other user. So it seems not be considered. so far? It is a feature in the current ical implementation for kopano. So kdav cannot replace the "old" one yet.
Hi,
for some reason when syncing contacts it crashes with segfault:
(gdb) bt
#0 0x00007fe330b8a0a0 in zend_fetch_resource () from /usr/lib/apache2/modules/libphp7.2.so
#1 0x00007fe328c666b9 in ?? () from /usr/lib/php/20170718/mapi.so
#2 0x00007fe31d5685e4 in ?? () from /usr/lib/x86_64-linux-gnu/kopano/libkcclient.so
#3 0x00007fe31d56b5a0 in ?? () from /usr/lib/x86_64-linux-gnu/kopano/libkcclient.so
#4 0x00007fe328c8bfa2 in ?? () from /usr/lib/php/20170718/mapi.so
#5 0x00007fe330c2407b in execute_ex () from /usr/lib/apache2/modules/libphp7.2.so
#6 0x00007fe330b63fee in zend_call_function () from /usr/lib/apache2/modules/libphp7.2.so
#7 0x00007fe330a9b504 in ?? () from /usr/lib/apache2/modules/libphp7.2.so
#8 0x00007fe330c2407b in execute_ex () from /usr/lib/apache2/modules/libphp7.2.so
#9 0x00007fe330b63fee in zend_call_function () from /usr/lib/apache2/modules/libphp7.2.so
#10 0x00007fe330a9b504 in ?? () from /usr/lib/apache2/modules/libphp7.2.so
#11 0x00007fe330c2407b in execute_ex () from /usr/lib/apache2/modules/libphp7.2.so
#12 0x00007fe330c259b7 in zend_execute () from /usr/lib/apache2/modules/libphp7.2.so
#13 0x00007fe330b745a2 in zend_execute_scripts () from /usr/lib/apache2/modules/libphp7.2.so
#14 0x00007fe330b10490 in php_execute_script () from /usr/lib/apache2/modules/libphp7.2.so
#15 0x00007fe330c27b12 in ?? () from /usr/lib/apache2/modules/libphp7.2.so
b#16 0x00005615d7db0be0 in ap_run_handler ()
#17 0x00005615d7db115d in ap_invoke_handler ()
#18 0x00005615d7dc80ec in ap_internal_redirect ()
#19 0x00007fe32c8f3f35 in ?? () from /usr/lib/apache2/modules/mod_rewrite.so
#20 0x00005615d7db0be0 in ap_run_handler ()
#21 0x00005615d7db115d in ap_invoke_handler ()
#22 0x00005615d7dc8d1b in ap_process_async_request ()
#23 0x00005615d7dc8ef0 in ap_process_request ()
#24 0x00005615d7dc513d in ?? ()
#25 0x00005615d7dba9f0 in ap_run_process_connection ()
#26 0x00007fe331192831 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#27 0x00007fe331192b44 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#28 0x00007fe3311935b4 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#29 0x00005615d7d9419e in ap_run_mpm ()
#30 0x00005615d7d8ca7b in main ()
In kdav logs this also appears:
30.01.2019 13:03:28 [29492] [WARN ] error /var/www/html/kdav/lib/PHPWrapper.php:136 Use of undefined constant SYNC_E_IGNORE - assumed 'SYNC_E_IGNORE' (this will throw an Error in a future version of PHP) (2)
Ubuntu 18.04, php 7.2.10, kopano 8.7.80.529 & latest kdav.
After deployed I could see events in mac calendar from Kopano. But Kdav starts creating weird random calendars on its own. Even calendars that are not in Kopano Calendar:
10.97.150.37 - - [30/Nov/2021:09:56:16 +0000] "MKCALENDAR /kdav/calendars/user1/370C0949-B7D7-4E86-9402-9BA4ED79D159/ HTTP/1.1" 201 0
10.97.150.37 - - [30/Nov/2021:09:56:20 +0000] "MKCALENDAR /kdav/calendars/user1/1A15AE10-01B8-4748-A2CB-8E1BCD909DB6/ HTTP/1.1" 201 0
10.97.150.37 - - [30/Nov/2021:10:05:55 +0000] "MKCALENDAR /kdav/calendars/user1/D8D2BCC8-B903-4C3D-BFED-E4F77B86AAE2/ HTTP/1.1" 201 0
10.97.150.37 - - [30/Nov/2021:10:08:05 +0000] "MKCALENDAR /kdav/calendars/user1/981959DA-9ED8-4A29-A6A7-BDE6562EF7BC/ HTTP/1.1" 201 0
Also I found issues of events not being showed in mac calendar.
Also synchronisation is not working fine.
I see these errors in the logs:
30.11.2021 13:14:12 [ 5483] [ERROR] dav KopanoDavBackend->Sync(): Unable to get value from token: 0000000000 - folderId: principals/user1:f7758d40f8f24f568ae2382ce4232d1f480200000000 - /usr/share/kopano-kdav/lib/KopanoCardDavBackend.php:375
30.11.2021 13:14:13 [ 5395] [ERROR] dav KopanoDavBackend->Sync(): Unable to get value from token: 0000000000 - folderId: principals/user1:f7758d40f8f24f568ae2382ce4232d1f520200000000 - /usr/share/kopano-kdav/lib/KopanoCardDavBackend.php:375
30.11.2021 13:16:12 [ 5295] [ERROR] dav KopanoDavBackend->Sync(): Unable to get value from token: 0000000000 - folderId: principals/user1:f7758d40f8f24f568ae2382ce4232d1f480200000000 - /usr/share/kopano-kdav/lib/KopanoCardDavBackend.php:375
30.11.2021 13:16:13 [ 5275] [ERROR] dav KopanoDavBackend->Sync(): Unable to get value from token: 0000000000 - folderId: principals/user2:f7758d40f8f24f568ae2382ce4232d1f520200000000 - /usr/share/kopano-kdav/lib/KopanoCardDavBackend.php:375
I tried to manually refresh or refresh calendar every minute. It does not work.
I have to remove the account from Mac calendar and add it again in order to get the latest events.
If you create change or an Contact via CardDav The encoding gets mangeled.
(UTF-8 interpreted as iso-8859-1 ?)
If you change the contact in the Kopano Webgui the carracters arrive corrrectly at the CardDav clients.
Tested with:
Thunderbid + CardBook
Win10
Examples:
Expected
ÄÜÖ -> Ã�Ã�Ã�
Comércio -> Comércio
Trying to move to mysql and away from sqlite, I found that the current implementation doesn't work. The constructor in lib/KopaanoSyncStates.php does not recognise the PDO string, causing php-fpm to crashdump and webbrowsers to display a HTTP 500 / page not operational error.
The journal shows this when you try to access kdav:
Mai 19 02:14:01 mx1 systemd[1]: Started A high performance web server and a reverse proxy server.
Mai 19 02:14:16 mx1 nginx[1997]: 2019/05/19 02:14:16 [error] 1999#1999: *1 FastCGI sent in stderr: "PHP message: PHP Warning: date(): Invalid date.timezone value 'Europe\Berlin', we selected the timezone 'UTC' for now. in /usr/share/webapps/kopano-kdav/vendor/apache/log4php/src/main/php/pattern/LoggerPatternConverterDate.php on line 74PHP message: PHP Warning: date(): Invalid date.timezone value 'Europe\Berlin', we selected the timezone 'UTC' for now. in /usr/share/webapps/kopano-kdav/vendor/apache/log4php/src/main/php/pattern/LoggerPatternConverterDate.php on line 74PHP message: PHP Warning: date(): Invalid date.timezone value 'Europe\Berlin', we selected the timezone 'UTC' for now. in /usr/share/webapps/kopano-kdav/vendor/apache/log4php/src/main/php/pattern/LoggerPatternConverterDate.php on line 74PHP message: PHP Warning: date(): Invalid date.timezone value 'Europe\Berlin', we selected the timezone 'UTC' for now. in /usr/share/webapps/kopano-kdav/vendor/apache/log4php/src/main/php/pattern/LoggerPatternConverterDate.php on line 74PHP message: PHP Warning: date(): Invalid date.timezone value 'Europe\Berlin', we selected the timezone 'UTC' for now. in /usr/share/webapps/kopano-kdav/vendor/apache/log4php/src/main/php/pattern/LoggerPatternConverterDate.php on line 74PHP message: PHP Fatal error: Uncaught PDOException: could not find driver in /usr/share/webapps/kopano-kdav/lib/KopanoSyncState.php:45
Mai 19 02:14:16 mx1 nginx[1997]: Stack trace:
Mai 19 02:14:16 mx1 nginx[1997]: #0 /usr/share/webapps/kopano-kdav/lib/KopanoSyncState.php(45): PDO->__construct('"mysql:dbname=s...')
Mai 19 02:14:16 mx1 nginx[1997]: #1 /usr/share/webapps/kopano-kdav/lib/KopanoDavBackend.php(48): Kopano\DAV\KopanoSyncState->__construct(Object(Kopano\DAV\KLogger), '"mysql:dbname=s...')
Mai 19 02:14:16 mx1 nginx[1997]: #2 /usr/share/webapps/kopano-kdav/server.php(54): Kopano\DAV\KopanoDavBackend->__construct(Object(Kopano\DAV\KLogger))
Mai 19 02:14:16 mx1 nginx[1997]: #3 {main}
Mai 19 02:14:16 mx1 nginx[1997]: thrown in /usr/share/webapps/kopano-kdav/lib/KopanoSyncState.php on line 45" while reading response header from upstream, client: 78.94.14.198, server: dav.maerz.cc, request: "GET /server.php HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm/webapp.sock
When the error is thrown, config.php reads this:
define('SYNC_DB', '"mysql:dbname=sabredav","user","pass"');
I have also tried this with the same result:
define('SYNC_DB', "'mysql:dbname=sabredav;host=localhost', 'user', 'pass'");
define('SYNC_DB', "mysql:dbname=sabredav;unix_socket=/run/mysqld/mysqld.sock");
The ugly workaround is to hard-code $dbstring in lib/KopanoSyncState.php with the same string as shown above - working perfectly fine:
public function __construct($logger, $dbstring) {
$this->logger = $logger;
$this->logger->trace("Using db %s", $dbstring);
// $this->db = new \PDO($dbstring);
$this->db = new \PDO('mysql:dbname=sabredav','user','pass');
Which is also documented upstream in the official sabredav documentation found at:
http://sabre.io/dav/authentication/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.