tags:

views:

314

answers:

2

Hi

This error triggers only sometimes when I do XMLHTTPRequest.

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.setRequestHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Documents%20and%20Settings/tmp2/Application%20Data/Mozilla/Firefox/Profiles/7e42a04s.default/extensions/%7Be4a8a97b-f2ed-450b-b12d-ee082ba24781%7D/components/greasemonkey.js :: anonymous :: line 1332" data: no

how can i fix it?

A: 

Don't use XMLHttpRequest, security policies can cause that error.

In a Greasemonkey script, use GM_xmlhttpRequest.

Brock Adams
A: 

Strangely enough, I'm getting the same 0x80004005 error calling window.location.host - it's literally the first call in the script. googling, 0x80004005 seems to be the Swiss Army knife of mozilla errors - it can turn up literally anywhere and break anything for any reason.