Last Comment Bug 1108640 - Error: TypeError: this.mQueuedQueries.pop(...)[Symbol.iterator] is not a function
: Error: TypeError: this.mQueuedQueries.pop(...)[Symbol.iterator] is not a func...
Status: RESOLVED FIXED
:
Product: Calendar
Classification: Client Software
Component: Provider: CalDAV (show other bugs)
: Lightning 3.9
: x86 Windows 7
-- normal (vote)
: 3.9
Assigned To: Philipp Kewisch [:Fallen]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-08 09:27 PST by Philip Chee
Modified: 2015-02-18 13:31 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fix - v1 (797 bytes, patch)
2015-02-13 16:41 PST, Philipp Kewisch [:Fallen]
philipp: approval‑calendar‑aurora+
Details | Diff | Splinter Review
Fix - v2 (796 bytes, patch)
2015-02-16 14:23 PST, Philipp Kewisch [:Fallen]
ssitter: review+
Details | Diff | Splinter Review

Description User image Philip Chee 2014-12-08 09:27:19 PST
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 User image Stefan Sitter 2014-12-08 10:07:26 PST
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}]
Comment 2 User image Philip Chee 2014-12-09 01:55:30 PST
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 User image Stefan Sitter 2015-01-29 11:18:11 PST
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.
Comment 4 User image Philip Chee 2015-01-30 09:42:10 PST
(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
Comment 5 User image Philipp Kewisch [:Fallen] 2015-02-13 16:41:35 PST
Created attachment 8564425 [details] [diff] [review]
Fix - v1

The arguments object doesn't have the @@iterator symbol. Slicing it will help.
Comment 6 User image Philip Chee 2015-02-16 07:27:24 PST
(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
Comment 7 User image Philipp Kewisch [:Fallen] 2015-02-16 13:56:38 PST
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.
Comment 8 User image Philipp Kewisch [:Fallen] 2015-02-16 14:23:27 PST
Created attachment 8565174 [details] [diff] [review]
Fix - v2

Note You need to log in before you can comment on or make changes to this bug.