ical.js: invalid date-time value: "2022-12-20T::
Categories
(Calendar :: ICAL.js Integration, defect)
Tracking
(thunderbird_esr102? fixed)
People
(Reporter: KaiE, Assigned: lasana)
References
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
48 bytes,
text/x-phabricator-request
|
wsmwk
:
approval-comm-esr102+
|
Details | Review |
I've switched calendar.icaljs on TB 91 and get the following error many times in console:
NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "invalid date-time value: "2022-02-14T::"" {file: "resource:///modules/calendar/Ical.jsm" line: 5943}]'[JavaScript Error: "invalid date-time value: "2022-02-14T::"" {file: "resource:///modules/calendar/Ical.jsm" line: 5943}]' when calling method: [calIIcalComponent::getNextProperty] calIteratorUtils.jsm:167
icalProperty resource:///modules/calendar/utils/calIteratorUtils.jsm:167
next self-hosted:1430
setItemBaseFromICS resource:///components/calItemBase.js:920
set icalComponent resource:///modules/CalEvent.jsm:164
run resource:///modules/CalIcsParser.jsm:272
Error: invalid date-time value: "2022-02-15T::" Ical.jsm:5943:13
fromDateTimeString resource:///modules/calendar/Ical.jsm:5943
fromString resource:///modules/calendar/Ical.jsm:5979
decorate resource:///modules/calendar/Ical.jsm:825
_decorate resource:///modules/calendar/Ical.jsm:2981
_hydrateValue resource:///modules/calendar/Ical.jsm:2964
getValues resource:///modules/calendar/Ical.jsm:3132
propertyIterator resource:///components/calICSService.js:481
next self-hosted:1430
getNextProperty resource:///components/calICSService.js:502
icalProperty resource:///modules/calendar/utils/calIteratorUtils.jsm:167
next self-hosted:1430
setItemBaseFromICS resource:///components/calItemBase.js:920
set icalComponent resource:///modules/CalEvent.jsm:164
run resource:///modules/CalIcsParser.jsm:272
Comment 1•3 years ago
|
||
Do you know where is the data is coming from?
Comment 2•3 years ago
|
||
Hmm, https://github.com/mozilla-comm/ical.js/pull/412 and bug 1626739 did make use the lenient mode.
Reporter | ||
Comment 3•3 years ago
|
||
Here is a calendar that triggers it, add it as a "calendar on the network" and subscribe to it, then you should see.
https://www.fes-frankfurt.de/abfallkalender/R29ldGhlc3RyLnwxMXw2MDMxMw%3D%3D.ics
Reporter | ||
Comment 4•3 years ago
|
||
The amount of spam this generates on the console is very annoying.
Reporter | ||
Comment 5•2 years ago
|
||
Also reported at ical upstream: https://github.com/mozilla-comm/ical.js/issues/515
and submitted a pull request upstream: https://github.com/mozilla-comm/ical.js/pull/516
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 6•2 years ago
|
||
Updated•2 years ago
|
Reporter | ||
Comment 7•2 years ago
|
||
I suggest to take this as a temporary fix, until we get progress upstream.
Comment 8•2 years ago
|
||
I'm not seeing the urgency to patch this? It doesn't really affect users? If console errors are annoying you, why not keep the temporary patch in your own tree and leave it at that?
The general question about leniency probably needs a bit more discussion.
Reporter | ||
Comment 9•2 years ago
|
||
I just noticed that the calendar from comment 3 doesn't contain those values!
It apparently only contains correct dates. For example, it contains DTSTART:20220103
Is that an allowed?
Apparently it's internal Ical code that produces the incorrect value, and then fails to parse it.
Reporter | ||
Comment 10•2 years ago
|
||
(In reply to Andrei Hajdukewycz [:sancus] from comment #8)
I'm not seeing the urgency to patch this? It doesn't really affect users?
I just checked again.
It's a real regression, not just cosmetic. We fail to parse, and no events from this calendar are shown.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 11•2 years ago
|
||
The failing file has entries like:
DTSTART:20220103
According to this post, the file could be considered invalid:
http://microformats.org/discuss/mail/microformats-dev/2007-January/000187.html
because the default type for DTSTART is a full DATE-TIME. While a simple is a valid value for DTSTART (and it's the expected type for VEVENT), apparently the correct way to specify it would be this format:
DTSTART;VALUE=DATE:20220103
The above post mentions that there were misleading examples in old RFCs (which gave the impression that the DTSTART:20220103 format is valid).
Also, the file worked in past Thunderbird versions, with the old C calendar library (libical).
Should we continue to support the simple format for DATE-only values?
Reporter | ||
Comment 12•2 years ago
|
||
Who wants to give opinions regarding my previous comments?
Comment 13•2 years ago
•
|
||
(In reply to Kai Engert (:KaiE:) from comment #12)
Who wants to give opinions regarding my previous comments?
What is blocking finishing up and getting the upstream patch merged? It's not clear to me from reading the PR.
OK, so after discussing this:
-
It seems like ical.js does not parse
DTSTART:20220103
date-only values like this properly. -
The upstream patch does not actually fix that underlying issue, but fixes it after the library has already parsed the string and turned it into an (incorrect) value like
20220103::
.
Therefore:
Ideally we should fix ical.js. If we can't do that in a timely manner, then maybe it makes sense to put a temporary fix in here.
Updated•2 years ago
|
Assignee | ||
Comment 14•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 15•2 years ago
|
||
https://github.com/mozilla-comm/ical.js/pull/519
Depends on D151750
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Comment 16•2 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/116802edf948
Switch ical.js to lenient mode in parser worker. r=darktrojan
Updated•2 years ago
|
Comment 17•2 years ago
|
||
Comment on attachment 9285358 [details]
Bug 1754412 - Switch ical.js to lenient mode in parser worker. r=darktrojan
[Approval Request Comment]
Regression caused by (bug #): ical.js
User impact if declined:
ics files with date-only DTSTART values will fail to parse.
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky):
Since this is only turning on lenient parsing in ical.js it should be fairly low risk, any new bug would have already existed in ical.js. That said, it's possible strict parsing was hiding other bugs.
It is fine to let this live on beta 104 for a week or two if necessary, this isn't terribly urgent.
Comment 18•2 years ago
|
||
Comment on attachment 9285358 [details]
Bug 1754412 - Switch ical.js to lenient mode in parser worker. r=darktrojan
[Triage Comment]
Approved for esr102
Comment 19•2 years ago
|
||
bugherder uplift |
Thunderbird 102.1.1:
https://hg.mozilla.org/releases/comm-esr102/rev/77f09e458039
Description
•