Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log flooded by "This recurrence rule does not generate any valid instances" #6723

Open
tchernobog opened this issue Feb 15, 2025 · 3 comments
Labels
1. to develop Accepted and waiting to be taken care of bug

Comments

@tchernobog
Copy link
Contributor

Steps to reproduce

  1. Subscribe to this public calendar which exhibits the issue
  2. Wait for a bit and look at the log in the admin settings
  3. I see several instances of this every 10 minutes or so, from different subscriptions (seems I have multiple users subscribing to this calendar or some other calendar with the same issue)

Expected behavior

Log is not flodded with messages about this, the calendar seems good to me when I read it e.g. with my mail client.

Actual behavior

Several dozen lines every attempted calendar sync land in the log with "Forbidden" in front

Calendar app version

5.0.10

CalDAV-clients used

DAVx5, Evolution

Browser

Firefox 135.0

Client operating system

Debian 12

Server operating system

Debian 12

Web server

Nginx

Database engine version

PostgreSQL

PHP engine version

PHP 8.0

Nextcloud version

30.0.6

Updated from an older installed version or fresh install

Updated from an older version

List of activated apps


Nextcloud configuration


Web server error log


Log file


Browser log


Additional info

Raw details of one entry:

{
    "reqId": "1oAqWLIzknF2uRJPIU6y",
    "level": 2,
    "time": "2025-02-15T16:41:31+00:00",
    "remoteAddr": "",
    "user": "--",
    "app": "dav",
    "method": "",
    "url": "--",
    "message": "Unable to denormalize calendar object from subscription 28",
    "userAgent": "--",
    "version": "30.0.6.2",
    "exception": {
        "Exception": "Sabre\\DAV\\Exception\\Forbidden",
        "Message": "This recurrence rule does not generate any valid instances",
        "Code": 0,
        "Trace": [
            {
                "file": "/var/www/montecristosoftware/nextcloud/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php",
                "line": 104,
                "function": "getDenormalizedData",
                "class": "OCA\\DAV\\CalDAV\\CalDavBackend",
                "type": "->"
            },
            {
                "file": "/var/www/montecristosoftware/nextcloud/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php",
                "line": 73,
                "function": "refreshSubscription",
                "class": "OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService",
                "type": "->"
            },
            {
                "file": "/var/www/montecristosoftware/nextcloud/lib/public/BackgroundJob/Job.php",
                "line": 61,
                "function": "run",
                "class": "OCA\\DAV\\BackgroundJob\\RefreshWebcalJob",
                "type": "->"
            },
            {
                "file": "/var/www/montecristosoftware/nextcloud/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php",
                "line": 66,
                "function": "start",
                "class": "OCP\\BackgroundJob\\Job",
                "type": "->"
            },
            {
                "file": "/var/www/montecristosoftware/nextcloud/lib/public/BackgroundJob/Job.php",
                "line": 46,
                "function": "start",
                "class": "OCA\\DAV\\BackgroundJob\\RefreshWebcalJob",
                "type": "->"
            },
            {
                "file": "/var/www/montecristosoftware/nextcloud/cron.php",
                "line": 162,
                "function": "execute",
                "class": "OCP\\BackgroundJob\\Job",
                "type": "->"
            }
        ],
        "File": "/var/www/montecristosoftware/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
        "Line": 3044,
        "message": "Unable to denormalize calendar object from subscription {subscriptionId}",
        "exception": [],
        "source": "https://calendar.google.com/calendar/ical/volteuropa.org_3qtptk1l0mfg76gq9nfqq1h4mg%40group.calendar.google.com/public/basic.ics",
        "CustomMessage": "Unable to denormalize calendar object from subscription 28"
    },
    "id": "67b0c49348908"
}
@tchernobog tchernobog added 0. to triage Pending approval or rejection bug labels Feb 15, 2025
@SebastianKrupinski
Copy link
Contributor

Hi @tchernobog

I think I found the issue, I have come across this issue in the past.

I believe the issue is with the library we use for parsing the events, and RRULES that are missing a BYxxxxx parameter on weekly occurrences.

RRULE:FREQ=WEEKLY;UNTIL=20240612T215959Z

This should contain a BYDAY parameter.

RRULE:FREQ=WEEKLY;UNTIL=20240612T215959Z;BYDAY=WE

@SebastianKrupinski SebastianKrupinski added 1. to develop Accepted and waiting to be taken care of and removed 0. to triage Pending approval or rejection labels Feb 17, 2025
@tchernobog
Copy link
Contributor Author

tchernobog commented Feb 17, 2025

Thanks @SebastianKrupinski ! I think it is a bug then, right? https://www.rfc-editor.org/rfc/rfc5545 explicitly allows for RRULEs without BYxxxx parameters:

  Weekly until December 24, 1997:

   DTSTART;TZID=America/New_York:19970902T090000
   RRULE:FREQ=WEEKLY;UNTIL=19971224T000000Z

   ==> (1997 9:00 AM EDT) September 2,9,16,23,30;
                          October 7,14,21
       (1997 9:00 AM EST) October 28;
                          November 4,11,18,25;
                          December 2,9,16,23

Would this then be an issue against https://github.com/kewisch/ical.js ?

@SebastianKrupinski
Copy link
Contributor

Thanks @SebastianKrupinski ! I think it is a bug then, right? rfc-editor.org/rfc/rfc5545 explicitly allows for RRULEs without BYxxxx parameters:

Yes its a bug.

Would this then be an issue against kewisch/ical.js ?

Its in the SabreDAV VOBJECT Reader or Event Iterator... It's somewhere in this block of code...

https://github.com/nextcloud/server/blob/509a53c36c485f8232b1d173f7aa0f7e8bfe9eb2/apps/dav/lib/CalDAV/CalDavBackend.php#L3021

Most likely this line... As this is the line that tries to figure out what the last occurrence of the event is...

https://github.com/nextcloud/server/blob/509a53c36c485f8232b1d173f7aa0f7e8bfe9eb2/apps/dav/lib/CalDAV/CalDavBackend.php#L3038

More deeply the issue is most likely in this function, that parses the RRULE...

https://github.com/sabre-io/vobject/blob/fc1c75526bb9cd4f45be9c6908e3e8eac596e037/lib/Recur/RRuleIterator.php#L751

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug
Projects
None yet
Development

No branches or pull requests

2 participants