Closed Bug 311427 Opened 19 years ago Closed 19 years ago

create file: test.ics calendar fails

Categories

(Calendar :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gekacheka, Assigned: mostafah)

References

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051001 Mozilla Sunbird/0.2+ Creating a local test file in file:///c:/temp/testICS.ics fails. Reproducible: Always Steps to Reproduce: 1. File | New Calendar File... 2. click "Remote", click "Next". 3. enter url, such as file:///c:/temp/testICS.ics Actual Results: "Your calendar has been created", but no calendar appears. JavaScript Console shows: Error: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIStreamLoader.init]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: file:///C:/Program%20Files/Sunbird/components/calICSCalendar.js :: anonymous :: line 134" data: no] Source File: file:///C:/Program%20Files/Sunbird/components/calICSCalendar.js Line: 134 Expected Results: calendar created.
It really should be possible to create new ics calendars in 0.3a1.
Blocks: 298936
Seems to be regression between 20050929 and 20050930 build. Works for me with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20050929 Mozilla Sunbird/0.2+ and clean profile. File is created. Fails with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20050930 Mozilla Sunbird/0.2+ and clean profile. File is not created.
Source code from error message (mozilla/calendar/providers/ics/calICSCalendar.js): 133 var streamLoader = Components.classes["@mozilla.org/network/stream-loader;1"] 134 .createInstance(Components.interfaces.nsIStreamLoader); 135 streamLoader.init(channel, this, this); Error maybe caused by checkins from bug 310319 concerning nsUnicharStreamLoader?
i think those changes to nsIStreamLoader are more likely: - * @note Failure to open the channel will be indicated by an async callback - * to the observer. + * @note Failure to open the channel will cause init() to throw. A + * successful call to init() means that onStreamComplete is + * guaranteed to be called on aObserver asynchronously (i.e. after + * init() returns).
Attached patch add try/catchSplinter Review
This patch catches the error in initializing the stream. It cleans up what needs to be cleaned up. The advantage is that the parser doesn't need to worry about new files: they simply won't end up being parsed. So any error from the parser is now a real error.
Attachment #199447 - Flags: first-review?(jminta)
Comment on attachment 199447 [details] [diff] [review] add try/catch r=jminta
Attachment #199447 - Flags: first-review?(jminta) → first-review+
patch checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: