Skip to content

GM_xmlhttpRequest fails in Firefox 5/Aurora #1354

@BinarySplit

Description

@BinarySplit

Using Firefox 5(Beta Channel) and Firefox 5.0a2 (Aurora Channel), most scripts work fine. However, when a script calls GM_xmlhttpRequest, it will never run onload and always run onerror, even if the request succeeded (which can be checked using a debugging proxy such as Fiddler2).

Here is a good script for testing:

// ==UserScript==
// @name           Test GM_xmlhttpRequest
// @namespace      BSP
// @include        https://github.com/
// ==/UserScript==

var log = {};

log.returnValue = GM_xmlhttpRequest({
    method:"GET",
    url:"https://github.com/",
    onload:function(r)
    {
        log.result = "success";
        log.resultData = r;
        alert(log.toSource());
    },
    onerror:function(e)
    {
        log.result = "error";
        log.resultData = e;
        alert(log.toSource());
    }
});

This alerts:

({
    returnValue:{abort:(function () {req.abort();})}, 
    result:"error", 
    resultData:{responseText:"", readyState:4, responseHeaders:null, status:null, statusText:null, finalUrl:null}
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions