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

RESOLVED FIXED in 3.9

Status

Calendar
Provider: CalDAV
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Philip Chee, Assigned: Fallen)

Tracking

Lightning 3.9
x86
Windows 7

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

3 years ago
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

Comment 1

3 years ago
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
(Reporter)

Comment 2

3 years ago
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";

Comment 3

3 years ago
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.
(Reporter)

Comment 4

3 years ago
(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
(Assignee)

Comment 5

3 years ago
Created attachment 8564425 [details] [diff] [review]
Fix - v1

The arguments object doesn't have the @@iterator symbol. Slicing it will help.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #8564425 - Flags: review?(ssitter)
(Assignee)

Updated

3 years ago
Attachment #8564425 - Flags: approval-calendar-aurora+
(Assignee)

Updated

3 years ago
Target Milestone: --- → 3.9
(Reporter)

Comment 6

3 years ago
(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
(Assignee)

Comment 7

3 years ago
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.
(Assignee)

Comment 8

3 years ago
Created attachment 8565174 [details] [diff] [review]
Fix - v2
Attachment #8564425 - Attachment is obsolete: true
Attachment #8564425 - Flags: review?(ssitter)
Attachment #8565174 - Flags: review?(ssitter)

Updated

3 years ago
Attachment #8565174 - Flags: review?(ssitter) → review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed

Comment 9

3 years ago
https://hg.mozilla.org/comm-central/rev/108622e38195

Updated

3 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: 3.9 → 4.0

Comment 10

3 years ago
https://hg.mozilla.org/releases/comm-aurora/rev/b12ee2866480

Updated

3 years ago
Target Milestone: 4.0 → 3.9
You need to log in before you can comment on or make changes to this bug.