Skip to content

[Bug]: Contacts import fails with TypeError in TextImporter::extract() (Nextcloud 35.0.3) #66917

Open

Description

@aripapage

⚠️ This issue respects the following points: ⚠️

  • This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
  • This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
  • I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
  • I agree to follow Nextcloud's Code of Conduct.
  • I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.

Bug description

Importing a .vcf file in the Contacts app fails with "partially failed, 0 contacts imported". The log shows a TypeError in the CardDAV import code before any contact is processed.

TypeError: OCA\DAV\CardDAV\Import\TextImporter::extract(): Argument #1 ($start) must be of type int, string given, called in /var/www/nextcloud/apps/dav/lib/CardDAV/Import/ImportService.php on line 75 at /var/www/nextcloud/apps/dav/lib/CardDAV/Import/TextImporter.php#151

Request: `POST /ocs/v2.php/contacts/import`, log level 3, app "PHP".

### Steps to reproduce

1.1. Export contacts from Google Contacts (web) as vCard (.vcf), 606 contacts.
2. In Nextcloud Contacts, open Settings → Import contacts.
3. Select the .vcf file and import it into a new address book.
4. The import reports that 0 contacts were imported.

I repeated this three times with the same result.

### Expected behavior

The contacts are imported into the selected address book.

### Nextcloud Server version

35

### Operating system

Debian/Ubuntu

### PHP engine version

PHP 8.4

### Web server

Apache (supported)

### Database engine version

MariaDB

### Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

### Are you using the Nextcloud Server Encryption module?

None

### What user-backends are you using?

- [ ] Default user-backend _(database)_
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other

### Configuration report

```json

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

TypeError: OCA\DAV\CardDAV\Import\TextImporter::extract(): Argument #1 ($start) must be of type int, string given, called in /var/www/nextcloud/apps/dav/lib/CardDAV/Import/ImportService.php on line 75 at /var/www/nextcloud/apps/dav/lib/CardDAV/Import/TextImporter.php#151

Request: `POST /ocs/v2.php/contacts/import`, log level 3, app "PHP".

Additional info

  • Nextcloud version: 35.0.3.2 (Hub 26 Summer)
  • Installation method: manual (zip), Apache with mod_php
  • OS: Debian 13 (Trixie)
  • PHP: 8.4 (Debian package)
  • Database: MariaDB (Debian 13 package)
  • Caching: APCu (local), Redis (distributed and locking)
  • Browser: Firefox 160 on Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap35-feedbackbug

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions