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

Moving Contact with Birthday Between Address Books Fails #1794

Closed
bj-github opened this issue Sep 11, 2020 · 6 comments
Closed

Moving Contact with Birthday Between Address Books Fails #1794

bj-github opened this issue Sep 11, 2020 · 6 comments
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working

Comments

@bj-github
Copy link

Steps to reproduce

  1. Create 2 Address Books.
  2. Create a contact in the first one with a birthday.
  3. Check Calendar to ensure the birthday is visible.
  4. Click on the Contact's Address Book field to get the drop-down list of Address Books, and select the second.

Expected behaviour

Contact should now simply be seen in the second Address Book.

Actual behaviour

Error box pops up saying "An error occurred while trying to move the contact".

An error is logged "[webdav] Fatal: Sabre\DAV\Exception\BadRequest: Calendar object with uid already exists in this calendar collection. at <>" along with the call stack (included below).

Server configuration

Operating system:
Armbian/Linux 20.08.1 on Hardkernel ODroid C2: Debian Buster-based

Web server:
Apache 2.4.38

Database:
mariadb 10.3.23

PHP version:
php 7.3.19

Nextcloud version: (see Nextcloud admin page)
19.0.3

Contacts version: (see Nextcloud apps page)
3.3.0

Updated from an older Nextcloud or fresh install:
Fresh install via setup-nextcloud.php script.

Signing status:

No errors have been found.

List of activated apps:

Enabled:
  - accessibility: 1.5.0
  - activity: 2.12.0
  - bruteforcesettings: 2.0.1
  - calendar: 2.0.4
  - cloud_federation_api: 1.2.0
  - comments: 1.9.0
  - contacts: 3.3.0
  - contactsinteraction: 1.0.0
  - dav: 1.15.0
  - federatedfilesharing: 1.9.0
  - federation: 1.9.0
  - files: 1.14.0
  - files_pdfviewer: 1.8.0
  - files_rightclick: 0.16.0
  - files_sharing: 1.11.0
  - files_trashbin: 1.9.0
  - files_versions: 1.12.0
  - files_videoplayer: 1.8.0
  - firstrunwizard: 2.8.0
  - logreader: 2.4.0
  - lookup_server_connector: 1.7.0
  - mail: 1.4.1
  - nextcloud_announcements: 1.8.0
  - notifications: 2.7.0
  - oauth2: 1.7.0
  - password_policy: 1.9.1
  - photos: 1.1.0
  - privacy: 1.3.0
  - provisioning_api: 1.9.0
  - recommendations: 0.7.0
  - richdocuments: 3.7.4
  - serverinfo: 1.9.0
  - settings: 1.1.0
  - sharebymail: 1.9.0
  - spreed: 9.0.3
  - support: 1.2.1
  - survey_client: 1.7.0
  - systemtags: 1.9.0
  - text: 3.0.1
  - theming: 1.10.0
  - twofactor_backupcodes: 1.8.0
  - updatenotification: 1.9.0
  - viewer: 1.3.0
  - workflowengine: 2.1.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - user_ldap

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "s05.kramer502"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "19.0.3.1",
        "overwrite.cli.url": "http:\/\/s05.localdomain\/nc",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
No

Are you using encryption: yes/no
No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No

Client configuration

Browser:
Firefox 68.11.0esr

Operating system:
Linux 5.7.0-3-amd64 (Debian testing)

CardDAV-clients:

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

[webdav] Fatal: Sabre\DAV\Exception\BadRequest: Calendar object with uid already exists in this calendar collection. at <<closure>>

 0. /var/www/nc/apps/dav/lib/CalDAV/BirthdayService.php line 384
    OCA\DAV\CalDAV\CalDavBackend->createCalendarObject("*** sensitive parameter replaced ***", "test2-AB8F9B76- ... s", "BEGIN:VCALENDAR ... n")
 1. /var/www/nc/apps/dav/lib/CalDAV/BirthdayService.php line 125
    OCA\DAV\CalDAV\BirthdayService->updateCalendar("*** sensitive parameters replaced ***")
 2. /var/www/nc/apps/dav/lib/AppInfo/Application.php line 133
    OCA\DAV\CalDAV\BirthdayService->onCardChanged(2, "*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 3. /var/www/nc/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 264
    OCA\DAV\AppInfo\Application->OCA\DAV\AppInfo\{closure}("*** sensitive parameters replaced ***")
 4. /var/www/nc/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 239
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch([Closure {}], "*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 5. /var/www/nc/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners([Closure {}], "*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 6. /var/www/nc/lib/private/EventDispatcher/SymfonyAdapter.php line 70
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 7. /var/www/nc/apps/dav/lib/CardDAV/CardDavBackend.php line 663
    OC\EventDispatcher\SymfonyAdapter->dispatch("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 8. /var/www/nc/3rdparty/sabre/dav/lib/CardDAV/AddressBook.php line 147
    OCA\DAV\CardDAV\CardDavBackend->createCard("2", "*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 9. /var/www/nc/3rdparty/sabre/dav/lib/DAV/Tree.php line 311
    Sabre\CardDAV\AddressBook->createFile("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
10. /var/www/nc/3rdparty/sabre/dav/lib/DAV/Tree.php line 135
    Sabre\DAV\Tree->copyNode(Sabre\CardDAV\Card {}, OCA\DAV\CardDAV\AddressBook {}, "*** sensitive parameter replaced ***")
11. /var/www/nc/3rdparty/sabre/dav/lib/DAV/Tree.php line 167
    Sabre\DAV\Tree->copy("addressbooks/us ... f", "addressbooks/us ... f")
12. /var/www/nc/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 641
    Sabre\DAV\Tree->move("addressbooks/us ... f", "addressbooks/us ... f")
13. /var/www/nc/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpMove(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
14. /var/www/nc/3rdparty/sabre/dav/lib/DAV/Server.php line 474
    Sabre\DAV\Server->emit("method:MOVE", [Sabre\HTTP\Requ ... }])
15. /var/www/nc/3rdparty/sabre/dav/lib/DAV/Server.php line 251
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
16. /var/www/nc/3rdparty/sabre/dav/lib/DAV/Server.php line 319
    Sabre\DAV\Server->start()
17. /var/www/nc/apps/dav/lib/Server.php line 320
    Sabre\DAV\Server->exec()
18. /var/www/nc/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
19. /var/www/nc/remote.php line 167
    require_once("/var/www/nc/app ... p")

MOVE /nc/remote.php/dav/addressbooks/users/ncadmin/test1/AB8F9B76-0984-47CD-9EB1-DCA863A8892E.vcf
from 192.168.55.30 by ncadmin at 2020-09-11T07:13:26+00:00

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
@skjnldsv
Copy link
Member

And this works if there is no birthdays?

@skjnldsv skjnldsv added 0. Needs triage bug Something isn't working needs info Not enough information provided labels Sep 11, 2020
@bj-github
Copy link
Author

And this works if there is no birthdays?

Exactly, yes.

@bj-github
Copy link
Author

I can also confirm that having an Anniversary or Date of Death set triggers the same failure when attempting to move a Contact to a different Address Book.

@skjnldsv
Copy link
Member

Thank you very much for the tests! :)

@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage needs info Not enough information provided labels Sep 11, 2020
@skjnldsv skjnldsv added this to the next milestone Sep 11, 2020
@bj-github
Copy link
Author

Sorry, something else I should've mentioned: after the failure, the Contact I tried to move will appear twice, one tagged to the first Address Book and the other tagged to the second.

I just checked the "Download" vcf contents in each case and they are identical, including UID and REV timestamp. The Calendar, however, shows only a single entry for the Anniversary/Birthday/Date of Death in each case.

@skjnldsv
Copy link
Member

skjnldsv commented Oct 3, 2020

See nextcloud/server#20492

@skjnldsv skjnldsv closed this as completed Oct 3, 2020
@skjnldsv skjnldsv removed this from the next milestone Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants