New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NS_ERROR_FAILURE XMLHttpRequest exception #2809
Comments
Please show the code you're using that's "attempting XMLHttpRequest". You've only shown the exception. What resource are you trying to get/head/post? Is it on the same origin as your main document? |
@swhiteman Thanks for the prompt replay 👍 toggleItems: function () {
var self = this;
if (gotTimedOut) clearTimeout(gotTimedOut)
gotTimedOut = setTimeout(function () {
self.retrieveItems(self.filterItems(self))
// retrieveItems will do the XMLHttpRequest with req-json and sort out the items
})
}
retrieveItems: function (filteredItems) {
// do some sorting of existing items
var req = new ReqJSON({
'async': false,
'url': window.location + 'someEndPoint',
'onSuccess': callback
}).send(JSON.encode(theDataToSubmit))
// do some more filtering
} The exception showed before leads to this chunk of this.fireEvent('request');
xhr.send(data);
if (!this.options.async) this.onStateChange();
if (this.options.timeout) this.timer = this.timeout.delay(this.options.timeout, this);
return this; Interesting warning message i got from
While debugging i tried to resend the data and got this exception:
|
But you still haven't included the relevant information about the main document's origin and the XHR destination's origin. The common sync XHR warning does not itself stop a request from going out but that doesn't mean a CORS response can be processed. |
My bad, i'm trying to |
Do you have a live repro of this problem (CodePen, jsFiddle, et al.)? |
No i don't. I've encountered it during E2E testing on a local dev environment. |
I guess you'll have to work toward a public repro case. Curious if you get the same result with the well-known port for HTTP (TCP 80). What about with GET? And are you absolutely sure the XHR is being sent to the same origin (protocol + hostname + port)? |
I will try setting up one later. Thanks a lot @swhiteman |
Turns out it was an authentication issue with the post request. |
Hello there, I'm new to mootools so bear with me please :)
I'm having a strange issue while E2E testing. I'm using
mootools 1.4.0
withFirefox 45.0.1
While attempting
XMLHttpRequest
this exception gets raised:I did
try
catch
to pass the test error free for now. Thanks in advance 👍The text was updated successfully, but these errors were encountered: