Nextcloud 31.0.4 issues with CalDAV/CardDAV on iOS 18.4.1

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.4
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian Bullseye
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.62-1~deb11u2
  • PHP version (e.g, 8.3):
    • 8.3.21
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • about 2 months ago
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare Metal/Archive
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Since about two months I cannot sync calenders and contacts with my iOS devices (iPhone and iPad) anymore. As these are not my main devices, I did not notice first and cannot say, when this issue first came up. No webserver or Nextcloud config settings were changed for a long time, but both Nextcloud and iOS updates were done in the last two months.

Steps to replicate it (hint: details matter!):

  1. I used the classic URL for iOS (https://DOMAIN/remote.php/dav/principals/users/USERNAME/) but also just tried https://DOMAIN as I have the .well-know rewrites active. Both throws a SSL error. In the log I see App token login name does not match (yes, I use 2FA and created and recreated an app token for this, I also used a different app token which works for Thunderbird, but here it throws the same error).
  2. When I disable SSL and change the port to 80, it works first (even though it should not according to the Nextcloud documentation since iOS 12 or so). Also http traffic is rewritten to https through Apache. Strange!
  3. I read a lot on Google and here in the forum but everything I came up with did not work. I do not know what else to check.
  4. On my Android phone using DAVx5 everything works fine btw. Also in Thunderbird and in the web interface.

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

{"reqId":"aCRIVn6oHlk3-1SKJXkWWQAAAAQ","level":3,"time":"2025-05-14T07:37:58+00:00","remoteAddr":"2a01:xxxx","user":false,"app":"core","method":"PROPFIND","url":"/remote.php/dav/addressbooks/users/user%40domain.tld/","message":"App token login name does not match","userAgent":"iOS/18.4.1 (22E252) dataaccessd/1.0","version":"31.0.4.1","data":{"tokenLoginName":"user@domain.tld","sessionLoginName":"user%40domain.tld","app":"core","user":"user@domain.tld"}}

Configuration

Nextcloud

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.4.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "forcessl": true,
        "theme": "",
        "trusted_domains": [
            "domain.tld"
        ],
        "secret": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 1,
        "trashbin_retention_obligation": "auto, 7",
        "versions_retention_obligation": "auto, 31",
        "default_language": "de_DE",
        "default_phone_region": "DE",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "password": "***REMOVED SENSITIVE VALUE***",
            "timeout": 0,
            "dbindex": 0
        },
        "singleuser": false,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_smtptimeout": 10,
        "mail_smtpauthtype": "LOGIN",
        "user_backends": [
            {
                "class": "\\OCA\\UserExternal\\IMAP",
                "arguments": [
                    "mail.domain.tld",
                    993,
                    "ssl",
                    "",
                    false,
                    false
                ]
            }
        ],
        "overwrite.cli.url": "https:\/\/domain.tld",
        "mysql.utf8mb4": true,
        "activity_expire_days": 31,
        "data-fingerprint": "58f631fc024f12a888521e695308e4c4",
        "updater.release.channel": "stable",
        "app_install_overwrite": [
            "fulltextsearch",
            "files_fulltextsearch_tesseract",
            "gpxedit",
            "user_external",
            "piwik"
        ],
        "encryption.legacy_format_support": false,
        "encryption.key_storage_migrated": false,
        "profile.enabled": false,
        "maintenance_window_start": 1,
        "mail_sendmailmode": "smtp",
        "overwriteprotocol": "https",
        "cors.allowed-origins": [
            "https:\/\/domain.tld"
        ]
    }
}

Apps

Enabled:
  - activity: 4.0.0
  - admin_audit: 1.21.0
  - app_api: 5.0.2
  - audioplayer: 3.4.1
  - bookmarks: 15.1.0
  - bruteforcesettings: 4.0.0
  - calendar: 5.2.3
  - camerarawpreviews: 0.8.7
  - cfg_share_links: 7.0.1
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contacts: 7.0.6
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - deck: 1.15.1
  - emlviewer: 1.0.11
  - encryption: 2.19.0
  - event_update_notification: 2.6.1
  - external: 6.0.2
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_antivirus: 6.0.2
  - files_downloadactivity: 1.18.1
  - files_downloadlimit: 4.0.0
  - files_external: 1.23.0
  - files_fulltextsearch: 31.0.0
  - files_fulltextsearch_tesseract: 27.0.1
  - files_linkeditor: 1.1.22
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_retention: 2.0.1
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - forms: 5.1.0
  - fulltextsearch: 31.0.0
  - fulltextsearch_elasticsearch: 31.0.0
  - gpxpod: 7.0.4
  - groupfolders: 19.0.4
  - imageconverter: 2.0.5
  - impersonate: 2.0.0
  - keeweb: 0.6.21
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - mail: 5.0.6
  - metadata: 0.22.0
  - music: 2.1.4
  - news: 25.3.1
  - nextcloud_announcements: 3.0.0
  - notes: 4.12.0
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - onlyoffice: 9.8.0
  - ownershiptransfer: 1.1.0
  - password_policy: 3.0.0
  - phonetrack: 0.8.2
  - photos: 4.0.0-dev.1
  - piwik: 0.13.0
  - polls: 7.4.2
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - qownnotesapi: 25.2.0
  - quicknotes: 0.8.30
  - quota_warning: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - secrets: 2.1.2
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - side_menu: 5.1.0
  - socialsharing_diaspora: 3.3.0
  - socialsharing_email: 3.3.0
  - socialsharing_facebook: 3.3.0
  - socialsharing_telegram: 3.3.0
  - socialsharing_twitter: 3.3.0
  - spreed: 21.0.4
  - suspicious_login: 9.0.1
  - systemtags: 1.21.1
  - tasks: 0.16.1
  - text: 5.0.0
  - theming: 2.6.1
  - theming_customcss: 1.18.0
  - twofactor_backupcodes: 1.20.0
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - unroundedcorners: 1.1.4
  - updatenotification: 1.21.0
  - user_external: 3.4.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflow_pdf_converter: 2.0.0
  - workflowengine: 2.13.0

Hey @Roi ,
we created similar issues right around the same time:

In my scenario, only contacts with address information are affected.
Is that also the case for you?

I don’t have a scalable solution for the issue. I am just trying to narrow things down.

Hey David,

I’m not sure if this is the same problem. When I wrote that it works/worked with port 80, this seems to have been a single thing. At least for the calendars. So I got the calendar entries and appointments, but now nothing is updating in both directions. Also I see the error in nextcloud.log again. For contacts it looks like I do not see any contacts anymore on my iPhone (where I never deleted the CardDAV account, only changed the settings). At least everybody who called today did not show with a name, only with a number.

Regards,
Martin

Your username contains an @ right?

This sounds like [Bug]: Server 31.0.4 CalDAV and iOS 18.4.1 Username with "@" leads to login/sync failure · Issue #52476 · nextcloud/server · GitHub then.

A user reported that iOS 18.5 is resolving it.

1 Like

Yes.

You were right, thank you. I just installed iOS 18.5 manually through iTunes (both devices are company devices where the new iOS is not yet released through the management profile. And yeah, it works again!

My guess is that it stopped working with iOS 18.3 or 18.4 - just taking the release dates.

Wow, what a mess… Thanks again!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.