Repository navigation
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
OneCalendar users are experiencing errors when syncing caldav calendars with Nextcloud. This used to be working.
As OneCalendar developer I tried to reproduce the problem and for the latest versions of 28,29 and 30 the Caldav response is no longer working correctly when
doing a initial sync.
Hereby an overview of which versions are working correct/incorrect:
- 28.0.9 Correct
- 28.0.10 Incorrect
- 28.0.11 Incorrect
- 29.0.6 Correct
- 29.0.7 Incorrect
- 29.0.8 Incorrect
- 30.0.0 Incorrect
Steps to reproduce
Sync caldav calendar data:
Request data
<sync-collection xmlns="DAV:">
<sync-token />
<sync-level>1</sync-level>
<limit>
<nresults>100</nresults>
</limit>
<prop>
<getetag />
</prop>
</sync-collection>
Actual response data (507):
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Interne serverfout</s:exception>
<s:message>
De server was niet in staat je aanvraag te verwerken. Stuur de hieronder afgebeelde technische details naar de serverbeheerder wanneer dit opnieuw gebeurt. Meer details in de serverlogging, </s:message>
<s:technical-details>
<s:remote-address>172.17.0.1</s:remote-address>
<s:request-id>du8YMujFjQr6HIRmBFm1</s:request-id>
</s:technical-details>
</d:error>
Expected behavior
According to https://tools.ietf.org/html/rfc6578#section-3.11 the caldav server does not need to support limit tag but in that case the following 507 response data is expected:
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>OCA\DAV\Exception\UnsupportedLimitOnInitialSyncException</s:exception>
<s:message/>
<d:number-of-matches-within-limits/>
</d:error>
Nextcloud Server version
28
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
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
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
Perhaps there has been a minor update/fix of SabreDav that caused this problem in the newer 28/29/30 versions ?
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fields☑️ Done
Activity
joshtrichards commentedon Oct 13, 2024
The
nextcloud.logshould have a stack trace or some logging associated with this request id since it's an internal server error (I believe). Happen to have it handy from one of the instances that isn't responding as expected?Enabling debug mode should also populate
technical-detailswith more info.I haven't looked too closely, but so far the changes introduced via #47770 & #47805 align most closely with your findings.
kesselb commentedon Oct 14, 2024
Thanks for your report, and sorry for the troubles.
I agree with Josh that likely #47770 and #47805 changed how we handle the UnsupportedLimitOnInitialSyncException.
JeroenBer commentedon Oct 14, 2024
Hi, I reproduced and looked in the nextcloud.log. This was what came up:
It seems indeed the Caldav "UnsupportedLimitOnInitialSyncException".
Probably the changes in #47770 or #47805 changed this behavior and is now producing incorrect exception behavior for Caldav. In my opinion this is clearly a bug, and it might also potentially cause issues in other Caldav errors.
We are receiving more and more mails from people affected by this behavior. Is this something that can be fixed soon ?
kesselb commentedon Oct 15, 2024
cc @artonge do you have a tip for us how to prevent the default exception handler to overwrite our exception?
artonge commentedon Oct 15, 2024
Hmm, maybe we should display the exception for a given set of HTTP code. Probably here:
server/apps/dav/lib/Files/ErrorPagePlugin.php
Lines 61 to 88 in dc92218
Update that method to display or not the exception based on the HTTP code.
54 remaining items
PastCoder commentedon Feb 9, 2025
I had to remove the account from OneCalendar and to create it new. After that it worked.
MajorP93 commentedon Feb 10, 2025
I can confirm the workaround for this Nextcloud bug that OneCalendar implemented works fine.
Glad to see OneCalendar provided a solution where Nextcloud did not do so for a long time.
VEF-Admin commentedon Feb 10, 2025
+1 from Hungary. The workaround solved the problem. No error message, calendar sync is just fine.
poek1 commentedon Feb 12, 2025
The workaround solved the problem, without resetup of the account (but i did a lot with older versions). After update to 5.7.1 the sync worked well again! Thank you so much
MajorP93 commentedon Feb 13, 2025
Is this prioritized fix included in the most recent stable release (v30.0.6)?
If not: for which release is it planned?
MaggiWuerze commentedon Feb 13, 2025
@kesselb @ChristophWurst How is it looking for a february release? Not all of us use OneCalendar...
kesselb commentedon Feb 13, 2025
I'm afraid the patches didn't make it into the February release. However, things are looking good so far, and unless we spot any additional issues, the patches will be included in the March release. Also, the current release candidate for 31 should already include them.
@MaggiWuerze Out of curiosity, which client are you using?
MaggiWuerze commentedon Feb 17, 2025
I'm using it mostly through Dav5x on Android and 2 apple devices
kesselb commentedon Feb 20, 2025
Hi there,
The patches have been merged and will be included in the March maintenance releases, most likely on 2025-03-13.
PR for version 30: #49481 (Patch file: https://github.com/proxy/patch-diff.githubusercontent.com/raw/nextcloud/server/pull/49481.patch)
PR for version 29: #49483 (Patch file: https://github.com/proxy/patch-diff.githubusercontent.com/raw/nextcloud/server/pull/49483.patch)
Here's our guide on how to apply a patch: https://docs.nextcloud.com/server/31/admin_manual/issues/applying_patch.html#applying-a-patch
joshtrichards commentedon Feb 20, 2025
Thanks, @kesselb (along with all the reviewers), for seeing this through!
MaggiWuerze commentedon Feb 20, 2025
@kesselb nice, thanks for your work
Minstrel27 commentedon Mar 21, 2025
I can confirm that I can now add a new user to the OneCalendar app. This was tested in both 29.0.14 and 31.0.2. I can't confirm if all CalDav calendars work as I only use OneCalendar.
Added bonus is that the docker hub version of NC 31.0.2 now uses PHP83
Minstrel27 commentedon Mar 21, 2025