pimutils / pimutils/vdirsyncer
unkown error 403 on vdirsyncer sync after task creation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 185
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 1
Description
Before you submit bug reports: https://vdirsyncer.pimutils.org/en/stable/contributing.html
Things to include in your bugreport:
- Your vdirsyncer version
0.16.6 - If applicable, which server software (and which version) you're using
- Your Python version
2.7.15 and 3.6.5 - Your operating system
OpenSUSE 15 - Your config file
[general]
# A folder where vdirsyncer can store some metadata about each pair.
status_path = "~/.local/share/vdirsyncer/status/"
[pair restCalendar]
a = "restCalendarLocal"
b = "restCalendarRemote"
# collections = ["private", "work"]
collections = ["from b"]
# Calendars also have a color property
metadata = ["rest", "blue"]
# To resolve a conflict the following values are possible:
# `null` - abort when collisions occur (default)
# `"a wins"` - assume a's items to be more up-to-date
# `"b wins"` - assume b's items to be more up-to-date
conflict_resolution = "a wins"
[storage restCalendarLocal]
type = "filesystem"
path = "~/.local/share/vdirsyncer/calendars/user/"
fileext = ".ics"
[storage restCalendarRemote]
type = "caldav"
url = "https://spica.t-online.de"
username = "user@t-online.de"
password.fetch = ["command", "pass", "sync/rest"]
- Use
vdirsyncer -vdebugfor debug output. The output is sensitive, but
please attach at least the last few lines before the error (if applicable),
censored as necessary. This is almost always the most useful information.
If there is a single task test in the list whose content is
BEGIN:VCALENDAR
VERSION:2.0
PRODID:io.barrera.todoman
BEGIN:VTODO
CREATED;VALUE=DATE-TIME:20181109T002041Z
DTSTAMP;VALUE=DATE-TIME:20181109T002041Z
DUE;VALUE=DATE-TIME:20181111T002000Z
LAST-MODIFIED;VALUE=DATE-TIME:20181109T002048Z
SEQUENCE:1
STATUS:NEEDS-ACTION
SUMMARY:test
UID:68049bd6662e456096a8a3479368055e@user-pc
END:VTODO
END:VCALENDAR
then vdirsyncer -v DEBUG sync gives
debug: Sending request...
debug: 403
debug: {'Date': 'Fri, 09 Nov 2018 00:21:50 GMT', 'Server': 'Apache', 'X-Generated-By': 'spica06.aul.t-online.de', 'X-Request-ID': 'a1469177-6694-48e7-86ad-649c6b4b93c0', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'Strict-Transport-Security': 'max-age=31536000 ; includeSubDomains', 'X-Frame-Options': 'DENY', 'Content-Length': '0', 'Keep-Alive': 'timeout=5, max=99', 'Connection': 'Keep-Alive', 'Content-Type': 'text/calendar'}
debug: b''
error: Unknown error occured for restCalendar/ADDRESS_BOOK: 403 Client Error: for url: https://spica.t-online.de/spica-calendar/caldav/principals/user@t-online.de/calendars/ADDRESS_BOOK/120049010000000065340288-120049010000000065340288_2365622157_B.ics
error: Use `-vdebug` to see the full traceback.
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/cli/utils.py", line 74, in handle_cli_error
debug: raise e
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/sync/__init__.py", line 153, in sync
debug: partial_sync
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/sync/__init__.py", line 177, in run
debug: self._run_impl(a, b)
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/sync/__init__.py", line 228, in _run_impl
debug: self.dest.storage.update(meta.href, self.item, meta.etag)
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/storage/base.py", line 15, in inner
debug: return f(self, *args, **kwargs)
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/storage/base.py", line 15, in inner
debug: return f(self, *args, **kwargs)
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/storage/dav.py", line 546, in update
debug: href, etag = self._put(self._normalize_href(href), item, etag)
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/storage/dav.py", line 520, in _put
debug: headers=headers
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/storage/dav.py", line 390, in request
debug: return http.request(method, url, session=self._session, **more)
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/http.py", line 163, in request
debug: r.raise_for_status()
debug: File "/home/epn/.local/lib/python3.6/site-packages/requests/models.py", line 935, in raise_for_status
debug: raise HTTPError(http_error_msg, response=self)
error: 2 out of 6 tasks failed.
See also https://github.com/pimutils/todoman/issues/334.
Any idea why this error message occurs? Strangely, the OpenTasks Android app informed that the t-online calendar permits adding tasks, but Thunderbird Lightning thinks differently. Who's right? Can a calendar be set to allow tasks?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the sync traceback at sync/init.py, then inspect storage/dav.py around update, _put, and request, and http.py around request. Reproduce the 403 against the supplied CalDAV URL and task data, then determine whether the client or server behavior needs changing; done means the cause and expected handling are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100