Programing

SCRIPT7002 : XMLHttpRequest : 네트워크 오류 0x2ef3, 00002ef3 오류로 인해 작업을 완료 할 수 없습니다.

crosscheck 2020. 10. 25. 11:38
반응형

SCRIPT7002 : XMLHttpRequest : 네트워크 오류 0x2ef3, 00002ef3 오류로 인해 작업을 완료 할 수 없습니다.


Ajax 호출을 할 때이 오류가 계속 발생합니다.

지오 코딩과 관련이있을 수도 있지만 사용자에게 유용한 것을 표시하기 위해 오류를 캡처하는 방법 또는 포인터 또는 무언가를 참조하는 것처럼 보이는 문제를 해결하는 방법도 모르겠습니다. S 0x2ef3

SCRIPT7002 : XMLHttpRequest : 네트워크 오류 0x2ef3, 00002ef3 오류로 인해 작업을 완료 할 수 없습니다.

오류 메시지보다 이미지가 더 유용 할 수 있습니다.

여기에 이미지 설명 입력

어떤 아이디어라도?

내 코드는 지오 코딩 서버 측에서 처리하기 위해 1 초에 10 개의 ajax 호출을 실행합니다.

오류가 간헐적으로 발생합니다. 때로는 지오 코딩 된 결과를 얻고 때로는 해당 오류가 발생합니다. 나는 그것을 10 %의 시간 동안받는다고 말할 것입니다. jQuery에서 내 오류 처리기를 실행하는 ajax 호출을 완전히 중지합니다.


이것은 나를 위해 일한 수정입니다. 잘못된 MIME 또는 잘못된 문자 세트가 json 데이터와 함께 전송되어 오류를 유발합니다. 혼란스럽지 않도록 다음과 같은 문자 세트를 추가하십시오.

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

참고:

jquery-$ .post ()에서 contentType = application / json을 사용하는 방법은 무엇입니까?

오류 c00ce56e로 인해 작업을 완료 할 수 없습니다.


우리도 비슷한 문제에 직면했습니다. 그러나 이전 주석에서 언급 한대로 문자 집합을 설정해도 도움이되지 않았습니다. 우리의 애플리케이션은 60 초마다 AJAX 요청을하고 있었고 웹 서버 인 nginx는 60 초에 Keep-Alive 타임 아웃을 전송했습니다.

연결 유지 제한 시간 값을 75 초로 설정하여 문제를 해결했습니다.

이것이 우리가 일어나고 있다고 생각하는 것입니다.

  1. IE는 60 초마다 AJAX 요청을 만들고 요청에서 Keep-Alive를 설정합니다.
  2. 동시에 nginx는 Keep-Alive 시간 초과 값이 IE에서 무시된다는 것을 알고 있으므로 TCP 연결 닫기 프로세스를 시작합니다 (FF / Chrome의 경우 클라이언트에서 시작됨).
  3. IE는 이전에 보낸 요청에 대한 연결 닫기 요청을받습니다. 이것은 IE에서 예상하지 않기 때문에 오류를 발생시키고 중단됩니다.
  4. nginx는 연결이 닫혀 있어도 요청에 응답하는 것 같습니다.

Wireshark TCP 덤프는 더 명확성을 제공하고 문제가 해결되었으며 더 많은 시간을 소비하고 싶지 않습니다.


동일한 오류 ( SCRIPT7002: XMLHttpRequest: Network Error 0x80004004, Operation aborted)를 받았습니다. 우리의 경우에는 JavaScript의 동일한 출처 정책 때문이었습니다.

우리 웹 앱은 포트 8080에서 서버에 JQuery AJAX 호출을하고있었습니다. 호출이 차단되고 SSL을 통해 다시 라우팅되었습니다 (수신 트래픽이 SSL을 사용하도록 요구하는 서버 규칙으로 인해).

SSL 포트를 통해 웹 앱을로드하면 문제가 해결되었습니다.


이 문제가 발생했습니다. 일부 JSON을 반환하는 AJAX Post 요청이 실패하고 결국 중단을 반환합니다.

