Closed Bug 1754682 Opened 4 years ago Closed 4 years ago

Subscribe to webcal:// URI from command line fails since the feed url ends with .ics

Categories

(Thunderbird :: OS Integration, enhancement)

Thunderbird 91
enhancement

Tracking

(thunderbird_esr91? fixed, thunderbird97 wontfix, thunderbird98 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
thunderbird_esr91 ? fixed
thunderbird97 --- wontfix
thunderbird98 --- fixed

People

(Reporter: cweiske, Assigned: u695164)

References

Details

(Whiteboard: [regression: TB85])

Attachments

(1 external file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0

Steps to reproduce:

I wanted to subscribe to a iCal feed from command line by running
"thunderbird webcal://calendar.google.com/calendar/ical/mozilla.com_dbq84anr9i8tcnmhabatstv5co%40group.calendar.google.com/public/basic.ics"

Actual results:

When Thunderbird was already running, nothing happened at all.

When Thunderbird was not running yet, it tried to start but the main window did not appear. Some errors appeared on terminal and it exited. Output on console was:

$ thunderbird webcal://calendar.google.com/calendar/ical/mozilla.com_dbq84anr9i8tcnmhabatstv5co%40group.calendar.google.com/public/basic.ics
[calBackendLoader] Using Thunderbird's libical backend
[LDAPModuleLoader] Using LDAPDirectory.jsm
[MsgSendModuleLoader] Using MessageSend.jsm
[SmtpModuleLoader] Using SmtpService.jsm
JavaScript error: resource:///modules/MessengerContentHandler.jsm, line 494: NS_ERROR_FILE_TARGET_DOES_NOT_EXIST: Component returned failure code: 0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) [nsICommandLine.resolveFile]
JavaScript error: moz-extension://ef44ed31-97a6-418c-b084-904093efabc0/punycode/punycode.js, line 440: ReferenceError: module is not defined

Expected results:

The "add new network calendar" popup should appear, just as if I went to the calendar view and clicked "new calendar" and then "network calendar".

Both webcal:// and webcals:// schemes should be supported.

(Using webcal:// instead of http:// in links on websites makes sense, because then the browser can hand that URL to the calendaring application instead of downloading the http URL and handling the downloaded file to the calendar app.)

Ah, because the uri ends with .ics.
These two if-else clauses need to be switched around I think. https://searchfox.org/comm-central/rev/274a03b8b16264a2f0394d68693f362b05c03d22/mail/components/MessengerContentHandler.jsm#496,508

Nicolai, maybe you want to jump on this small bug.

Assignee: nobody → nicolai
Status: UNCONFIRMED → NEW
Component: Untriaged → OS Integration
Ever confirmed: true
Summary: Subscribe to webcal:// URI from command line → Subscribe to webcal:// URI from command line fails since the feed url ends with .ics

Yep will do it.

Attachment #9263281 - Attachment description: Bug 1754682 - Fix CLI webcals import with .ics ending. r=mkmelin → Bug 1754682 - Fix CLI webcals and mid import with .ics ending. r=mkmelin
Status: NEW → ASSIGNED

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/0889071b2bef
Fix CLI webcals and mid import with .ics ending. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch

Comment on attachment 9263281 [details]
Bug 1754682 - Fix CLI webcals and mid import with .ics ending. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #): Bug 352566.
User impact if declined: CLI webcals import with URI endings with .ics are crashing Thunderbird.
Testing completed (on c-c, etc.): Manual testing, CLI testing isn't supported yet. Tested an .ics file, an webcals uri with .ics and and an mid import (without .ics ending). All tests worked.
Risk to taking this patch (and alternatives if risky): I don't see any risks so far.

Attachment #9263281 - Flags: approval-comm-esr91?

User impact if declined: CLI webcals import with URI endings with .ics are crashing Thunderbird.

Crashes? If so, is there a crash report?
Or hangs?

This will need to uplift to beta before landing on esr91. Or it is a very old regression so perhaps urgency, in which case it can "ride the train" to the next beta - the merge occurs in three weeks.

Flags: needinfo?(nicolai)
Regressions: 352566
Whiteboard: [regression: TB85]

Comment on attachment 9263281 [details]
Bug 1754682 - Fix CLI webcals and mid import with .ics ending. r=mkmelin

Thanks wsmwk. It's a crash. It should be possible to use the GUI to import webcals with a .ics ending.
But using the CLI ends in a crash. See the bug filing description:

$ thunderbird webcal://calendar.google.com/calendar/ical/mozilla.com_dbq84anr9i8tcnmhabatstv5co%40group.calendar.google.com/public/basic.ics
[calBackendLoader] Using Thunderbird's libical backend
[LDAPModuleLoader] Using LDAPDirectory.jsm
[MsgSendModuleLoader] Using MessageSend.jsm
[SmtpModuleLoader] Using SmtpService.jsm
JavaScript error: resource:///modules/MessengerContentHandler.jsm, line 494: [...]

(see comment#5)
[Approval Request Comment]
Regression caused by (bug #): Bug 352566.
User impact if declined: CLI webcals import with URI endings with .ics are crashing Thunderbird.
Testing completed (on c-c, etc.): Manual testing, CLI testing isn't supported yet. Tested an .ics file, an webcals uri with .ics and and an mid import (without .ics ending). All tests worked.
Risk to taking this patch (and alternatives if risky): I don't see any risks so far.

Flags: needinfo?(nicolai)
Attachment #9263281 - Flags: approval-comm-beta?

To clarify, that is not what we refer to as a crash (a crash is when the whole application goes down). It's only an error in the console and non-working functionality.
But good to uplift nonetheless.

Comment on attachment 9263281 [details]
Bug 1754682 - Fix CLI webcals and mid import with .ics ending. r=mkmelin

[Triage Comment]
Approved for beta

Attachment #9263281 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9263281 [details]
Bug 1754682 - Fix CLI webcals and mid import with .ics ending. r=mkmelin

[Triage Comment]
Approved for esr91

Attachment #9263281 - Flags: approval-comm-esr91? → approval-comm-esr91+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: