javascriptjqueryfirefoxcors

Evil Firefox Error -- "A parameter or an operation is not supported by the underlying object"


I'm trying to figure out what is going on here. I've been at it for hours now and can't seem to get a grip on why this is happening.

I'm making a few AJAX calls, and I keep getting this error back only in Firefox (version 21) on Mac OS X.

Here is the error:

 "[Exception... "A parameter or an operation is not supported by the underlying object" 
   code: "15" nsresult: "0x8053000f (InvalidAccessError)"  location: 
   "https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js Line: 6"

I'm making a CORS call, so I set up my AJAX like so:

$.ajaxSetup({
        crossDomain: true,
        xhrFields: {
            withCredentials: true
        }

    });

And continue calls henceforth. Basically, does anyone out there have ANY experience with this error? I see some posts online but they all seem to do with Cross-Domain CSS, which I'm not using.


Solution

  • Okay, so after of hours of testing (and great discussion from @Dave and @danronmoon, I've finally figured out what's going on.

    The CORS (Cross-Domain Resource Sharing) calls I was making were set to 'async: false' -- (which I realize I did not include in my original post, as I thought it was inconsequential) this, seems to operate fine in all browsers except Firefox, where jQuery will bark at you and your ajax call will fail.

    Thank you all for your help and I hope this helps someone else!