[SOLVED] DAV-Syncs partially not working anymore after upgrading to 28.0.1

I am running my NextCloud docker container for several years and had no problem to sync contacts and calendars with our families Android- and iOS-phones.

But I recently upgraded this installation from 27.1.5 to 28.0.1 and now I am able to sync with my Android phone, but the iOS device is not able to get or put the DAV data anymore!

In nextcloud.log I can find several error messages of type:

"No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured [...]" and "This recurrence rule does not generate any valid instances"

More details:

{
    "reqId": "tbOkBgqXPnbv26vuRZDs",
    "level": 0,
    "time": "2024-01-24T09:59:14+01:00",
    "remoteAddr": "<IP>",
    "user": "<username>",
    "app": "webdav",
    "method": "PROPFIND",
    "url": "/remote.php/dav/calendars/<username>/",
    "message": "No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured",
    "userAgent": "iOS/17.2.1 (21C66) dataaccessd/1.0",
    "version": "28.0.1.1",
    "exception": {
        "Exception": "Sabre\\DAV\\Exception\\NotAuthenticated",
        "Message": "<see above>",
        "Code": 0,
        "Trace": [<...>],
        "File": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php",
        "Line": 152,
        "message": "<see above>",
        "exception": {},
        "CustomMessage": "<see above>"
    }
}

{
    "reqId": "XTi8LQ1dEgC3XwseokGU",
    "level": 3,
    "time": "2024-01-24T09:59:15+01:00",
    "remoteAddr": "87.180.164.162",
    "user": "<username>",
    "app": "webdav",
    "method": "PUT",
    "url": "/remote.php/dav/calendars/<username>/gemeinsamer-kalender_shared_by_<username2>/F12B980B-3A08-445A-B229-0389387CBF75.ics",
    "message": "This recurrence rule does not generate any valid instances",
    "userAgent": "iOS/17.2.1 (21C66) dataaccessd/1.0",
    "version": "28.0.1.1",
    "exception": {
        "Exception": "Sabre\\VObject\\Recur\\NoInstancesException",
        "Message": "This recurrence rule does not generate any valid instances",
        "Code": 0,
        "Trace": [<...>],
        "File": "/var/www/html/3rdparty/sabre/vobject/lib/Recur/EventIterator.php",
        "Line": 192,
        "message": "This recurrence rule does not generate any valid instances",
        "exception": {},
        "CustomMessage": "This recurrence rule does not generate any valid instances"
    }
}

The same events are generating the following lines in the containers output:

<ip> - - [24/Jan/2024:08:59:14 +0000] "PROPFIND /remote.php/dav/calendars/<username>/ HTTP/1.1" 401 1361 "-" "iOS/17.2.1 (21C66) dataaccessd/1.0"
<ip> - <username> [24/Jan/2024:08:59:14 +0000] "PROPFIND /remote.php/dav/calendars/<username>/ HTTP/1.1" 207 2486 "-" "iOS/17.2.1 (21C66) dataaccessd/1.0"
<ip> - - [24/Jan/2024:08:59:15 +0000] "PUT /remote.php/dav/calendars/<username>/gemeinsamer-kalender_shared_by_<username2>/F12B980B-3A08-445A-B229-0389387CBF75.ics HTTP/1.1" 401 1163 "-" "iOS/17.2.1 (21C66) dataaccessd/1.0"
<ip> - <username> [24/Jan/2024:08:59:15 +0000] "PUT /remote.php/dav/calendars/<username>/gemeinsamer-kalender_shared_by_<username2>/F12B980B-3A08-445A-B229-0389387CBF75.ics HTTP/1.1" 500 836 "-" "iOS/17.2.1 (21C66) dataaccessd/1.0"
<ip> - - [24/Jan/2024:08:59:15 +0000] "PROPFIND /remote.php/dav/calendars/<username>/inbox/ HTTP/1.1" 401 1163 "-" "iOS/17.2.1 (21C66) dataaccessd/1.0"
<ip> - <username> [24/Jan/2024:08:59:15 +0000] "PROPFIND /remote.php/dav/calendars/<username>/inbox/ HTTP/1.1" 207 1298 "-" "iOS/17.2.1 (21C66) dataaccessd/1.0"
<ip> - - [24/Jan/2024:08:59:15 +0000] "PROPFIND /remote.php/dav/calendars/<username>/inbox/ HTTP/1.1" 401 1163 "-" "iOS/17.2.1 (21C66) dataaccessd/1.0"
<ip> - <username> [24/Jan/2024:08:59:15 +0000] "PROPFIND /remote.php/dav/calendars/<username>/inbox/ HTTP/1.1" 207 1298 "-" "iOS/17.2.1 (21C66) dataaccessd/1.0"

The lines where no username is stated after the remote IP are resulting in a HTTP-401, the lines where this username is given producing HTTP-207.

I am not sure, if this is related to this issue since there all calls are resulting in a HTTP-401.

Have any of you observed similar behavior or have any ideas as to why this might be the case? I have not changed the configuration during or after the upgrade.

Before you ask: of course I checked the correctness of the credentials on the iphone.

Thank you very much in advance for your support!

I solved this issue by myself.

First I tried if I am able to access https://nextcloud.<mydomain>.<tld>/.well-known/caldav from the affected iPhone, which was successful after entering the right credentials.

Then I removed the NextCloud configuration profile from the iPhone (see > Settings > General > VPN & Device Maintenance) and get a new one by using the NextCloud-UI-Function by clicking on the profile button in the upper right corner, and then navigating to > Settings > Mobile & Desktop > Download macOS/iOS Configuration Profile and installed it.

Note: The accounts password has to be entered twice during the profile installation process since not only the CalDAV- but also the CardDAV-connection will be installed.

After that renewal the Cal- and CardDAV-synchronisation works well again.

Unfortunately I did not store the old configuration profile file since in this case it would be possible to compare the old and the new one to get an idea about the problem with the old profile in combination with NextCloud version 28.0.1

I hope that this may help other people here in the community.