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

Error (Sabre\DAV\Exception\BadRequest) for "dav:sync-birthday-calendar $USER" #12754

Closed
sokai opened this issue Nov 30, 2018 · 3 comments
Closed
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap

Comments

@sokai
Copy link

sokai commented Nov 30, 2018

Background

A user at my NC installation had some birthdays twice in his birthday calendar and I (the admin) wanted to fix it. So I found #1854 (and the forums thread "How can I create the birthdays calendar again?").

Because I wouldn't interact with the user (and force him to remove his bday calendar) like mentioned in #1854 I only tried the occ command dav:sync-birthday-calendar for the users account and got the exception.
After looking around I found the same problem reported from @christian-weiss at nextcloud/contacts#507 (comment) (and ff.) without a solution for that exception.

Also because I can't identify the (maybe) corrupted VCard (in the database?) or something else I opened this issue …

Steps to reproduce

  1. /usr/bin/php occ -v dav:sync-birthday-calendar $user

Expected behaviour

  • The bday calendar of the $user should be (re-)synced.
  • People from the address book (with birthdays or anniversaries) are shown (only) one time in the bday calendar of the $user.

Actual behaviour

Exception.

Start birthday calendar sync for $user

  [Sabre\DAV\Exception\BadRequest]
  Calendar object with uid already exists in this calendar collection.

Exception trace:
 () at /**path removed**/apps/dav/lib/CalDAV/CalDavBackend.php:988
 OCA\DAV\CalDAV\CalDavBackend->createCalendarObject() at /**path removed**/apps/dav/lib/CalDAV/BirthdayService.php:309
 OCA\DAV\CalDAV\BirthdayService->updateCalendar() at /**path removed**/apps/dav/lib/CalDAV/BirthdayService.php:99
 OCA\DAV\CalDAV\BirthdayService->onCardChanged() at /**path removed**/apps/dav/lib/CalDAV/BirthdayService.php:248
 OCA\DAV\CalDAV\BirthdayService->syncUser() at /**path removed**/apps/dav/lib/Command/SyncBirthdayCalendar.php:89
 OCA\DAV\Command\SyncBirthdayCalendar->execute() at /**path removed**/3rdparty/symfony/console/Command/Command.php:264
 Symfony\Component\Console\Command\Command->run() at /**path removed**/3rdparty/symfony/console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at /**path removed**/3rdparty/symfony/console/Application.php:228
 Symfony\Component\Console\Application->doRun() at /**path removed**/3rdparty/symfony/console/Application.php:130
 Symfony\Component\Console\Application->run() at /**path removed**/lib/private/Console/Application.php:173
 OC\Console\Application->run() at /**path removed**/console.php:90
 require_once() at /**path removed**/occ:11

dav:sync-birthday-calendar [<user>]

Server configuration

Operating system: Linux (Debian GNU/Linux 9)

Web server: Nginx

Database: MariaDB

PHP version: 7.0

Nextcloud version: 13.0.8 (update channel "production"; I never got a upgrade option to NC14)

Updated from an older Nextcloud/ownCloud or fresh install: came from OC (unknown version) years ago and upgraded step-by-step

Thanks in advance for any hints and/or fixing this bug …!

@sokai sokai changed the title Error (Sabre\DAV\Exception\BadRequest) for dav:sync-birthday-calendar $USER Error (Sabre\DAV\Exception\BadRequest) for "dav:sync-birthday-calendar $USER" Dec 2, 2018
@nursoda
Copy link

nursoda commented Jan 3, 2019

Same issue here: "sudo -u www-data php occ dav:sync-birthday-calendar USER" yields "[Sabre\DAV\Exception\BadRequest] Calendar object with uid already exists in this calendar collection.", even without OC migration background. My NC 13.0.8 still is on Debian jessie current, Apache and MySQL (migration to NC 15 due in the next couple of days).

I tried to delete the birthday calendar first, and to deactivate all address books. Since the error still triggered, I suspected an inconsistent Calendar database (clashing UIDs). It turned out that deleting all Calendars didn't make any difference. But: Deleting and re-importing all address books AND the birthday calendar silenced the error.

Before that, I also tried to repair, to no avail. (If anyone stumbles into that: "occ maintenance:repair" yields errors if started in maintenance mode, so despite of my presumptions, it's meant NOT to be run in maintenance mode since it there cannot access "repair step" apps.)

Worth to keep this bug is the fact that it is VERY annoying that the error message doesn't contain the conflicting UID. While that may be a SabreDAV issue, it's the question how their APIs are used an whether a NC dev filed an upstream bug accordingly.

@sokai
Copy link
Author

sokai commented Feb 12, 2019

FYI: same behaviour after upgrade to v15.0.4 (on upgrade channel „production“ and with PHP v7.3) :-|

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@georgehrke
Copy link
Member

Duplicate of #8629 indeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap
Projects
None yet
Development

No branches or pull requests

4 participants