nextcloud / nextcloud/contacts

Parse errors in a contact make the entire app UI fail and show no contacts at all

Open
#5,149 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug feature: contacts
Dominant language
JavaScript
Stars
642
Forks
220
Avg merge
14h 39m
Merged PRs (30d)
51

Description

Describe the bug

Importing some vCards makes the Contacts web UI show no contacts at all, not even the older contacts and address books. There is no way to get out of this state, within the web UI. Need external tools or admin access to fix it.

Steps to reproduce
  1. Populate your Contacts and primary address book with some normal valid contacts
  2. Get vCard test data, and extract the ZIP file. Original source: vcard-test-suite valid test samples
  3. Log in to NextCloud and go to Contacts app
  4. Create a new addressbook "Test"
  5. Import: Click "Import", select addressbook "Test", click "Select local file", and select the all.vcf file from step 1
  6. -> None of the vcards import properly, but the groups have been created, and their number shows that they have contacts, but none of them show
  7. Log out and log in again
Expected behavior
  • You get a report about errors during import, one entry per contact
  • If there are individual properties that are invalid or not supported, skip those, and still import the rest of the contact
  • If the contact cannot be parsed at all, skip it, and import the other contacts
  • If none of the contacts could be imported, show an error explaining why
  • Other contacts still work
  • No "hidden" contacts
Actual behavior
  • The Contacts app says that you have no address books at all.
  • You cannot see any contacts at all. The app shows "No contacts"
  • The groups still show, and they show that they have contacts in the group. But when you click on a group, you see "no contacts"
  • The contacts are stored, but there's no way to see them, and no way to remove them, in the web UI
  • There are errors on the browser console
  • You are stuck. No way to get out.
  • When you sync the addressbook via CardDAV with Thunderbird (if you know the CardDAV URL, because the web UI shows "no addressbooks"), you see the contacts in "Test". Some of them have no name, others have punctuation as name. You can delete all contacts in "Test" in Thunderbird. Once that is done (it's very slow), and log out and login again, then you can see your normal contacts (from step 0), and the groups are gone as well.
Contact version

7.3.16

NextCloud version

Nextcloud Hub 10 (31.0.13)

Operating system

Linux 6.8.0-94-generic x86_64

PHP engine version

PHP 8.3

Web server

Unknown

Database

MySQL

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure through the Contacts app import flow using the linked vCard data, then inspect the browser console errors and the resulting addressbook and contact views. Done means invalid contacts or properties no longer hide existing contacts, valid contacts still import, and the UI reports contacts that could not be imported.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
full-stack
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.