Closed altheeagle closed 3 years ago
Looks like something has changed in Baikal and it was working before? You could check https://github.com/andig/carddav2fb/pull/192 which allows to select the query method and see if any of these variants work. Otherwise I'd suggest to open an issue with Baikal.
@altheeagle Please check with the current version whether the last imported PR #205 solves your problem
Thank you that you mentioned me. Unfortunatly it didn't helped - or made somethin wrong. I've just updated carddav2fb with "git fetch" and "composer update" and still getting same error.
Just surfing by here I think I can give a few helpful pointers.
Please see here for the issue: sabre-io/dav#932
You may be interested in this for inspiration on how to fix it: https://github.com/mstilkerich/carddavclient/commit/106a1df68b784c6e47f425c41af8a485e63018b7
Interesting. I‘m by no means a curl expert. As I understand it you‘re retrying the request in the dreaded HTTP 500 response with different curl auth options? Sabre won‘t fix it as its due to http client behavior. We could try applying your fix here, thank you very much!
There is different ways to work around this:
If you don't care about performance, 1 or 3 are the easy way to go.
For me, 1 and 2 was not an option, because I want the library to interoperate with any CardDAV server in the most efficient supported way. 3 was also not an option because I don't want to slow down communication with other CardDAV servers because of a workaround for sabre. So I chose to try the normal way, and specifically detect the issue (500 reply and some other conditions you can see in my commit's code comment). Only if I detect the issue I then use option 3.
Thank you @mstilkerich for the in-depth explanation. As performance is not my primary concern due to the batch-oriented nature of what we're doing 3. sounds like a good option. It would still be considerable better in performance than 1.
@blacksenator do you want to give it a try? It should also only be necessary to use this approach if user/password are specified, but not with open servers.
@andig I just followed the discussion out of the corner of my eye. If I understand correctly, the request method should be cascaded? If you code the PR, I can willingly test it - if you explain to me again how or what to test.
PR attached please let me know if this works and solves the problem with Sabre.
Hi, I've just updated the program and now I get a different Error:
`./carddav2fb run -vvv
Downloading recent FRITZ!Box phonebook
No special attributes are saved!
Downloading vCard(s) from account
[GuzzleHttp\Exception\ServerException (500)]
Server error: REPORT https://xxx/dav.php/addressbooks/<username>/default/
resulted in a 500 Internal Server Error
response:
<?xml version="1.0" encoding="utf-8"?>
@altheeagle Just to be sure - and according to your message from May 13 and the first error you mentioned: have you tried it with an configuration like in this example?
@blacksenator No I did not have tried a configuration like in your example. But now I did and it works! Thank you for mentioning this! This Issue can now be closed.
I have upgraded to baikal 0.6.1 and get a 500 error while using carddav2fb, the apache error log of baikal says
[Thu Feb 13 13:01:20.650491 2020] [php7:notice] [pid 17226] [client 10.10.10.10:41862] Sabre\\Xml\\ParseException: The input element to parse is empty. Do not attempt to parse in /var/www/example.com/vendor/sabre/xml/lib/Service.php:114\nStack trace:\n#0 /var/www/example.com/vendor/sabre/dav/lib/DAV/CorePlugin.php(715): Sabre\\Xml\\Service->parse()\n#1 /var/www/example.com/vendor/sabre/event/lib/WildcardEmitterTrait.php(96): Sabre\\DAV\\CorePlugin->httpReport()\n#2 /var/www/example.com/vendor/sabre/dav/lib/DAV/Server.php(464): Sabre\\DAV\\Server->emit()\n#3 /var/www/example.com/vendor/sabre/dav/lib/DAV/Server.php(241): Sabre\\DAV\\Server->invokeMethod()\n#4 /var/www/example.com/vendor/sabre/dav/lib/DAV/Server.php(309): Sabre\\DAV\\Server->start()\n#5 /var/www/example.com/Core/Frameworks/Baikal/Core/Server.php(123): Sabre\\DAV\\Server->exec()\n#6 /var/www/example.com/html/dav.php(61): Baikal\\Core\\Server->start()\n#7 {main}
baikal is working fine with Thunderbird TBsync , also the iOS Contacts App is working