SCRIPT7002 : XMLHttpRequest : 네트워크 오류 0x2ef3

콘솔에 오류가 있습니다. 다른 브라우저 (Chrome, Firefox, Safari)에서는 똑같은 AJAX 요청이 괜찮 았습니다.

내 문제를 추적했습니다. 조사 결과 응답에 상태 코드가 누락 된 것으로 나타났습니다. 이 경우 500 내부 오류 여야합니다. 이는 명시 적으로 설정해야하는 오류 코드가 필요한 서비스 스택을 사용하는 C # 웹 애플리케이션의 일부로 생성되었습니다.

IE seemed to leave the connection open to the server, eventually it timed out and it 'aborted' the request; despite receiving the content and other headers.

Perhaps there is an issue with how IE is handling the headers in posts.

Updating the web application to correctly return the status code fixed the issue.

Hope this helps someone!


This issue happened in my project because of an ajax GET call with a long xml string as a parameter value. Solved by the following approach: Making it as ajax post call to Java Spring MVC controller class method like this.

$.ajax({
    url: "controller_Method_Name.html?variable_name="+variable_value,
    type: "POST",
    data:{ 
            "xmlMetaData": xmlMetaData // This variable contains a long xml string
    },
    success: function(response)
    {
        console.log(response);
    }
  });

Inside Spring MVC Controller class method:

@RequestMapping(value="/controller_Method_Name")
  public void controller_Method_Name(@RequestParam("xmlMetaData") String metaDataXML, HttpServletRequest request)
{
   System.out.println(metaDataXML);
}

I had this error for some time and found a fix. This fix is for Asp.net application, Strange it failed only in IE non compatibility mode, but works in Firefox and Crome. Giving access to the webservice service folder for all/specific users solved the issue.

Add the following code in web.config file:

 <location path="YourWebserviceFolder">
  <system.web>
   <authorization>
    <allow users="*"/>
   </authorization>
  </system.web>
 </location>

I have stumbled across this questions and answers after receiving the aforementioned error in IE11 when trying to upload files using XMLHttpRequest:

var reqObj = new XMLHttpRequest();

//event Handler
reqObj.upload.addEventListener("progress", uploadProgress, false);
reqObj.addEventListener("load", uploadComplete, false);
reqObj.addEventListener("error", uploadFailed, false);
reqObj.addEventListener("abort", uploadCanceled, false);

//open the object and set method of call (post), url to call, isAsynchronous(true)
reqObj.open("POST", $rootUrlService.rootUrl + "Controller/UploadFiles", true);

//set Content-Type at request header.for file upload it's value must be multipart/form-data
reqObj.setRequestHeader("Content-Type", "multipart/form-data");

//Set header properties : file name and project milestone id
reqObj.setRequestHeader('X-File-Name', name);

// send the file
// this is the line where the error occurs
reqObj.send(fileToUpload);

Removing the line reqObj.setRequestHeader("Content-Type", "multipart/form-data"); fixed the problem.

Note: this error is shown very differently in other browsers. I.e. Chrome shows something similar to a connection reset which is similar to what Fiddler reports (an empty response due to sudden connection close).

Also, this error appeared only when upload was done from a machine different from WebServer (no problems on localhost).


I just want to add what solved this problem for me, as it is different to all of the above answers.

The ajax calls that were causing the problem were trying to pass an empty data object. It seems IE does not like this, but other browsers don't mind.

To fix it I simply removed data: {}, from the ajax call.


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


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


Have encountered the same issue in my asp.net project, in the end i found the issue is with the target function not static, the issue fixed after I put the keyword static.

[WebMethod]
public static List<string> getRawData()

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"}'


[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 the time. but what it noticed is, if it comes for subsequent ajax calls. so i put some delay of 5 seconds between the ajax calls and it resolved.

참고 URL : https://stackoverflow.com/questions/14527387/script7002-xmlhttprequest-network-error-0x2ef3-could-not-complete-the-operati

반응형