Skip to content

RFC-compliant ICS calendars not working; BYYEARDAY RRULE is considered invalid #821

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

Open
ghost opened this issue May 9, 2018 · 1 comment
Labels
0. to triage Pending approval or rejection bug feature: caldav

Comments

@ghost
Copy link

ghost commented May 9, 2018

Migration and CalDAV issues belong in the server repo!

I am not sure if this is a CalDAV issue, since this issue is specific to ical. Please pardon me if this is the wrong place.

Steps to reproduce

  1. Have an ICS calendar which uses an RRULE with BYYEARDAY. Please read my question on StackOverflow.
  2. Subscribe to that ICS calendar in Nextcloud
  3. See the Javascript Console where it says: "Invalid BYYEARDAY rule"

MWE to provoke the error:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Holidays//example//EN
BEGIN:VEVENT
SUMMARY:1. Advent
DTSTART;VALUE=DATE:00011127
DTEND;VALUE=DATE:00011127
DTSTAMP;VALUE=DATE-TIME:20180506T154500Z
UID:20180506T154500Z[email protected]
SEQUENCE:0
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=SU;BYYEARDAY=331,332,333,334,335,336,337
END:VEVENT
END:VCALENDAR

Expected behaviour

I except RFC-compliant ICS calendars to work, like the BYYEARDAY rule.

Actual behaviour

They don't. In fact there's even an error message stating the rule was invalid, which it is not per RFC 5545.

Server configuration detail

Operating system: Linux 3.16.0-6-686-pae #1 SMP Debian 3.16.56-1 (2018-04-28) i686

Webserver: Apache (apache2handler)

Database: mysql 5.6.40

PHP version: 5.6.33-0+deb8u1
Modules loaded: Core, date, ereg, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, dba, dom, hash, fileinfo, filter, ftp, gettext, SPL, iconv, mbstring, session, posix, Reflection, standard, shmop, SimpleXML, soap, sockets, Phar, exif, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, apache2handler, PDO, curl, gd, json, mcrypt, mysql, mysqli, pdo_mysql, mhash, Zend OPcache

Nextcloud version: 12.0.5 - 12.0.5.3

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: from source

Signing status

Array

List of activated apps
Enabled:
 - activity: 2.5.2
 - admin_audit: 1.2.0
 - bruteforcesettings: 1.0.3
 - calendar: 1.5.8
 - comments: 1.2.0
 - contacts: 2.1.3
 - dav: 1.3.1
 - encryption: 1.6.0
 - federatedfilesharing: 1.2.0
 - federation: 1.2.0
 - files: 1.7.2
 - files_opds: 0.8.8
 - files_pdfviewer: 1.1.2
 - files_reader: 1.2.3
 - files_sharing: 1.4.0
 - files_texteditor: 2.4.1
 - files_trashbin: 1.2.0
 - files_versions: 1.5.0
 - files_videoplayer: 1.1.0
 - firstrunwizard: 2.1
 - gallery: 17.0.0
 - issuetemplate: 0.3.0
 - logreader: 2.0.0
 - lookup_server_connector: 1.0.0
 - nextcloud_announcements: 1.1
 - notifications: 2.0.0
 - oauth2: 1.0.5
 - password_policy: 1.2.2
 - provisioning_api: 1.2.0
 - serverinfo: 1.2.0
 - sharebymail: 1.2.0
 - systemtags: 1.2.0
 - theming: 1.3.0
 - twofactor_backupcodes: 1.1.1
 - twofactor_totp: 1.3.1
 - updatenotification: 1.2.0
 - workflowengine: 1.2.0
Disabled:
 - files_external
 - notes
 - survey_client
 - user_external
 - user_ldap

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "***REMOVED SENSITIVE VALUE***"
    ],
    "datadirectory": "\/home\/owncloud\/data",
    "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
    "htaccess.RewriteBase": "\/",
    "dbtype": "mysql",
    "version": "12.0.5.3",
    "dbname": "owncloud",
    "dbhost": "localhost",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "mail_from_address": "cloud",
    "mail_smtpmode": "php",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "forcessl": true,
    "maintenance": false,
    "forceSSLforSubdomains": true,
    "default_language": "en",
    "theme": "",
    "loglevel": 0,
    "trashbin_retention_obligation": "auto",
    "singleuser": false,
    "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
    "mysql.utf8mb4": true,
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpauth": 1
}

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... => Not used, deleted

