SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3,

2019-01-01 03:48发布

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.

标签: jquery ajax
13条回答
呛了眼睛熬了心
2楼-- · 2019-01-01 04:16

Upping the directive in the virtualhost for KeepAliveTimeout to 60 solved this for me.

查看更多
萌妹纸的霸气范
3楼-- · 2019-01-01 04:17

I received the same error (SCRIPT7002: XMLHttpRequest: Network Error 0x80004004, Operation aborted), in our case it was because of JavaScript's same origin policy.

Our web app was making a JQuery AJAX call to our server on Port 8080. The call was getting intercepted and re-routed over SSL (due to server rules mandating that incoming traffic use SSL).

Once we made our web app load through the SSL port the issue was fixed.

查看更多
旧时光的记忆
4楼-- · 2019-01-01 04:17

Incase none of these solutions were "clear" enough, essentially IE/Edge is failing to parse your "data" field of your AJAX call properly. More than likely you're sending an "encoded" JSON object.

What Failed: "data": "{\"Key\":\"Value\"}",

What Works: "data":'{"Key":"Value"}'

查看更多
几人难应
5楼-- · 2019-01-01 04:19

We also encountered similar problems. However, setting the charset as noted in the previous comment did not help. Our application was making an AJAX request every 60 seconds and our webserver, nginx, was sending Keep-Alive timeout at 60 seconds.

We fixed the problem by setting the keep-alive timeout value to 75 seconds.

This is what we believe was happening:

  1. IE makes an AJAX request every 60 seconds, setting Keep-Alive in the request.
  2. At the same time, nginx knows that the Keep-Alive timeout value is ignored by IE, so it starts the TCP connection close process (in the case of FF/Chrome this is started by the client)
  3. IE receives the close connection request for the previously sent request. Since this is not expected by IE, it throws an error and aborts.
  4. nginx still seems to be responding to the request even though the connection is closed.

A Wireshark TCP dump would provide more clarity, our problem is fixed and we do not wish to spend more time on it.

查看更多
无与为乐者.
6楼-- · 2019-01-01 04:21

With the Apache 2 change KeepAliveTimeout set it to 60 or above

查看更多
荒废的爱情
7楼-- · 2019-01-01 04:28

[SOLVED]

I only observed this error today. for me the Error code was different though.

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

It was occurring randomly and not all time. but what it noticed is, if it comes it comes for subsequent ajax calls.. so i put some delay of 5 seconds between the ajax calls and it resolved.

查看更多
登录 后发表回答