Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble syncing with Radicale : error 207 #86

Closed
svictor9 opened this issue Apr 5, 2016 · 4 comments

Comments

@svictor9
Copy link

commented Apr 5, 2016

Hi, and thanks for putting org-caldav up!

I’m trying to sync org-caldav with my Radicale server. The server already works fine with two other clients (Davdroid and Lightning).

On calling org-caldav-sync the first time I’m asked to insert my credentials and get this in the debug buffer:

========== Started sync.
Check connection for https://78.207.124.165:5232/vic/test/.
Got error status from PROPFIND: 
(("https://78.207.124.165:5232/vic/test/" DAV:status 401 . ""))

Then if I call org-caldav-sync a second time, the output is different:

========== Started sync.
Check connection for https://78.207.124.165:5232/vic/test/.
This is an empty calendar. Setting flag.
Generating ICS file /tmp/org-caldav-260875wY.
=== Updating EventDB from Org
Org UID 05fa1c1f-804a-4065-af71-2ba87ed56935: New
=== Updating EventDB from Cal
=== Updating events in calendar
Event UID 05fa1c1f-804a-4065-af71-2ba87ed56935: Org --> Cal
Putting event UID 05fa1c1f-804a-4065-af71-2ba87ed56935.
Content of event UID 05fa1c1f-804a-4065-af71-2ba87ed56935: 
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20160405T071238Z
UID:05fa1c1f-804a-4065-af71-2ba87ed56935
DTSTART;VALUE=DATE:20160407
DTEND;VALUE=DATE:20160408
SUMMARY:Nouveau truc à faire vendredi
DESCRIPTION:
CATEGORIES:appointments
END:VEVENT
END:VCALENDAR

Got error: HTTP/1.0 201 Created
Event UID 05fa1c1f-804a-4065-af71-2ba87ed56935: Error while doing Org --> Cal

Meanwhile, the radicale server says the following. First attempt:

2016-04-05 09:19:06,441 - INFO: OPTIONS request at /vic/test/ received
2016-04-05 09:19:06,532 - INFO: PROPFIND request at /vic/test/ received
2016-04-05 09:19:06,959 - INFO: Anonymous user refused
2016-04-05 09:19:16,415 - INFO: PROPFIND request at /vic/test/ received

And for the second attempt:

2016-04-05 09:20:26,856 - INFO: OPTIONS request at /vic/test/ received
2016-04-05 09:20:26,944 - INFO: PROPFIND request at /vic/test/ received
2016-04-05 09:20:28,316 - INFO: PUT request at /vic/test/05fa1c1f-804a-4065-af71-2ba87ed56935.ics received
2016-04-05 09:20:30,088 - INFO: PROPFIND request at /vic/test/ received

No actual errors as far as I see.
In my init.el I have this:

(setq
org-caldav-url "https://78.207.124.165:5232/vic"
org-caldav-calendar-id "test"
org-caldav-debug-level 2
org-icalendar-timezone "Europe/Paris")

I also tried many other combinations of "vic" and "test" amongst the org-caldav-url and org-caldav-calendar-id. Same result each time. The Radicale collection on the server looks like this:

nestor:/# ls /var/lib/radicale/collections/vic/
addressbook.vcf        calendar.ics.props  test.ics.props  vic      vic.ics.props
addressbook.vcf.props  test.ics            test.props      vic.ics  vic.props

If i try with a calendar id which doesn’t yet exist, like org-caldav-calendar-id "foo", a file foo.props is created on the server. So I feel I’m really close but… after spending a night on it, I still can’t make it work :-/

I’m running Emacs 25.1.50.1 on Debian testing with org 20160328 and org-caldav 20160306.637.

@svictor9 svictor9 changed the title Trouble syncing with Radicale Trouble syncing with Radicale : error 207 Apr 6, 2016

@svictor9

This comment has been minimized.

Copy link
Author

commented Apr 6, 2016

Update : I just realized that despite the error, my test entry in appointments.org is correctly written to the radicale server. It is written to a file without the .ics extension (a new file if it didn’t exist already). I can then see it on my mobile phone with DavDroid etc.

So the problem seems really org-caldav not suceeding in reading from the server. No change is synced from the server to org. I gets a 207 error in the minibuffer. From the Messages buffer:

Contacting host: 78.207.124.165:5232
Putting event 1 of 3
Putting event 2 of 3
Putting event 3 of 3
org-caldav-get-event-etag-list: Error while getting eventlist from https://78.207.124.165:5232/vic/test/. Got status code: 207.

The org-caldav debug buffer doesn’t mention the 207 error however, only a 201 one (see paste in my initial comment). How can I further debug this 207 error?

@girzel

This comment has been minimized.

Copy link

commented Apr 15, 2016

I'm having this issue as well, and have done some digging. I haven't got it working, but I've made some progress. The trouble appears to be in url-dav.el, not necessarily org-caldav. It looks like Radicale is returning an XML response where the main node name is 'multistatus, not 'DAV:multistatus. The function `url-dav-process-response' only checks for 'DAV:multistatus (url-dav.el:410), and everything goes wrong from there.

I tried monkey-patching so that it checked against 'multistatus instead, and also renamed `url-dav-process-DAV:multistatus' accordingly. That didn't quite work, it was still trying to select a deleted buffer at some point, but I do hope that something in here will be helpful!

@girzel

This comment has been minimized.

Copy link

commented May 4, 2016

I guess this is a bug in Emacs' xml.el. I've opened a bug on the Emacs tracker: 23440.

@dengste

This comment has been minimized.

Copy link
Owner

commented May 16, 2017

That bug is fixed in Emacs master (meaning the upcoming Emacs 26).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.