Client configuration

Browser: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0

Operating system: Debian 9.4

Logs

Browser log
JQMIGRATE: Migrate is installed, version 1.4.0
core.js:7:542
Deprecation warning: use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.
core.js:1563:2834
Source map error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Resource URL: https://***REMOVED SENSITIVE VALUE***/core/vendor/core.js?v=7f4098a81350887cb1ba2de38a1ad484-0
Source Map URL: purify.min.js.map[Learn More]
Error: Invalid BYYEARDAY rule
vendor.min.js:21:9813
Source map error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Resource URL: https://***REMOVED SENSITIVE VALUE***/apps/calendar/js/public/vendor.min.js?v=7f4098a81350887cb1ba2de38a1ad484-0
Source Map URL: vendor.min.js.map[Learn More] 
Nextcloud log
<<<NO LOGS RELATED TO THAT ISSUE>>>

PS: Your issue template asks for the browser log twice
PPS: At first sight It seems like the issue results from a library which does not support the BYYEARDAY rule, but my internal knowledge of Nextcloud or icalendar libraries is too limited to be sure. Even if there's nothing you can do directly, it would still help a lot if we could raise awareness @ upstream if this is the case.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@ghost ghost changed the title RFC-compliand ICS calendars not working; BYYEARDAY RRULE is considered invalid RFC-compliant ICS calendars not working; BYYEARDAY RRULE is considered invalid May 9, 2018
@georgehrke georgehrke added 1. to develop Accepted and waiting to be taken care of bug 0. to triage Pending approval or rejection labels May 18, 2018
@georgehrke georgehrke added this to the 1.7.0 milestone May 18, 2018
@georgehrke georgehrke removed the 1. to develop Accepted and waiting to be taken care of label Oct 20, 2019
@georgehrke georgehrke modified the milestones: 2.1.0, 2.2.0 Sep 4, 2020
@ChristophWurst ChristophWurst modified the milestones: 2.2.0, 2.3.0 Mar 24, 2021
@ChristophWurst ChristophWurst modified the milestones: v2.3.0, v2.4.0 Jun 24, 2021
@ChristophWurst ChristophWurst modified the milestones: v2.4.0, v2.4.1 Nov 25, 2021
@tcitworld tcitworld removed this from the v2.4.1 milestone Dec 17, 2021
@miaulalala
Copy link
Contributor

I'm getting

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
	<s:exception>Internal Server Error</s:exception>
	<s:message>
		The server was unable to complete your request.		If this happens again, please send the technical details below to the server administrator.		More details can be found in the server log.			</s:message>

	<s:technical-details>
		<s:remote-address>127.0.0.1</s:remote-address>
		<s:request-id>N0p3UFTd67ke6Gdg5IJx</s:request-id>

			<s:type>Sabre\DAV\Exception\UnsupportedMediaType</s:type>
		<s:code>0</s:code>
		<s:message>Validation error in iCalendar: The supplied value (1-11-27) is not a correct DATE</s:message>
		<s:file>/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php</s:file>
		<s:line>873</s:line>

		<s:stacktrace>
			#0 /var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php(760): Sabre\CalDAV\Plugin-&gt;validateICalendar()
#1 /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\CalDAV\Plugin-&gt;beforeCreateFile()
#2 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(1094): Sabre\DAV\Server-&gt;emit()
#3 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(504): Sabre\DAV\Server-&gt;createFile()
#4 /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\DAV\CorePlugin-&gt;httpPut()
#5 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(472): Sabre\DAV\Server-&gt;emit()
#6 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(253): Sabre\DAV\Server-&gt;invokeMethod()
#7 /var/www/nextcloud/apps/dav/lib/Server.php(374): Sabre\DAV\Server-&gt;start()
#8 /var/www/nextcloud/apps/dav/appinfo/v2/remote.php(19): OCA\DAV\Server-&gt;exec()
#9 /var/www/nextcloud/remote.php(145): require_once(&#039;...&#039;)
#10 {main}		</s:stacktrace>
		</s:technical-details>
</d:error>

But changing the date also doesn't work because there's nextcloud/server#47924 to contend with. I think that there's too many instances for it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. to triage Pending approval or rejection bug feature: caldav
Projects
None yet
Development

No branches or pull requests

5 participants