Dear DAVdroid Developers,
I noticed that after adding events offline, they get dropped during synchronization.
Thank you in advance for fixing the bug.
Best regards
Henryk
My system
- CM-11 (Android 4.4.2), without gapps
- DAVdroid (0.5.12-alpha f-droid version)
- Radicale (0.8)
How to Reproduce the Problem
- Go offline (DAVdroid should not be able to connect to the server)
- Open calendar app and add an event
- In calendar menu press Refresh (DAVdroid is not able to sync,
nothing really happens)
- Go online (DAVdroid should be able to connect to the server)
- Try to sync (e.g. by pressing the Refresh option in the calendar
app)
- The added event gets removed
When the event is added, when DAVdroid is able to connect to the server, there are no problems.
Server Logs
I looked at the server logs and there was a difference in the HTTP request headers.
Failed request contained: ‘HTTP_IF_MATCH’: ‘*’
The successful request contained: ‘HTTP_IF_NONE_MATCH’: ‘*’,
Both logs are below for reference.
Failed Request
PUT request at /hhhon/calendar.ics/20140408T073359Z-2568_dffdded70276e7b1.ics received
Request headers:
{'CONTENT_LENGTH': '434',
'CONTENT_TYPE': 'text/calendar',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
'HTTP_AUTHORIZATION': 'Basic XXX',
'HTTP_CONNECTION': 'Keep-Alive',
'HTTP_HOST': 'localhost:5232',
'HTTP_IF_MATCH': '*',
'HTTP_USER_AGENT': 'DAVdroid/0.5.12-alpha',
'PATH_INFO': '/hhhon/calendar.ics/20140408T073359Z-2568_dffdded70276e7b1.ics',
'QUERY_STRING': '',
'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': 'localhost.my.domain',
'REQUEST_METHOD': 'PUT',
'SCRIPT_NAME': '',
'SERVER_NAME': 'localhost.my.domain',
'SERVER_PORT': '5232',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.6',
'wsgi.errors': <open file '<stderr>', mode 'w' at 0x801c401e0>,
'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x804430e88>,
'wsgi.input': <socket._fileobject object at 0x80468cb50>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}
Sanitized path: /hhhon/calendar.ics/20140408T073359Z-2568_dffdded70276e7b1.ics
Request content:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//bitfire web engineering//DAVdroid 0.5.12-alpha//EN
BEGIN:VEVENT
DTSTAMP:20140408T073554Z
UID:20140408T073359Z-2568@dffdded70276e7b1
DTSTART;VALUE=DATE:20140412
DTEND;VALUE=DATE:20140413
SUMMARY:aaa
STATUS:CONFIRMED
ORGANIZER:mailto:hhhon@localhost
LAST-MODIFIED:20140408T073554Z
BEGIN:VALARM
TRIGGER:-PT10M
ACTION:DISPLAY
DESCRIPTION:aaa
END:VALARM
END:VEVENT
END:VCALENDAR
hhhon has read access to collection hhhon/calendar.ics/
hhhon has write access to collection hhhon/calendar.ics/
Answer status: 412 Precondition Failed
Successful Request
PUT request at /hhhon/calendar.ics/20140408T074309Z-2568_dffdded70276e7b1.ics received
Request headers:
{'CONTENT_LENGTH': '434',
'CONTENT_TYPE': 'text/calendar',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
'HTTP_AUTHORIZATION': 'Basic XXX',
'HTTP_CONNECTION': 'Keep-Alive',
'HTTP_HOST': 'localhost:5232',
'HTTP_IF_NONE_MATCH': '*',
'HTTP_USER_AGENT': 'DAVdroid/0.5.12-alpha',
'PATH_INFO': '/hhhon/calendar.ics/20140408T074309Z-2568_dffdded70276e7b1.ics',
'QUERY_STRING': '',
'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': 'localhost.my.domain',
'REQUEST_METHOD': 'PUT',
'SCRIPT_NAME': '',
'SERVER_NAME': 'localhost.my.domain',
'SERVER_PORT': '5232',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.6',
'wsgi.errors': <open file '<stderr>', mode 'w' at 0x801c401e0>,
'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x804430e88>,
'wsgi.input': <socket._fileobject object at 0x80468cb50>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}
Sanitized path: /hhhon/calendar.ics/20140408T074309Z-2568_dffdded70276e7b1.ics
Request content:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//bitfire web engineering//DAVdroid 0.5.12-alpha//EN
BEGIN:VEVENT
DTSTAMP:20140408T074309Z
UID:20140408T074309Z-2568@dffdded70276e7b1
DTSTART;VALUE=DATE:20140412
DTEND;VALUE=DATE:20140413
SUMMARY:aaa
STATUS:CONFIRMED
ORGANIZER:mailto:hhhon@localhost
LAST-MODIFIED:20140408T074309Z
BEGIN:VALARM
TRIGGER:-PT10M
ACTION:DISPLAY
DESCRIPTION:aaa
END:VALARM
END:VEVENT
END:VCALENDAR
hhhon has read access to collection hhhon/calendar.ics/
hhhon has write access to collection hhhon/calendar.ics/
Answer status: 201 Created