0 Replies Latest reply on Aug 26, 2016 6:27 PM by mishrasonu1993

    Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.Failed

    mishrasonu1993

      I am working on a web-application which has flex based frontend and Python backend. A part of the application involves file browsing: on front-end we click on the file that we want to view. The backend gets the content of the file and sends that to the front-end. This works perfect for text/ASCII files, but there are some data files with no extension. When I click those, the front loses the connection.

       

      Below is the pertinent parts of the front-end code.

      public function MyGatewayHelper(url:String, serviceName:String) { 
           try {
                this.serviceName = serviceName;
                gateway
      = new NetConnection();
                gateway
      .connect(url);
           } catch(error:Error) {
                Alert.show("server error", "Unable to connect", Alert.OK);
           }
      }
      public function call(command:String, result:Function=null, status:Function=null, ...parameters):void {
           command = this.serviceName + "." + command;
           gateway
      .call(command, new Responder(result, status), parameters);
      }

      The back-end code, which corresponds to the command, works fine. I cannot post the back-end code here due to some copyright issues. I have thoroughly checked that code by putting various print statements; it returns the correct data. However the backend log shows the following error:

      2016-08-26 17:28:45-0700 [-] "aa.bbb.cc.ddd" - - [27/Aug/2016:00:28:45 +0000] "POST /app HTTP/1.1" 500 21 "http://pp.qqq.rr.sss:tt/Application.swf" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0"

      And the front end throws the following error:

      Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.Failed

      PS: I have searched a lot. There are some questions where people are getting similar errors, but I could not use any of those for my problem given the scenarios are very different. Please write in the comments below if any other information is required.