IE11 HTTPS AJAX XMLHttpRequest: Network Error 0x2eff, Could not complete the operation due to error 00002eff

Nikhil Das Nomula picture Nikhil Das Nomula · Dec 2, 2015 · Viewed 30.8k times · Source

I have an ajax POST request that can take anywhere between 2 seconds to 30+ minutes. The post request occurs as a result of button click

If the request takes less than a minute or two, it comes back with a response and everything works fine. However if the request takes longer than two minutes it comes back with "Network error: XMLHttpRequest: Network Error 0x2eff, Could not complete the operation due to error 00002eff".

Ofcourse, it works fine Firefox and Chrome.

The application is deployed on a JBoss server with SSL enabled. The architecture here is that we have a load balancer that routes the request to two Jboss servers.

Internet Explorer

Version: 11.0.9600.180971C Update: 11.0.25

I have tried the following but in vain

1) ajax set cache to false - did not work

2) Changed registry settings as per https://support.microsoft.com/en-us/kb/813827 - did not work, here is where it gets confusing, thissuggests it is not an IE thing, but at the same time this works on chrome and ff so its not a server thing too

3) Set ajax timeout to 0 - did not work 4) Added e.preventDefault after $('#mdlSgn').click(function() { as per jQuery Ajax requests are getting cancelled without being sent

$('#mdlSgn').click(function() {
    $('#cnfdsgl').modal('hide');

     $.ajax({
        url: ajaxUrl,
        type: "POST",
        data: JSON.stringify(input),
        contentType: "application/json; charset=UTF-8",
        dataType: "json",
        success: function(data) {
             /// some logic


        },
        error : function(jqXhr, textStatus, errorThrown) {
            /// some logic
        }
    });

 //some other logic
}); 

Answer

Jo VdB picture Jo VdB · Oct 23, 2018

We spend multiple days searching for the cause of this problem!

  • In the console: SCRIPT7002: XMLHttpRequest: Network Error 0x2eff, Could not complete the operation due to error 00002eff.
  • In the network tab of IE/Edge, we see the failed request as 'Pending...'
  • XmlHTTPRequest/JQuery returns 404 error at the client, but the server returned a successfully 200 response.
  • No response headers returned

We only had this problem when using all of these:

  • HTTP/2
  • POST requests
  • Windows 10
  • IE or Edge

Apparently it is a Windows 10 bug in the HTTP stack that is now solved in Windows 10 version 1803 (April 2018). So normally this problem will disappear over time for people/companies using auto updates of Windows. used Windows 10 versions WorldWide

We tested this on an older and newer version of Windows 10 and it is indeed solved.

Some temporary solution could be:

  • disable HTTP/2 for IE and Edge and use HTTPS (server side change).
  • use GET (if possible)
  • does PUT also has this problem?
  • do some retries if no response headers are returned
  • accept that IE/Edge users will be punished ;-)