-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Prevent Sabre\VObject\Recur\NoInstancesException: This recurrence rule does not generate any valid instances from being fatal to CalDAV sync #5641
Comments
same here. Update: maybe this helps (not tested yet): https://forums.bitfire.at/topic/1024/owncloud-this-recurrence-rule-does-not-generate-any-valid-instances |
@beyercenter Thank you for your post. I couldn't find a calendar by this ID in the database, indeed. The clients in use are Thunderbird's Lightning 5.4 Add-on as well as iOS 10.3.2 default contacts app. |
The UID isn't in the actual database because the event has been deleted in the meantime. But I found it in an ICS file which had been exported from Thunderbird earlier:
|
Don't mean to necrobump, but I'm seeing this for some events edited on an iPhone client, nextcloud 11.0.8 (yes I know I should upgrade :-). New events created from the iPhone show just fine. |
Thank you @jypma. I'm confirming that an iPhone was used in this case to edit calendar events. |
@sushidave @jypma Can you please test this on a supported version of Nextcloud (preferably 15) and report back whether you can still reproduce this? The error message in question generally means that the client (let it be Thunderbird or iOS) is sending calendar data with a terribly broken recurrence rule. Hence the server will reject it, which is the expected behavior. To break this down and solve the issue it would be good to know what client is breaking the calendar data. Any chance to correlate the error message in the log with an access log entry that contains a user agent? |
I have the same error here, user agent in nextcloud.log is: "userAgent":"iOS/12.1.1 (16C50) dataaccessd/1.0" |
I have the same. My wife (iphone user) has a problem with the calendar. Events put in the cal by her do not end up on the shared calendar. She uses an iphone, version is below. Nextcloud is 15.0.2. Formatted error:
|
@karloluiten That is expected in that case. The calendar-data is not valid. See this part:
The event is supposed to repeat daily, but only once. (meaning only 21st of January 2019) Hence the |
I'm closing this ticket, because it's the expected behaviour. Please report issues like this to the developer of the client software producing such calendar entries. |
I ran into the same issue and solved it for me. Here's how: The error message in the nextcloud.log contains the URI like: "url":"/123/nextcloud/remote.php/dav/calendars/peter/family/6796a046-z995-4be2-zzba-0fece4fba4c0.ics", |
@steff517 Thanks for sharing your solution 🙏 |
Thx @steff517 THis worked. I found the non-working entry and deleted it on my android ( I use sCalendar ):
This happened on the latest stable NC 21 with the latest DAVx5 This is reproducible!I created the bug by editing a weekly repeating entry to a fortnight repeating entry: Steps to reproduce:
It seems the calendar entry above is somhow broken (how exactly?) Anyway: one broken calendar entry should not stop the hole syncronization process! (I guess this should also be reported to the aCalendar app then) |
It seems like there is a problem to syncronize the change I made on the android device. the errorenous entry still has
although it should have
|
I am facing the same issue for a long time, but now I was finally able to grasp the relevant information and comment here ;) The following event is causing the above mentioned exception, and I have now clue what is wrong with it. This event has been created using an Android device with aCalendar (latest version). It is a recurring event which takes place every last Friday of each month.
|
@rubo77 Thanks for your message. Unfortunately, Nextcloud would not allow me to delete these entries (infinite spinner after lots and lots of attempts). I ended up having to delete the calendar containing these faulty events, and recreate a new calendar… |
Sure, you would have to delete the entry on the console with the direct SQL commands |
My logs are full of entries like the one Mikhail5555 mentioned. Also my binlog files are exploding - could this be the root cause? How could I trace down the calendar or event causing this problem?
I'm thankful for any hints / tips! |
Hi, please update to at least 23.0.12 and report back if it fixes the issue. Thank you! |
{
"reqId":"FSBZZ3Lz478VgDx3Yw0W",
"level":3,
"time":"2022-11-26T20:31:56+00:00",
"remoteAddr":"",
"user":"--",
"app":"dav",
"method":"",
"url":"--",
"message":"This recurrence rule does not generate any valid instances",
"userAgent":"--",
"version":"24.0.7.1",
"exception":{
"Exception":"Sabre\\VObject\\Recur\\NoInstancesException",
"Message":"This recurrence rule does not generate any valid instances",
"Code":0,
"Trace":[
{
"file":"/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line":2840,
"function":"__construct",
"class":"Sabre\\VObject\\Recur\\EventIterator",
"type":"->"
},
{
"file":"/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line":1259,
"function":"getDenormalizedData",
"class":"OCA\\DAV\\CalDAV\\CalDavBackend",
"type":"->"
},
{
"file":"/config/www/nextcloud/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php",
"line":144,
"function":"createCalendarObject",
"class":"OCA\\DAV\\CalDAV\\CalDavBackend",
"type":"->"
},
{
"file":"/config/www/nextcloud/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php",
"line":115,
"function":"refreshSubscription",
"class":"OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService",
"type":"->"
},
{
"file":"/config/www/nextcloud/lib/public/BackgroundJob/Job.php",
"line":79,
"function":"run",
"class":"OCA\\DAV\\BackgroundJob\\RefreshWebcalJob",
"type":"->"
},
{
"file":"/config/www/nextcloud/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php",
"line":108,
"function":"execute",
"class":"OCP\\BackgroundJob\\Job",
"type":"->"
},
{
"file":"/config/www/nextcloud/cron.php",
"line":151,
"function":"execute",
"class":"OCA\\DAV\\BackgroundJob\\RefreshWebcalJob",
"type":"->"
}
],
"File":"/config/www/nextcloud/3rdparty/sabre/vobject/lib/Recur/EventIterator.php",
"Line":192,
"CustomMessage":"--"
},
"id":"638277d3d57f5"
} @szaimen i just updated to Might be worth adding i use DAVx5 on my phone (not sure if related to this issue, but just throwing it out there) |
This comment was marked as resolved.
This comment was marked as resolved.
@szaimen |
@szaimen
However, i do see that it now also contains a 'source' in the json format: {
"reqId": "4zGsFttOKEdfGqv2FzNy",
"level": 3,
"time": "2023-05-29T04:39:54+00:00",
"remoteAddr": "",
"user": "--",
"app": "dav",
"method": "",
"url": "--",
"message": "Unable to create calendar object from subscription 11",
"userAgent": "--",
"version": "25.0.7.1",
"exception": {
"Exception": "Sabre\\VObject\\Recur\\NoInstancesException",
"Message": "This recurrence rule does not generate any valid instances",
"Code": 0,
"Trace": [
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 2765,
"function": "__construct",
"class": "Sabre\\VObject\\Recur\\EventIterator",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1220,
"function": "getDenormalizedData",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php",
"line": 132,
"function": "createCalendarObject",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php",
"line": 115,
"function": "refreshSubscription",
"class": "OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService",
"type": "->"
},
{
"file": "/config/www/nextcloud/lib/public/BackgroundJob/Job.php",
"line": 78,
"function": "run",
"class": "OCA\\DAV\\BackgroundJob\\RefreshWebcalJob",
"type": "->"
},
{
"file": "/config/www/nextcloud/lib/public/BackgroundJob/Job.php",
"line": 64,
"function": "start",
"class": "OCP\\BackgroundJob\\Job",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php",
"line": 108,
"function": "execute",
"class": "OCP\\BackgroundJob\\Job",
"type": "->"
},
{
"file": "/config/www/nextcloud/cron.php",
"line": 152,
"function": "execute",
"class": "OCA\\DAV\\BackgroundJob\\RefreshWebcalJob",
"type": "->"
}
],
"File": "/config/www/nextcloud/3rdparty/sabre/vobject/lib/Recur/EventIterator.php",
"Line": 192,
"message": "Unable to create calendar object from subscription {subscriptionId}",
"exception": [],
"source": "https://calendar.google.com/calendar/ical/**MANUALLY REDACTED**/basic.ics",
"CustomMessage": "Unable to create calendar object from subscription 11"
},
"id": "64742c9ac75b0"
} So i will now be able to check at least what even is causing it. However since its provided by an external google calendar im not sure if I can easily remove it. |
I have issues with the sync to Nextcloud {
"reqId": "gvlxYqtQGHDm5DU7rXCp",
"level": 3,
"time": "2023-07-19T02:41:57+00:00",
"remoteAddr": "*** sensitive parameters replaced ***",
"user": "cb294902-1b2b-1033-93df-eddfa909fc39",
"app": "webdav",
"method": "PUT",
"url": "/remote.php/dav/calendars/cb294902-1b2b-1033-93df-eddfa909fc39/todos/ba0d6cf1-ca22-4d8b-823e-93712e68b69f.ics",
"message": {
"Exception": "Sabre\\VObject\\Recur\\NoInstancesException",
"Message": "This recurrence rule does not generate any valid instances",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 2785,
"function": "__construct",
"class": "Sabre\\VObject\\Recur\\EventIterator",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1309,
"function": "getDenormalizedData",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/CalendarObject.php",
"line": 103,
"function": "updateCalendarObject",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": ["*** sensitive parameters replaced ***"]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1137,
"function": "put",
"class": "Sabre\\CalDAV\\CalendarObject",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 492,
"function": "updateFile",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": ["*** sensitive parameters replaced ***"]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpPut",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 253,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 321,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Server.php",
"line": 364,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->"
},
{
"file": "/var/www/nextcloud/remote.php",
"line": 172,
"args": ["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/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"
},
"userAgent": "DAVx5/4.3.5-gplay (2023/07/10; dav4jvm; okhttp/4.11.0) Android/12",
"version": "27.0.0.8"
} They seem to have some event or to-do in their local calendar that Nextcloud does not accept and always aborts the sync. I haven't been able to identify that event yet. Is there any way to get more details about what event wasn't accepted so that the user can delete it from their local calendar? |
Same here on nextcloud 27.0.2 It happens when I sync a google calendar to nextcloud using vdirsyncer. https://github.com/pimutils/vdirsyncer/
|
How can we resolve the issue? Is there a method to fix it for the specific user(s) having the issue? Big issue here as my wife is having this is issue resulting in our shared calendar not aligning... I am sure you can imagine this gives me real trouble trying to argue that the appointment was not in my calendar whereas it remains on her iPhone ! |
Here is a fresh logentry with a trace:
Wondering if this could not be solved with some try-catch handling? |
I preliminary handled the exception by adding a try catch around the failing server/apps/dav/lib/CalDAV/CalDavBackend.php Line 2804 in 9b6551d
Hope someone with insight into the nextcloud code will fix it proper. |
This should now be resolved by the PR linked above. |
@SebastianKrupinski Thanks for resolving. |
@sushidave you're welcome |
Steps to reproduce
Expected behaviour
Log shows no fatal errors
Actual behaviour
Log shows same fatal error every 30 seconds, see Nextcloud log below
Server configuration
Operating system:
Linux 3.10.0
Web server:
Apache
Database:
mysql 10.1.21
PHP version:
5.6.30
Nextcloud version: (see Nextcloud admin page)
11.0.3
Updated from an older Nextcloud/ownCloud or fresh install:
Updated
Where did you install Nextcloud from:
nextcloud.com
Signing status:
Signing status
No errors have been found.List of activated apps:
App list
- Activity 2.4.1 - Auditing / Logging 1.1.0 - Collaborative Tags 1.1.3 - Comments 1.1.0 - Deleted files 1.1.0 - Federation 1.1.1 - File sharing 1.1.1 - First run wizard 2.0 - Gallery 16.0.0 - Log reader 2.0.0 - Mail template editor 0.2 - Nextcloud announcements 1.0 - Notifications 1.0.1 - Password policy 1.1.0 - PDF viewer 1.0.1 - Server info 1.1.1 - Share by mail 1.0.1 - Text editor 2.2 - Theming 1.1.1 - Update notification 1.1.1 - Usage service 0.1.5 - Versions 1.4.0 - Audio player 2.0.2 - Bookmarks 0.10.0 - Calendar 1.5.3 - Contacts 1.5.3 - Direct Menu 0.10.2 - Keeweb 0.4.0 - Mail 0.6.4 - Tasks 0.9.5 - Video calls 1.2.0Nextcloud configuration:
Config report
'instanceid' => '********', 'passwordsalt' => '**************************************', 'secret' => '***********************************************', 'trusted_domains' => array ( 0 => '******************', ), 'datadirectory' => '/home/httpd/vhosts/********/cloud_data', 'dbtype' => 'mysql', 'version' => '11.0.3.2', 'dbname' => '**********', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc_', 'dbuser' => '******', 'dbpassword' => '**********************', 'logtimezone' => 'UTC', 'installed' => true, 'loglevel' => 2, 'maintenance' => false, 'htaccess.RewriteBase' => '/', 'forcessl' => true, 'memcache.local' => '\\OC\\Memcache\\ArrayCache', 'mail_smtpmode' => 'smtp', 'mail_smtpauthtype' => 'LOGIN', 'mail_smtphost' => '*********.net', 'mail_smtpport' => '25', 'mail_smtpsecure' => 'tls', 'mail_from_address' => 'nextcloud', 'mail_domain' => '*************', 'overwrite.cli.url' => 'https://****************:443', 'overwriteprotocol' => 'https', 'theme' => '',Are you using external storage, if yes which one: local/smb/sftp/...
No
Are you using encryption: yes/no
https
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No
Logs
Web server error log
Web server error log
mod_fcgid: stderr: PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0 (same entry about every 12 minutes)Nextcloud log (data/nextcloud.log)
Nextcloud log
Fatal | Sabre\VObject\Recur\NoInstancesException: This recurrence rule does not generate any valid instances[internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
The text was updated successfully, but these errors were encountered: