Open Bug 1195618 Opened 9 years ago Updated 2 years ago

[TypeError: ICAL.Value.fromString is undefined] when trying to parse geographic position property like "GEO:38.58;-121.48"

Categories

(Calendar :: ICAL.js Integration, defect)

x86
Windows 7
defect

Tracking

(Not tracked)

People

(Reporter: unicorn.consulting, Unassigned)

References

()

Details

Steps to reproduce

Using the URL http://api.meetup.com/sacgeeks/upcoming.ical 
Create a calendar as ICS and use that URL
Result: many many errors in the error console as shown below

Timestamp: 18/08/2015 1:39:38 PM
Error: TypeError: ICAL.Value.fromString is undefined
Source File: resource://calendar/modules/ical.js
Line: 641

Expected result.
Valid read only calendar entry.

I assume we a seeing this error due to Null values in the file.
This is an example event from the linked calendar:
> BEGIN:VEVENT
> DTSTAMP:20150818T094300Z
> DTSTART;TZID=America/Los_Angeles:20150820T180000
> DTEND;TZID=America/Los_Angeles:20150820T210000
> STATUS:CONFIRMED
> SUMMARY:Casual Magic Night @ The Game Getaway in Old Folsom
> DESCRIPTION:Play magic the gathering in a friendly environment. Test out 
>  that new deck and we will have a regular draft contest if there is inter
>  est.
> ORGANIZER;CN=Meetup Reminder:MAILTO:info@meetup.com
> CLASS:PUBLIC
> GEO:38.58;-121.48
> CREATED:20140703T192824Z
> LAST-MODIFIED:20150127T212029Z
> URL:http://www.meetup.com/sacgeeks/events/224310024/
> UID:event_dmdxxjytlbbc@meetup.com
> LOCATION:The Game Getaway (813 D Sutter Street \, Folsom\, CA)
> CATEGORIES:Social,Star Wars,Sci-Fi/Fantasy,Board Games,Cosplay,Farscape,C
>  omic Books,Watching Movies,Social Networking,Television,Geek Culture,Gam
>  e Night,Gaming,Geeks & Nerds,Sci Fi Conventions
> END:VEVENT

The error is caused by the valid geographic position property
> GEO:38.58;-121.48

If I remove those lines the calendar loads without error. The problem exists only when using the experimental icaljs library, the libical library doesn't show the problem. Turning off icaljs might be a workaround for the affected user.

Philipp, do you happen to know if this is still a problem with upstream icaljs? Seeing that Bug 1115667 is 8 months old I assume icaljs in Lightning is rather out-of-date.
Flags: needinfo?(philipp)
Summary: using an ICAL URL with I assume invalid data generates Console errors but o user error. → [TypeError: ICAL.Value.fromString is undefined] when trying to parse geographic position property like "GEO:38.58;-121.48"
> Turning off icaljs might be a workaround for the affected user.

I made the original report to support.mozilla.org (https://support.mozilla.org/en-US/questions/1078577) which Matt turned into this bug - though I suspect I'm only *an* affected user, not *the* affected user...

How does one go about turning off icaljs?
icaljs library is only enabled for testers of Thunderbird Trunk builds. Users of Aurora, Beta or Release builds are not affected. You can revert back to libical library by setting the advanced preference "calendar.icaljs" to "false".
> icaljs library is only enabled for testers of Thunderbird Trunk builds.

I run nightlies.

> You can revert back to libical library by setting the advanced preference "calendar.icaljs" to "false".

I can confirm that this fixes the problem.  Thanks.
I believe this is fixed with upstream ical.js, I recall there were some changes between the draft and final jCal spec for GEO values. There are some upcoming changes to the recurrence parser where I am waiting on someone else. I might postpone until that is pushed, but I should look into importing the upstream changes soon.
Flags: needinfo?(philipp)
Ok, so we should retest this when new icaljs is available and maybe add unittest for it.
Depends on: 1115667
Is this fixed now?
Flags: needinfo?(ssitter)
Yes, the parsing error from comment 0 is fixed. Manually test with Lightning 5.1a1 (20160428030250) and the sample from comment 1.

ical.js: 
Opening the ics file works without error and event is displayed --> OK. But if I export to new ics file the longitude value is gone in the file. For example "GEO:37.386013;-122.082932" is changed to "GEO:37.386013" --> dataloss, should be handled in new bug.

libical:
Opening the ics file works without error and event is displayed --> OK. But if I export to new ics file it shows an error in the file. For example "GEO:37.386013;-122.082932" is changed to "GEO:ERROR: No Value" --> dataloss, should be handled in new bug.

@Philipp:
The "GEO:37.386013;-122.082932" sample was taken from <https://tools.ietf.org/html/rfc5545#section-3.8.1.6>. In Comment 5 you wrote that the spec might have been changed. Is this format still as expected? If yes, this might be problem in upstream ical.js or just problem with Lightnings ical.js integration.
Flags: needinfo?(ssitter) → needinfo?(philipp)

I think the format is still expected, but there may have been some errata.

Flags: needinfo?(philipp)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.