PDA

View Full Version : Failure code in Firefox: 0x805e0006



da_b0uncer
4 Sep 2012, 2:05 AM
Somehow I get an error when using Ajax to pull some JSON data from a PHP script.

The Loader loads all classes asynchronous, but when I try to load the JSON I get this error:


Connection.js:692

Component returned failure code: 0x805e0006 [nsIXMLHttpRequest.open]
The method is POST, async is true, the domain is the same domain where the script comes from.
Also I have no AddBlock installed on this Firefox (Version 13.0.1 btw.)
When I call the URL directly in the browser, everything works.

mankz
4 Sep 2012, 3:49 AM
Try disabling all addons and plugins? Does it work on a clean Chrome or IE?

da_b0uncer
4 Sep 2012, 4:00 AM
I have a clean Chrome and a clean Firefox 15 installation.
Chrome works, Firefox don't.

I get till




xhr.open(requestOptions.method, requestOptions.url, async);and then it crashes


requestOptions.method is "POST"
requestOptions.url is "server.company-domain.com:8090/devel/some-path-10.123./index.php"
async is true

Also Firefox 15 doesn't show the mentioned error code, but still crashes.

The code is run in an "eval()" function btw.

so I call a function in eval() which calls the whole Ajax stuff from Connection.js

da_b0uncer
4 Sep 2012, 6:48 AM
I reproduced the problem with Chrome.

Seems that Connection.js sends a OPTIONS request, to check permissions for a cross-site request. Which is funny, because the script is on the same domain as the requested JSON.



Request URL : myurl-internal.com:8090/some/rest/api.php


Request Headers
Access-Control-Request-Headers : origin, x-requested-with, content-type
Access-Control-Request-Method : POST

Origin: http://myurl-internal.com:8090