Jquery – SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3, Could not complete the operation due to error 00002ef3

ajaxjquery

I keep receiving this error when I do some Ajax calls…

It may even be something to do with Geocoding but I really have no idea how to capture the error to display something useful to users… or even how to solve the problem as it seems to just be referencing some kind of pointer or something :S 0x2ef3

SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3, Could not complete the operation due to error 00002ef3.

An image might be more helpful than the error message:

enter image description here

Any ideas at all?

My code fires off 10 ajax calls in 1 second to be processed by geocoding server side.

The error comes up intermittently. Sometimes I get geocoded results and sometimes I get that error. I would say I get it 10% of the time. It completely stops the ajax call from firing my error handler in jQuery.

Best Answer

This is the fix that worked for me. There is invalid mime or bad characterset being sent with your json data causing that errror. Add the charset like this to help it from getting confused:

$.ajax({
  url:url,
  type:"POST",
  data:data,
  contentType:"application/json; charset=utf-8",
  dataType:"json",
  success: function(){
  ...
  }
});

Reference:

Jquery - How to make $.post() use contentType=application/json?

Could not complete the operation due to error c00ce56e