owncloud / calendar

Calendar app for ownCloud
GNU Affero General Public License v3.0
121 stars 43 forks source link

Import ICS problem after Owncloud-Update 9.0.1 #466

Open ghost opened 8 years ago

ghost commented 8 years ago

Steps to reproduce

  1. Import .ics Data

    Expected behaviour

Import ICS file to import into Calendar APP

Import Error

Actual behaviour

geburtstag.ics
Teilweise importiert , 304 Fehler

Server configuration

Operating system: Ubuntu 14.04 Web server: nginx 1.4.6 Database: mysql 5.5.47 PHP version: php5-fpm 5.6.2 ownCloud version: (see ownCloud admin page) ownCloud 9.0.1 (stable) Calendar version: (see ownCloud apps page) 1.1 Updated from an older ownCloud or fresh install: Update from 8.2.3.2 owncloud Signing status (ownCloud 9.0 and above): success

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.
No errors have been found.

**List of activated apps:**
Enabled:
  - activity: 2.2.1
  - calendar: 1.1
  - comments: 0.2
  - contacts: 1.1.0.0
  - dav: 0.1.6
  - encryption: 1.2.0
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_external: 0.5.2
  - files_pdfviewer: 0.8
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 14.5.0
  - notifications: 0.2.3
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0
Disabled:
  - external
  - files_mv
  - files_videoviewer
  - updater
  - user_external
  - user_ldap

**The content of config/config.php:**
{
    "system": {
        "instanceid": "ocht7ocrt5b6",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "owncloud.xxxxxxx.de"
        ],
        "datadirectory": "\/var\/owncloud\/data",
        "overwrite.cli.url": "https:\/\/owncloud.vanessa-in-mexiko.de",
        "dbtype": "mysql",
        "version": "9.0.1.3",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "filelocking.enabled": "true",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "localhost",
            "port": 6379,
            "timeout": 0,
            "password":xxxxxxxxxx ""
        },
        "loglevel": 0,
        "maintenance": false,
        "theme": ""
    },
    "apps": {
        "activity": {
            "enabled": "yes",
            "installed_version": "2.2.1",
            "types": "filesystem"
        },
        "backgroundjob": {
            "lastjob": "381"
        },
        "calendar": {
            "enabled": "yes",
            "installed_version": "1.1",
            "ocsid": "168707",
            "types": ""
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "0.2",
            "types": "logging"
        },
        "contacts": {
            "enabled": "yes",
            "installed_version": "1.1.0.0",
            "ocsid": "168708",
            "types": ""
        },
        "core": {
            "OC_Channel": "stable",
            "default_encryption_module": "OC_DEFAULT_MODULE",
            "encryption_enabled": "yes",
            "installedat": "1445936767.3665",
            "lastcron": "1460545068",
            "lastupdateResult": "{\"version\":{},\"versionstring\":{},\"url\":{},\"web\":{}}",
            "lastupdatedat": "1460545021",
            "oc.integritycheck.checker": "[]",
            "public_caldav": "calendar\/share.php",
            "public_calendar": "calendar\/share.php",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "remote_caldav": "dav\/appinfo\/v1\/caldav.php",
            "remote_calendar": "dav\/appinfo\/v1\/caldav.php",
            "remote_carddav": "dav\/appinfo\/v1\/carddav.php",
            "remote_contacts": "dav\/appinfo\/v1\/carddav.php",
            "remote_dav": "dav\/appinfo\/v2\/remote.php",
            "remote_files": "dav\/appinfo\/v1\/webdav.php",
            "remote_webdav": "dav\/appinfo\/v1\/webdav.php",
            "repairlegacystoragesdone": "yes"
        },
        "dav": {
            "enabled": "yes",
            "installed_version": "0.1.6",
            "types": "filesystem"
        },
        "encryption": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "masterKeyId": "master_41e62214",
            "publicShareKeyId": "pubShare_41e62214",
            "recoveryAdminEnabled": "1",
            "recoveryKeyId": "recoveryKey_41e62214",
            "types": "filesystem"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "0.1.0",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "0.0.4",
            "types": "authentication"
        },
        "files": {
            "enabled": "yes",
            "installed_version": "1.4.4",
            "types": "filesystem"
        },
        "files_external": {
            "\/ownCloud": "1449154731",
            "\/ownCloud_old": "1446629102",
            "enabled": "yes",
            "installed_version": "0.5.2",
            "ocsid": "166048",
            "types": "filesystem",
            "user_mounting_backends": "owncloud"
        },
        "files_locking": {
            "enabled": "no",
            "installed_version": "",
            "types": "filesystem"
        },
        "files_mv": {
            "enabled": "no",
            "installed_version": "0.8.2",
            "ocsid": "150271",
            "types": "filesystem"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "0.8",
            "ocsid": "166049",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "0.9.1",
            "types": "filesystem"
        },
        "files_texteditor": {
            "enabled": "yes",
            "installed_version": "2.1",
            "ocsid": "166051",
            "types": ""
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "0.8.0",
            "types": "filesystem"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": "filesystem"
        },
        "files_videoplayer": {
            "enabled": "yes",
            "installed_version": "0.9.8",
            "types": ""
        },
        "files_videoviewer": {
            "enabled": "no",
            "installed_version": "0.1.3",
            "ocsid": "166054",
            "types": ""
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "1.1",
            "ocsid": "166055",
            "types": ""
        },
        "gallery": {
            "enabled": "yes",
            "installed_version": "14.5.0",
            "types": ""
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "0.2.3",
            "types": "logging"
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "0.3.0",
            "types": "filesystem"
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "0.2",
            "types": "logging"
        },
        "templateeditor": {
            "enabled": "yes",
            "installed_version": "0.1",
            "types": ""
        },
        "updatenotification": {
            "enabled": "yes",
            "installed_version": "0.1.0",
            "types": ""
        },
        "updater": {
            "enabled": "no",
            "installed_version": "0.6",
            "types": ""
        }
    }
}

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

**Are you using encryption:** yes/no
yes

### Client configuration
**Browser:**
Firefox 45.0.2

**Operating system:**
Windows 8.1 
**CalDAV-clients:**

### Logs
#### Web server error log
No Logs!! 

#### ownCloud log (data/owncloud.log)

{"reqId":"ha2FLBJsYLHNtHdIHCtA","remoteAddr":"195.95.137.100","app":"webdav","message":"Exception: {\"Message\":\"The supplied iCalendar datetime value is incorrect: 2015-05-11T::\",\"Exception\":\"LogicException\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/DateTimeParser.php(188): Sabre\\\\VObject\\\\DateTimeParser::parseDateTime('2015-05-11T::', NULL)\\n#1 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/Property\\\/ICalendar\\\/DateTime.php(172): Sabre\\\\VObject\\\\DateTimeParser::parse('2015-05-11T::', NULL)\\n#2 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/Property\\\/ICalendar\\\/DateTime.php(144): Sabre\\\\VObject\\\\Property\\\\ICalendar\\\\DateTime->getDateTimes(NULL)\\n#3 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/ITip\\\/Broker.php(883): Sabre\\\\VObject\\\\Property\\\\ICalendar\\\\DateTime->getDateTime()\\n#4 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/ITip\\\/Broker.php(198): Sabre\\\\VObject\\\\ITip\\\\Broker->parseEventInfo(Object(Sabre\\\\VObject\\\\Component\\\\VCalendar))\\n#5 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/Schedule\\\/Plugin.php(518): Sabre\\\\VObject\\\\ITip\\\\Broker->parseEvent(Object(Sabre\\\\VObject\\\\Component\\\\VCalendar), Array, NULL)\\n#6 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/Schedule\\\/Plugin.php(294): Sabre\\\\CalDAV\\\\Schedule\\\\Plugin->processICalendarChange(NULL, Object(Sabre\\\\VObject\\\\Component\\\\VCalendar), Array, Array, false)\\n#7 [internal function]: Sabre\\\\CalDAV\\\\Schedule\\\\Plugin->calendarObjectChange(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response), Object(Sabre\\\\VObject\\\\Component\\\\VCalendar), 'calendars\\\/admin...', false, true)\\n#8 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#9 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/Plugin.php(887): Sabre\\\\Event\\\\EventEmitter->emit('calendarObjectC...', Array)\\n#10 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/Plugin.php(768): Sabre\\\\CalDAV\\\\Plugin->validateICalendar('BEGIN:VCALENDAR...', 'calendars\\\/admin...', false, Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response), true)\\n#11 [internal function]: Sabre\\\\CalDAV\\\\Plugin->beforeCreateFile('calendars\\\/admin...', 'BEGIN:VCALENDAR...', Object(OCA\\\\DAV\\\\CalDAV\\\\Calendar), false)\\n#12 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#13 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1034): Sabre\\\\Event\\\\EventEmitter->emit('beforeCreateFil...', Array)\\n#14 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(523): Sabre\\\\DAV\\\\Server->createFile('calendars\\\/admin...', Resource id #53, NULL)\\n#15 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#16 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#17 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#18 \\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#19 \\\/var\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/server.php(142): Sabre\\\\DAV\\\\Server->exec()\\n#20 \\\/var\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(29): OCA\\\\DAV\\\\Server->exec()\\n#21 \\\/var\\\/owncloud\\\/remote.php(138): require_once('\\\/var\\\/owncloud\\\/a...')\\n#22 {main}\",\"File\":\"\\\/var\\\/owncloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/DateTimeParser.php\",\"Line\":40,\"User\":\"admin\"}","level":4,"time":"2016-04-13T10:45:02+00:00","method":"PUT","url":"\/remote.php\/dav\/calendars\/admin\/pers%c3%b6nlich\/ownCloud-oir520jlz6mmjsdjv9w3m.ics","user":"admin"}

#### Browser log

Browser log 
[Browserlog.txt](https://github.com/owncloud/calendar/files/216936/Browserlog.txt)
georgehrke commented 8 years ago

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

...

Browser log

xxxxxxx

Very helpful ......

ghost commented 8 years ago

BEGIN:VCALENDAR VERSION:2.0 PRODID:-//SabreDAV//SabreDAV//EN CALSCALE:GREGORIAN X-WR-CALNAME:Geburtstag X-APPLE-CALENDAR-COLOR:#ff0000 BEGIN:VEVENT DTSTART;VALUE=DATE:20160208 SUMMARY:Geburtstag Mama RRULE:FREQ=YEARLY;WKST=MO TRANSP:TRANSPARENT STATUS:CONFIRMED DURATION:P1D LAST-MODIFIED:20160209T053755Z DTSTAMP:20160209T053755Z CREATED:20160209T053755Z UID:13cfb9d5-5a6a-47d3-ac56-33e46d74c60a.1454996275336 END:VEVENT BEGIN:VEVENT DTSTART;VALUE=DATE:20160323 SUMMARY:Andy (Jessica) Birthday TRANSP:TRANSPARENT STATUS:CONFIRMED DTEND;VALUE=DATE:20160324 LAST-MODIFIED:20160325T110143Z DTSTAMP:20160325T110143Z CREATED:20160325T110143Z UID:6061267e-f39f-4f53-8c8b-376845ad69bf.1458903703278 END:VEVENT BEGIN:VEVENT DTSTART;VALUE=DATE:20160612 SUMMARY:Natalie Birthday TRANSP:TRANSPARENT STATUS:CONFIRMED DTEND;VALUE=DATE:20160613 LAST-MODIFIED:20160321T180801Z DTSTAMP:20160321T180801Z CREATED:20160321T180801Z UID:838f08b4-59f2-4600-a67b-91a301b3c16d.1458583681050 END:VEVENT BEGIN:VEVENT DTSTART:20150321 SUMMARY:Isi Duod's Birthday RRULE:FREQ=YEARLY DURATION:P1D UID:b100000367054245@facebook.com END:VEVENT BEGIN:VEVENT DTSTART:20150731 SUMMARY:Lena Maria's Birthday RRULE:FREQ=YEARLY DURATION:P1D UID:b100003033316888@facebook.com END:VEVENT

georgehrke commented 8 years ago

please fill out the entire issue template ...

ghost commented 8 years ago

Update Template!

areteichi commented 8 years ago

I think I'm having the same issue.

I recently fresh installed ownCloud 9.0.1 and imported my calender data from ownCloud 8.2.3 (by exporting/importing them as ICS file). I've discovered that I can see all the events March 2016 onwards, but all the events prior to February 2016 seem not to be accessible.

The color icon on the left panel just keeps on spinning and the calender does not load when I go back, say, to February 2016.

UPDATE: I'm using Calender App 1.1 as well by the way.

UPDATE 2: My problem is also described in #389.

hitam4450 commented 8 years ago

Same problem with me, except only for 2 of my 12 calendars! Reason unknown, since in OC 8.2.3 all calendars import and display without any problems and without any constraints! Calendar 1.1 :thumbsdown: :thumbsdown: :thumbsdown: regards, hitam4450

areteichi commented 8 years ago

I just gave ownCloud 9.0.2 RC1 a try, but the problem still persists. I couldn't find a relevant message in owncloud.log, however.

Can this be fixed before the 9.0.2 release? I would like to migrate to ownCloud 9 but this is really preventing me from doing so.

areteichi commented 8 years ago

By trial and error, I was able to determine that #345 (https://github.com/owncloud/calendar/commit/f96517e90e973f9659bcb7ecfd85e109706c4c53) is triggering this issue. A possible regression.

areteichi commented 8 years ago

Here is an error message from the browser log in Firefox (46.0): TypeError: dtend.subtractDate is not a function app.js:3055:18

I think this bug is also related to #498, though not strictly a duplicate.

UPDATE: The same issue is being reported here: #491

georgehrke commented 8 years ago

dup of #491

georgehrke commented 8 years ago

nvm, @zirydy has a different issue

areteichi commented 8 years ago

I now see /core/img/actions/error.svg next to the title of my calendar with Calendar 1.2 when I go back to the month (February 2016) I was having a problem. How can I fix this issue?

georgehrke commented 8 years ago

Enable debug mode in ownCloud, go back to calendar, check browser console to see which event causes this error

areteichi commented 8 years ago

Could you help me with the troubleshooting...? I found the following error message in the browser console:

Object { comp: Object, calendar: Object, etag: ""7b0313b22ee2631f20baceefd7bc8be0"", uri: "ownCloud-chymwm0wximxppcuq171z.ics" } app.js:2207:10 TypeError: dtend.subtractDate is not a function Stack trace: getTimeForRecurring@https://DOMAIN/owncloud/apps/calendar/js/public/app.js?v=2a7a489b658d9f34543b0602096bb3f2:3183:18 VEvent.prototype.getFcEvent/<@https://DOMAIN/owncloud/apps/calendar/js/public/app.js?v=2a7a489b658d9f34543b0602096bb3f2:3304:7 forEach@https://DOMAIN/owncloud/apps/calendar/js/vendor/angular/angular.js?v=2a7a489b658d9f34543b0602096bb3f2:322:11 VEvent.prototype.getFcEvent@https://DOMAIN/owncloud/apps/calendar/js/public/app.js?v=2a7a489b658d9f34543b0602096bb3f2:3295:4 Calendar/<.fcEventSource.events/</<@https://DOMAIN/owncloud/apps/calendar/js/public/app.js?v=2a7a489b658d9f34543b0602096bb3f2:2203:19 app.js:2206:10 Object { comp: Object, calendar: Object, etag: ""19c402c3b5d834c31cc53e432aac2301"", uri: "ownCloud-hjg79bh6rnl9azip6ppcdf.ics" }

areteichi commented 8 years ago

I finally managed to pinpoint the cause of the problem and was able to fix it!

The error TypeError: dtend.subtractDate is not a function app.js:2206:10 was being caused by the way some of the events were saved by Calendar App (presumably in previous versions).

Some events in my calendar had values (in the ICS file) that look something like the following: DTSTART;TZID=Europe/Berlin:20160519T010000 DTEND;TZID=Europe/Berlin;VALUE:20160519T020000

The problem was basically caused by the part Berlin;VALUE:

In order to fix this problem, DTEND needs to be formatted just like DTSTART. Once I modified these values in the ICS file to look like the following, the problem went away: DTSTART;TZID=Europe/Berlin:20160519T010000 DTEND;TZID=Europe/Berlin:20160519T020000

areteichi commented 8 years ago

As for the content of the ICS file posted above by @Iskenof, the problem is caused by these two values: DTSTART:20150321 DTSTART:20150731

The problem should go away when they are corrected as follows: DTSTART;VALUE=DATE:20150321 DTSTART;VALUE=DATE:20150731

kiv57 commented 7 years ago

I have the same issue : with an ics file generated from ownCloud web UI, every DTEND properties are written for example : DTEND;VALUE=:20131119T110000Z Whereas a right syntax should be : DTEND:20131119T110000Z

If I replace every instance in the file according to this rule, I can import the calendar file in thunderbird without error. But of course I would appreciate to have working backups of my calendars without this manual fix...

Could anyone confirm if the following fix is OK ? I'm not comfortable with modifying ownCloud DB manually... UPDATE oc_clndr_objects SET calendardata = REPLACE(calendardata, ';VALUE=:', ':'); Source : https://forum.owncloud.org/viewtopic.php?t=30145

LuLu69 commented 6 years ago

After upgrading from 9 to OC 10.0.3 I faced same problem with error while exporting calendar. I corrected by executing SQL statement UPDATE oc_calendarobjects SET calendardata = REPLACE(calendardata, ';VALUE=:', ':');

Please note the change in table name!

Where the erroneous entries coming from is hard to say, as with the OC calendar I have connected Win10-Calendar, Android-Calendar-App and Linux-Thunderbird. I will check if such entries re-appear.

LuLu