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

No events being shown: "invalid date-time value" #376

Closed
karloluiten opened this issue Mar 22, 2017 · 13 comments · Fixed by #448
Closed

No events being shown: "invalid date-time value" #376

karloluiten opened this issue Mar 22, 2017 · 13 comments · Fixed by #448
Assignees
Labels
3. to review Waiting for reviews bug

Comments

@karloluiten
Copy link

karloluiten commented Mar 22, 2017

Steps to reproduce

  1. Open my calendar ('Personal')
  2. Wait for events to load
  3. Spinner keeps spinnging, errors show in the console

Expected behaviour

Events should show up in my calendar ;)

Actual behaviour

UI loads, my 'contacts birthday' calendar loads fine, my 'Personal' calendar does not work. It DOES work on my android phone though(!), through CalDAV over DavDROID.
"Does not work" means the spinner keeps spinning and javascript log shows errors.

Server configuration

Operating system: Centos7 with EPEL and all patches applied

Web server: httpd-2.4.6-45.el7.centos.x86_64

Database: sqlite3

PHP version: PHP Version 7.0.16

Server version: Nextcloud 11.0.2 (production)

Calendar version: Calendar 1.5.2

Updated from an older installed version or fresh install: Updated from older

Signing status (ownCloud/Nextcloud 9.0 and above):

Integrity checker has been disabled. Integrity cannot be verified.

List of activated apps:

Enabled:
  - activity: 2.4.1
  - admin_audit: 1.1.0
  - announcementcenter: 3.0.0
  - bookmarks: 0.9.1
  - calendar: 1.5.2
  - comments: 1.1.0
  - contacts: 1.5.3
  - dav: 1.1.1
  - direct_menu: 0.10.0
  - federatedfilesharing: 1.1.1
  - federation: 1.1.1
  - files: 1.6.1
  - files_automatedtagging: 1.1.1
  - files_markdown: 1.0.1
  - files_pdfviewer: 1.0.1
  - files_retention: 1.0.1
  - files_sharing: 1.1.1
  - files_texteditor: 2.2
  - files_trashbin: 1.1.0
  - files_versions: 1.4.0
  - files_videoplayer: 1.0.0
  - firstrunwizard: 2.0
  - gallery: 16.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - news: 10.1.0
  - nextcloud_announcements: 1.0
  - notes: 2.2.0
  - notifications: 1.0.1
  - password_policy: 1.1.0
  - provisioning_api: 1.1.0
  - serverinfo: 1.1.1
  - sharebymail: 1.0.1
  - spreed: 1.2.0
  - survey_client: 0.1.5
  - systemtags: 1.1.3
  - templateeditor: 0.2
  - theming: 1.1.1
  - twofactor_backupcodes: 1.0.0
  - updatenotification: 1.1.1
  - workflowengine: 1.1.1
Disabled:
  - apporder
  - encryption
  - external
  - files_accesscontrol
  - files_external
  - tasks
  - user_external
  - user_ldap
  - user_saml

The content of config/config.php:

