Closed Bug 1108640 Opened 10 years ago Closed 9 years ago

Error: TypeError: this.mQueuedQueries.pop(...)[Symbol.iterator] is not a function

Categories

(Calendar :: Provider: CalDAV, defect)

Lightning 3.9
x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: philip.chee, Assigned: Fallen)

Details

Attachments

(1 file, 1 obsolete file)

Errors on self built comm-central trunk.

Tue Dec 09 2014 01:11:12
Error: Can't create calendar for 1748ae4c-8f17-4281-9366-3c52196c611a (storage, moz-storage-calendar://): [Exception... "<error>'<error>' when calling method: [calICalendar::id]"  nsresult: "0x804a0007 (<unknown>)"  location: "JS frame :: resource://calendar/modules/calUtils.jsm -> file:///C:/T1/hg/objdir-sm/dist/seamonkey/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCalendarManager.js :: cmgr_assureCache :: line 660"  data: no]

Tue Dec 09 2014 01:11:16
Error: TypeError: this.mQueuedQueries.pop(...)[Symbol.iterator] is not a function
Source file: file:///C:/T1/hg/objdir-sm/dist/seamonkey/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calDavCalendar.js
Line: 1230

Tue Dec 09 2014 01:11:16
Error: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsISAXXMLReader.onStopRequest]
Source file: resource://calendar/modules/calUtils.jsm -> file:///C:/T1/hg/objdir-sm/dist/seamonkey/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calDavRequestHandlers.js
Line: 797
I can confirm this error in Lightning 3.9a1 (Build ID 20141208030208) in Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Thunderbird/37.0a1.

For testing I connected with Google Calendar CalDAV API. After creation the following error was displayed:

> Error: A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
> See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise
> 
> Full Message: TypeError: this.baseUri is null
> Full Stack: etagsHandler.prototype.onStopRequest<@resource://calendar/modules/calUtils.jsm -> file:///[...]/calendar-js/calDavRequestHandlers.js:150:17
> TaskImpl_run@resource://gre/modules/Task.jsm:314:40
> TaskImpl@resource://gre/modules/Task.jsm:275:3
> createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:249:14
> 
> Source File: resource://calendar/modules/calUtils.jsm -> file:///[...]/calendar-js/calDavRequestHandlers.js Line: 150 Source Code: 150

After triggering a manual synchronization I get the error as mentioned above:

> CalDAV: send(https://apidata.googleusercontent.com/caldav/v2/[...]/events/): <?xml version="1.0" encoding="UTF-8"?>
> 
> <C:calendar-multiget xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
> <D:prop><D:getetag/><C:calendar-data/></D:prop>
> <D:href>/caldav/v2/[...]/events/[...].ics</D:href></C:calendar-multiget>
> 
> [JavaScript Warning: "CalDAV: Get failed: CalDAV: Error: got status 400 fetching calendar data for Google CalDAV, null"]
> 
> [JavaScript Warning: "There has been an error reading data for calendar: Google CalDAV.  
> However, this error is believed to be minor, so the program will attempt to continue. 
> Error code: 0x80004005. Description: CalDAV: Error: got status 400 fetching calendar data for Google CalDAV, null"]
> 
> [JavaScript Warning: "There has been an error reading data for calendar: Google CalDAV.  
> However, this error is believed to be minor, so the program will attempt to continue. Error code: READ_FAILED. Description: "]
> 
> [JavaScript Error: "TypeError: this.mQueuedQueries.pop(...)[Symbol.iterator] is not a function" {file: "file:///[...]/components/calDavCalendar.js" line: 1226}]
> 
> CalDAV: recv: null
> aChangeLogListener=null
> calendarURI=https://apidata.googleusercontent.com/caldav/v2/[...]/events/ 
> iscached=false
> this.mQueuedQueries.length=10
> 
> [JavaScript Error: "NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) 
> [nsISAXXMLReader.onStopRequest]" {file: "resource://calendar/modules/calUtils.jsm -> file:///[...]/calendar-js/calDavRequestHandlers.js" line: 797}]
Component: Lightning Only → Provider: CalDAV
Version: unspecified → Lightning 3.9
http://mxr.mozilla.org/comm-central/source/mailnews/mime/jsmime/jsmime.js?rev=4c72d54c0d6f#1593

1595 const JS_HAS_SYMBOLS = typeof Symbol === "function";
1596 const ITERATOR_SYMBOL = JS_HAS_SYMBOLS ? Symbol.iterator : "@@iterator";
Anyone knows if CalDAV calendars from different servers are affected by this bug?
In that case it should be fixed before doing a 3.9 Beta release.
(In reply to Stefan Sitter from comment #3)
> Anyone knows if CalDAV calendars from different servers are affected by this
> bug?
> In that case it should be fixed before doing a 3.9 Beta release.

Wild guess turn off dom.compartment_per_addon
Attached patch Fix - v1 (obsolete) β€” β€” Splinter Review
The arguments object doesn't have the @@iterator symbol. Slicing it will help.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #8564425 - Flags: review?(ssitter)
Attachment #8564425 - Flags: approval-calendar-aurora+
Target Milestone: --- → 3.9
(In reply to Philipp Kewisch [:Fallen] from comment #5)
> Created attachment 8564425 [details] [diff] [review]
> Fix - v1
> 
> The arguments object doesn't have the @@iterator symbol. Slicing it will
> help.
I think Array.of() should work
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of
Array.of won't help here, although the polyfill looks similar its doing something different.

Array.slice(foo) will turn something that is like an array into an array
Array.of(foo) will return [foo].

What will work is Array.from(arguments) though.
Attached patch Fix - v2 β€” β€” Splinter Review
Attachment #8564425 - Attachment is obsolete: true
Attachment #8564425 - Flags: review?(ssitter)
Attachment #8565174 - Flags: review?(ssitter)
Attachment #8565174 - Flags: review?(ssitter) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: 3.9 → 4.0
Target Milestone: 4.0 → 3.9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: