Closed broke closed 6 months ago
Hi @broke ! I'm just a Baikal user but I just bought a new phone and went through the same issue. The problem which needs to be addressed in Sabre (maybe you'll be redirect to open a ticket there by the dev) is that the code is using dynamic properties which are deprecated in PHP 8.2 My Arch server using 8.3 by default, I installed PHP 8.1 and associated php-fpm version and got Baikal running.
To save you some time, here are the extensions I had to manually install (as they are separate packages in my distribution). Some of them further had to be enabled in the php.ini for PHP 8.1.
The dynamic properties thing is dav issue https://github.com/sabre-io/Baikal/issues/1154
According to my comment https://github.com/sabre-io/Baikal/issues/1154#issuecomment-1823817051 it seems that Baikal 0.9.4 was before all the deprecated dynamic properties things were fixed and released as dav 4.5.1
So another release of Baikal is still needed to get the latest sabre/dav
bundled into the release tarball.
@ByteHamster is that correct?
I'm currently running NixOS 23.11 and downgraded to PHP 8.1.27 but the issue still persists. I was also trying to change files manually like mentioned here https://github.com/sabre-io/Baikal/issues/1154#issuecomment-1427028654 but no success. Is there a way to get more verbose output of what baikal is doing to get to the root of this problem?
So another release of Baikal is still needed to get the latest sabre/dav bundled into the release tarball.
Yes, correct. I have been testing the upgrade for the last few weeks now, seems good to go. Will create a release.
I updated baikal to version 0.9.5 and PHP version in use is 8.2.17 now, but i still receive the same exception:
15:54:33 [error] 46113#46113: *13436 FastCGI sent in stderr: "PHP message: ErrorException: unserialize(): Error at offset 51 of 100 bytes in /srv/www/baikal/vendor/sabre/dav/lib/DAV/PropertyStorage/Backend/PDO.php:100
Could it be that some contact in my SQLite is malformed from previous versions of baikal causing this issue?
I poked around a little bit and what i could figure out with my lack of knowledge of PHP is:
In my case i end up in this line https://github.com/sabre-io/dav/blob/da8c1f226f1c053849540a189262274ef6809d1c/lib/DAV/PropertyStorage/Backend/PDO.php#L100 when the issue occurs. From my understanding PHP tries to create an object from the data which comes from my SQLite DB. From the backtrace i see data is coming from the table propertystorage
. Since this table has only one row and the value column is used to create the PHP object i can look up the serialized object in the DB. So i did. I found this value in the DB
O:27:"Sabre\DAV\Xml\Property\Href":2:{s:8:"\0*\0hrefs";a:1:{i:0;s:0:"";}s:13:"\0*\0autoPrefix";b:1;}
where deserialization fails at byte 51, so at the beginning of refs
inside the curly braces.
Can i modify this line to match to fix this issue?
Finally. I created a new addressbook in the WebUI. This action didn't create a new line in the propertystorage table. So i deleted the existing row which causes the deserialization issue and now syncing with my phone work. I remember now that in the past i was migrating from MYSQL to SQLite with this guide https://github.com/sabre-io/Baikal/issues/647#issuecomment-1100709198 . Now i think the entry in the property storage is a leftover from this migration which triggers the issues when you try to setup a new phone with DAVx5 and scan for existing addressbooks.
Baikal version: 0.9.4
Expected behaviour: While trying to connect to the Baikal server with DAVx5 version: 4.3.12.1-ose from an Android device default calender and address book should show up in DAVx5.
Current behaviour: The default calender show up but not the address book. An error can be found in the nginx log right after the attempt to update address books provided by server in DAVx5:
Similar error can be found in DAVx5 log:
Note: User and Domain got replaced in logs
Steps to reproduce: