Flex Error: Channel disconnected before an acknowledgement was received.

I recently encountered this fault event message while working on a Flex/AIR application. I'm using ColdFusion remoting to hit a database. Everything worked fine on my local development evironment, but my release build pointing to the development server returned this message.

 

Channel disconnected before an acknowledgement was received

 

Problem was Application.cfc was redirecting to a login screen and preventing the ColdFusion componenets from being found.

 

Here is my RemoteObject tag for the local development environment. There is a basic Application.cfc at localhost.

 

<mx:RemoteObject destination="ColdFusion"
  source="com.someone.cfc.login"
  id="loginRO"
  endpoint="http://localhost/flex2gateway/"
  result="loginResultHandler(event)"
  fault="loginFaultHandler(event)">
  <mx:method name="getLogin">
    <mx:arguments>
      <username>{username}</username>
      <password>{password}</password>
    </mx:arguments>
  </mx:method>
  </mx:RemoteObject>

 

Here is my RemoteObject tag for the release build pointing to my development server.

 

<mx:RemoteObject destination="ColdFusion"
  source="com.someone.cfc.login"
  id="loginRO"
  endpoint="http://www.somedomain.com/flex2gateway/"
  result="loginResultHandler(event)"
  fault="loginFaultHandler(event)">
  <mx:method name="getLogin">
    <mx:arguments>
      <username>{username}</username>
      <password>{password}</password>
    </mx:arguments>
  </mx:method>
  </mx:RemoteObject>

 

My solution ... create a subdomain. remote.mydomain.com without the Application.cfc
and upload /com/someone/cfc/login.cfc

 

Happy Coding....

 

5 responses to “Flex Error: Channel disconnected before an acknowledgement was received.”

  1. Mahesh Jul 29, 2009 at 8:51 AM
    Hello Sidney,
    Even I am experiencing the same error when my flex application is accessed from a slower machine. I would like to know why this error occures, I mean the root cause of the error. Basically I'm interested in knowing what happens at server side as well as client side which causes this error.
    Thank you

    Mahesh
  2. Piyush Aug 24, 2009 at 3:59 AM
    Same Here...
  3. Sid Maestre Aug 24, 2009 at 10:20 PM
    I don't know what the root cause of the error is. But I DID find many blog posts about this error and each one offered a different solution. I posted my solution because it was yet another reason why this error is thrown.

    If you want my best guess. The "Channel disconnected before an acknowledgement means that Flex is not reaching your server. Perhaps there is a way to set the "timeout" in the remote object to wait for longer responses. That's were I would look if the problem is occuring on slower client connections.
  4. Akbar Sep 17, 2009 at 6:21 AM
    I have some experienced with that error, i also use remote object with php backend. Here is the clue, i have some php class named DictServices.php, within it i have function "getDict(Dict $dict)". When I call remote object from my flex with something like this "roDictServices.getDict(dict.word)", it cause "Channel disconnected before an acknowledgement was received", but when i change my flex code like this "roDictServices.getDict(dict)",...and...the error solved, and my application run as i wish. Sorry if my explanation unclear, cause it suck, field reply doesn't support to make a new line.
  5. deborah Mar 11, 2010 at 1:10 PM
    The tips listed here fixed it for me.

    http://blog.crankybit.com/flex-remoting-over-ssl/

Leave a Reply

Leave this field empty:

Powered by Mango Blog.