{
    "system": {
        "instanceid": "oc2ck5u2i8v0",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***.nl",
            "nc.***REMOVED SENSITIVE VALUE***.nl"
        ],
        "datadirectory": "\/var\/www\/html\/nextcloud\/data",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***.nl\/nextcloud",
        "dbtype": "sqlite3",
        "version": "11.0.2.7",
        "logtimezone": "UTC",
        "installed": true,
        "theme": "",
        "loglevel": 0,
        "maintenance": false,
        "trashbin_retention_obligation": "30",
        "mail_from_address": "nextcloud",
        "mail_smtpmode": "php",
        "mail_domain": "***REMOVED SENSITIVE VALUE***.nl",
        "updater.release.channel": "production"
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: FireFox 52.0

Operating system: Fedora 25

CalDAV-clients: Browser (not working), android (working), thunderbird (working)

Logs

Web server error log

***REMOVED SENSITIVE VALUE***- - [22/Mar/2017:07:26:50 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 74 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
***REMOVED SENSITIVE VALUE***- - [22/Mar/2017:07:26:56 +0100] "GET /index.php/apps/calendar/ HTTP/1.1" 200 72076 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
***REMOVED SENSITIVE VALUE***- - [22/Mar/2017:07:26:57 +0100] "PROPFIND /remote.php/dav HTTP/1.1" 207 583 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
***REMOVED SENSITIVE VALUE***- - [22/Mar/2017:07:26:58 +0100] "POST /index.php/apps/calendar/v1/config HTTP/1.1" 200 2 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
***REMOVED SENSITIVE VALUE***- - [22/Mar/2017:07:26:58 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 74 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
***REMOVED SENSITIVE VALUE***- - [22/Mar/2017:07:26:58 +0100] "PROPFIND /remote.php/dav/principals/users/user/ HTTP/1.1" 207 591 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
***REMOVED SENSITIVE VALUE***- - [22/Mar/2017:07:26:58 +0100] "GET /index.php/apps/calendar/v1/timezones/EUROPE/BERLIN.ics HTTP/1.1" 200 356 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
***REMOVED SENSITIVE VALUE***- - [22/Mar/2017:07:26:58 +0100] "PROPFIND /remote.php/dav/calendars/user/ HTTP/1.1" 207 9628 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
***REMOVED SENSITIVE VALUE***- - [22/Mar/2017:07:26:58 +0100] "REPORT /remote.php/dav/calendars/user/contact_birthdays/ HTTP/1.1" 207 283 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
***REMOVED SENSITIVE VALUE***- - [22/Mar/2017:07:26:58 +0100] "REPORT /remote.php/dav/calendars/user/personal/ HTTP/1.1" 207 138429 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
***REMOVED SENSITIVE VALUE***- - [22/Mar/2017:07:27:03 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 74 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"

Error log does not hold a lot of entries:

Log file (data/owncloud.log)

{"reqId":"WGVyCHrkshAHj-wy7wdjNgAAAAc","remoteAddr":"***REMOVED SENSITIVE VALUE***","app":"PHP","message":"Class 'Google_Service' not found at \/usr\/share\/php\/Google\/Service\/Drive.php#32","level":3,"time":"2016-12-29T20:28:56+00:00","method":"GET","url":"\/nextcloud\/index.php\/settings\/admin","user":"admin"}
{"reqId":"WGVynnfqZ@9oq0bgprU9EwAAAAY","remoteAddr":"***REMOVED SENSITIVE VALUE***","app":"PHP","message":"Class 'Google_Service' not found at \/usr\/share\/php\/Google\/Service\/Drive.php#32","level":3,"time":"2016-12-29T20:31:27+00:00","method":"GET","url":"\/nextcloud\/index.php\/settings\/admin","user":"admin"}
{"reqId":"WGVzdgp2BY8IVY48bj7USAAAAAA","remoteAddr":"***REMOVED SENSITIVE VALUE***","app":"PHP","message":"Class 'Google_Service' not found at \/usr\/share\/php\/Google\/Service\/Drive.php#32","level":3,"time":"2016-12-29T20:35:02+00:00","method":"GET","url":"\/nextcloud\/index.php\/settings\/admin","user":"admin"}
{"reqId":"WGVz28JcpjuHY7uEbh7cagAAAAo","remoteAddr":"***REMOVED SENSITIVE VALUE***","app":"PHP","message":"Class 'Google_Service' not found at \/usr\/share\/php\/Google\/Service\/Drive.php#32","level":3,"time":"2016-12-29T20:36:43+00:00","method":"GET","url":"\/nextcloud\/index.php\/settings\/admin","user":"admin"}

(=not recent)

Browser log

Error: invalid date-time value: "2017-03-03T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-04-07T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-17T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-05T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-12T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-04-08T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-19T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-02-27T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-14T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-04-01T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-15T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-11T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-27T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-17T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-09T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-05T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-04-06T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-26T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-05T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-07T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-09T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-06T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-04-04T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-15T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-18T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-22T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-11T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-04-03T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-01T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-06T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-04-06T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-03T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-22T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-16T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-04-02T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-04-05T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-14T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-09T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-27T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-05T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-15T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-22T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-03-06T::"  vendor.min.js:20:14510
Error: invalid date-time value: "2017-04-05T::"  vendor.min.js:20:14510

Suspicion

I think some event dates are broken and I want to blame my imported facebook birthdays, but I have no evidence of that.

@georgehrke georgehrke added 1. to develop Accepted and waiting to be taken care of bug labels Mar 22, 2017
@georgehrke georgehrke added this to the 1.6.0-current milestone Mar 22, 2017
@georgehrke
Copy link
Member

georgehrke commented Mar 22, 2017

I see two bugs here:

@karloluiten
Copy link
Author

Thanks for taking a look at this/tagging and commenting.

Is there anything I can do? Or do you have enough data? Thanks a lot.

@georgehrke
Copy link
Member

I think I have enough data to fix this.
I'll look into this in the next couple of days and will get back to you when I need more information :)

@karloluiten
Copy link
Author

Is there news? Let me know if I can help :)

@georgehrke
Copy link
Member

Can you provide me sample ics please.
FB actually fixed their birthday calendar, so i can't use that.

@karloluiten
Copy link
Author

karloluiten commented Apr 6, 2017

What I did:
Get random error from console:

"Error: invalid date-time value: "2017-05-02T::"

Get response from REPORT request to https://nc.***.nl/remote.php/dav/calendars/***/personal/

Looked for the string "2017-05-02T::". No results (?). Then I looked for 20170502 and got 3 matching VEVENTS:

BEGIN:VEVENT
DTSTART:20170502
SUMMARY::***'s birthday
RRULE:FREQ=YEARLY
DURATION:P1D
UID:b100001558480645@facebook.com
END:VEVENT
BEGIN:VEVENT
DTSTART:20170502
SUMMARY::***'s birthday
RRULE:FREQ=YEARLY
DURATION:P1D
UID:b100002718611916@facebook.com
END:VEVENT
BEGIN:VEVENT
DTSTART:20170502
SUMMARY:***'s birthday
RRULE:FREQ=YEARLY
DURATION:P1D
UID:b100000416765820@facebook.com
END:VEVENT

Is this what you were looking for?

@georgehrke
Copy link
Member

Did you disable all other calendars and only try to load the broken one?

Looked for the string "2017-05-02T::". No results (?). Then I looked for 20170502 and got 3 matching VEVENTS:

😕

Can you please double check?
2017-05-02T:: has to come from somewhere.

Searching for T:: should be enough.

@karloluiten
Copy link
Author

  • Created a test calendar, shows fine and I can add calendars
  • Disabled the test and "Contact birthdays" calendar
  • Reload, see the same error (it still seems to load the Contact birthdays" calendar, odd)
  • I get the "Response" tab from the REPORT request. ''No T:: in there'', which I find very odd.
  • I downloaded the 'personal' calendar (the broken one), searched the ics file, ''Also no T:: in there".
  • To be sure I also downloaded the other 2 calendars, no T:: there either.
  • I got the whole error list and kept my phone (which has a working calendar) next to it: it matches 1:1 to facebook birthdays on my calendar. Example:
BEGIN:VEVENT
DTSTART:20170502
SUMMARY:***'s birthday
RRULE:FREQ=YEARLY
DURATION:P1D
UID:b100000416765***@facebook.com
END:VEVENT

Are the events maybe being rewritten somewhere? I can't really explain it otherwise. Thanks a lot for your time though!

@georgehrke
Copy link
Member

DTSTART:20170502

Ah, obviously 🙈
It's supposed to be DTSTART;VALUE=DATE:20170502, we can catch that error.

@karloluiten
Copy link
Author

karloluiten commented Apr 8, 2017

I see this code:

293       if (findTypes.indexOf(dateType) >= 0 && el.trim().substr(-3) === 'T::') { // is date without time
294         icsDate = el.replace(/[^0-9]/g, '');
295         ics = ics.replace(el, dateType + ';VALUE=DATE:' + icsDate);
296       }

That will not match the time-less thing I suppose :).

-edit- just see your post, think we got something :)

@georgehrke
Copy link
Member

it's only applied when the ics data contains 'T::'. (https://github.com/nextcloud/calendar/blob/master/js/app/models/veventModel.js#L327)

we just need to add an extra rule if the length of the date is 8 but there is no VALUE=DATE

@karloluiten
Copy link
Author

Is it hard to add a 8-length check to that veventModel.js? I tried editing on my personal server but js seems to be minified in some way...

@georgehrke georgehrke modified the milestones: 1.6.0-current, 1.5.3-next-maintenance Apr 30, 2017
@georgehrke georgehrke self-assigned this May 11, 2017
@georgehrke georgehrke added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels May 11, 2017
@georgehrke georgehrke added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 14, 2017
@pojntfx
Copy link

pojntfx commented May 27, 2021

I can confirm this issue still persists on 20.0.9; for example importing https://splan.hdm-stuttgart.de/splan/ical?lan=de&puid=20&type=config&lc=,oJ,m,Wqb,d,b,b,b,g&oex=false, my Uni's schedule, fails with:

could not convert calendar object Error: invalid date-time value: "--T::"
    at Function.ICAL.Time.fromDateTimeString (ical.js:5901)
    at Object.decorate (ical.js:781)
    at t._decorate (ical.js:2939)
    at t._hydrateValue (ical.js:2922)
    at t.getFirstValue (ical.js:3068)
    at Function.value (property.js:458)
    at Function.value (abstractComponent.js:544)
    at Function.value (abstractComponent.js:550)
    at Function.value (abstractComponent.js:550)
    at Function.value (calendarComponent.js:144)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants