Skip navigation
Currently Being Moderated

Flex AMF channel problem only with few IE8 installation

Apr 30, 2009 5:33 PM

Hi,

 

My application is using Flex and remote object to communicate to Java. Its working with IE7 and any other browser and also its working in most installation of IE8. But at two PC, its giving AMF channel problem as shwon below with IE8. On these two PC, if I install IE7, then its working but with IE8, its not working.

 

Flex.FaultEvent.[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 200: url: 'http://localhost:8600/messagebroker/amf'"]

 

ReferenceError: Error #1069: Property message not found on mx.messaging.events.ChannelFaultEvent and there is no default value.
at Main/processUILoadedErrors()
at Main/___Main_Operation5_fault()

at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at mx.messaging::ChannelSet/faultPendingSends()
at mx.messaging::ChannelSet/channelFaultHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/connectFailed()
at mx.messaging.channels::PollingChannel/connectFailed()
at mx.messaging.channels::AMFChannel/statusHandler()

 

I appriciate your help, please let me know if you have any idea or suggestion.

 

Thanks,

Chandresh

 
Replies
  • Currently Being Moderated
    May 14, 2009 4:18 AM   in reply to chandresh_patel

    Me too. (Remote Object AMF Channel (php SabreAMF))

     

    Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 200:

     

    Only IE8 .

     

    Any one Can help me?

     
    |
    Mark as:
  • Currently Being Moderated
    May 22, 2009 10:22 AM   in reply to chandresh_patel

    I'm getting what looks like the same error as well, on a single PC running IE 8 (IE 7 is fine, other PCs with IE 8 are fine, Firefox is fine), only using RemoteObject to communicate with a ColdFusion CFC.

     

    I've been unable to identify anything about the PC that might cause this problem, and Google shows only people asking what might cause this problem.

     
    |
    Mark as:
  • Currently Being Moderated
    May 22, 2009 11:00 AM   in reply to Dave DuPlantis

    Thanks for the feedback. I'm running on IE 7 and have the prob. It seems strange that it works with some classes and not others, which would suggest a prob with the class definition ( the RO vs. the VO ), but I don't see any discrepancies.

     

    ~e

     
    |
    Mark as:
  • Currently Being Moderated
    May 22, 2009 11:14 AM   in reply to chandresh_patel

    At first I thought it was an IE problem (I did have an error in IE and not in Firefox), but it turned out that it was partially a caching issue: there was something about the Flex app that I'd fixed later, or something about swf and CFCs being out of sync, that was causing the error. I added cfheader tags to the CF page housing the swf (instead of the default HTML, that doesn't work for me because I need to pass the swf properties at runtime) and that took care of my IE 7 issue.

     

    <cfheader name="Expires" value="#GetHttpTimeString(DateAdd('d', -1, Now()))#">
    <cfheader name="Cache-Control" value="no-cache, no-store">
    <cfheader name="Pragma" value="no-cache">

     

    One thing I read about that could produce this error outside of IE 8 was that you might have to specify the gateway: it was, at one point in my app, looking for http://localhost/flex2gateway, even though other errors now are coming from http://x.x.x.x/flex2gateway. (We're running the standalone installation of CF 8.) I don't know if that's going to help you or not.

     

    But we kept getting the problem in IE 8, and I confirmed with the user that he had the updated swf (even deleted it myself and refreshed the page). Got another laptop, loaded IE 8, default settings, and it ran fine.

     

    I'm almost wondering if I'll have to specify the endpoint in my RemoteObjects myself ... I thought I'd tried that once before with no luck, although that may have been caused partly by the caching issue.

     

    [edit] So no, it's not the wrong endpoint in my case - I checked the error detail this time and it's definitely looking for the correct endpoint.

     
    |
    Mark as:
  • Currently Being Moderated
    May 22, 2009 1:18 PM   in reply to Dave DuPlantis

    I think I stumbled on a solution:

     

    from: http://flexdiary.blogspot.com/2008/11/thoughts-on-remoting.html

     

    "I think the real reason the serialization wasn't working was the last thing I discovered, which is that you have to have a dummy variable typed as your custom class in the same class as the RemoteObject that you're using to retrieve the values. This makes sure that the class definition gets compiled into the class where it can be used."

     

    If I add a Dummy Variable in my Flex ProductVO:

     

    public var dummy:CaseVO;

    … 

    Re: Flex AMF channel problem only with few IE8 installation

    public var cases:ArrayCollection = new ArrayCollection();

       

     

    then the returned RO gets properly deserialized.

     

    ~e

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 17, 2009 2:33 PM   in reply to chandresh_patel

    Guys,

    I believe the problem is narrowed down to Vista  & some installations of IE8. I have a user who getting this error after he installed IE8 on his vista machine. When he runs the app from any other browser (Safari or Firefox) there is no problem. I've posted a Charles session at

    http://bugs.adobe.com/jira/browse/SDK-21005 . Make sure you vote on this there.

    -Luis

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 2, 2009 7:13 AM   in reply to chandresh_patel

    Hi,

    I had the same problem and in my opinion I found out a flexible solution which is working well with all browsers. This solution is tested for: Flex 3.4, flash player 10,0,32,18 and the latest Blaze DS in august 2009. But should work even in other configurations.

    First you should definetly take a look at this post in order to understand deeply the problem: click here

     

    Abstract of the solution:

    Define channelSet with two channels: amfChannel as a default one and httpChannel as second one. Then delegate to Flex to handle for you when your browser has troubles with AMF (like some IE8) and Flex will switch automatically to httpChannel if necessary.

     

    Analyze the log file first to be sure that the solution is what you need:

    In the following log file you can see the same classical "HTTP: Status 200" problem which is the root of all troubles. The channelSet initially adds

    two channels amfChannel and httpChannel. Then a method myFirstMethod(myFirstParameter) has been invoked over the remoteObject.

    As you see the default channel amfChannel fails and Flex is trying with the httpChannel and then succeeds.

     

    The PROVE: IE8 having troubles with AMF and switching to HTTP, log file:

     

    14:03:52.375 INFO  Channel : 'amfChannel' channel endpoint set to http://localhost:8080/backend/messagebroker/amfpolling
    14:03:52.375 INFO  Channel : 'httpChannel' channel endpoint set to http://localhost:8080/backend/messagebroker/http
    14:03:52.390 INFO  Producer : 'E095D162-76F4-61C5-EA47-15227D7881AA' producer set destination to 'be-destination-oe'.
    14:03:52.390 DEBUG 1_ServiceDelegate : CALL service=setUser args=0001...
    14:03:52.390 INFO  Producer : 'E095D162-76F4-61C5-EA47-15227D7881AA' producer sending message '96918781-BFB2-2346-9CFE-15227D88AA0A'
    14:03:52.390 DEBUG Channel : 'amfChannel' pinging endpoint.
    14:03:52.578 DEBUG Channel : 'amfChannel' channel got status. (Object)#0
      code = "NetConnection.Call.Failed"
      description = "HTTP: Status 200"
      details = "http://localhost:8080/backend/messagebroker/amfpolling"
      level = "error"
    14:03:52.578 INFO  Channel : 'amfChannel' channel polling stopped.
    14:03:52.578 ERROR Channel : 'amfChannel' channel connect failed.
    14:03:52.578 WARN  Producer : 'E095D162-76F4-61C5-EA47-15227D7881AA' producer channel faulted with Channel.Connect.Failed NetConnection.Call.Failed: HTTP: Status 200: url: 'http://localhost:8080/backend/messagebroker/amfpolling'
    14:03:52.640 INFO  Channel : 'httpChannel' channel is connected.
    14:03:52.640 DEBUG Channel : 'httpChannel' channel sending message:
    (mx.messaging.messages::RemotingMessage)#0
      body = (Array)#1
        [0] "myFirstParameter"
      clientId = (null)
      destination = "be-destination-oe"
      headers = (Object)#2
      messageId = "96918781-BFB2-2346-9CFE-15227D88AA0A"
      operation = "myFirstMethod"
      source = (null)
      timestamp = 0
      timeToLive = 0
    14:03:52.656 INFO  Producer : 'E095D162-76F4-61C5-EA47-15227D7881AA' producer connected.
    14:03:52.687 INFO  Producer : 'E095D162-76F4-61C5-EA47-15227D7881AA' producer acknowledge of '96918781-BFB2-2346-9CFE-15227D88AA0A'.

     

    Solution in details

    1) Server side

    1.1. remote-config.xml

      * be sure to define amf & http channel in the tag <default-channels>

      * destination with id = "backend-destination"

     

    1.2. proxy-config.xml -> be sure to define amf & http channel in the tag <default-channels>

    1.3. message-config.xml -> be sure to define amf & http channel in the tag <default-channels>

    1.4. service-config.xml -> you should have uncommented both channels - amf & http

     

    2) Client side

    2.1. RemoteObjectFactory:

     

    package andrewstoev.flex.services
    {
        import mx.messaging.Channel;
        import mx.messaging.ChannelSet;
        import mx.messaging.channels.AMFChannel;
        import mx.messaging.channels.HTTPChannel;
        import mx.rpc.remoting.mxml.RemoteObject;
        
        public class RemoteObjectFactory
        {        
            private static var AMF_CHANNEL:String = "AMF";
            private static var HTTP_CHANNEL:String = "HTTP";
            
            private static var AMF_ENDPOINT:String = "http://localhost:8080/backend/messagebroker/amfpolling";
            private static var HTTP_ENDPOINT:String = "http://localhost:8080/backend/messagebroker/http";
                    
            private function createChannel(channelType:String):Channel{
                switch(channelType){
                    case AMF_CHANNEL: return new AMFChannel("amfChannel", AMF_ENDPOINT);
                    case HTTP_CHANNEL: return new HTTPChannel("httpChannel", HTTP_ENDPOINT);
                    default: return null;
                }
            }
            
            private function createChannelSet():ChannelSet{
                var amfChannel:Channel = createChannel(AMF_CHANNEL);
                var httpChannel:Channel = createChannel(HTTP_CHANNEL);
                
                var channelSet:ChannelSet = new ChannelSet();
                channelSet.addChannel(amfChannel);
                channelSet.addChannel(httpChannel);
                return channelSet;
            }
            
            public function createRemoteObject():RemoteObject
            {        
                var channelSet:ChannelSet = createChannelSet();
                                    
                var ro:RemoteObject = new RemoteObject();
                ro.endpoint=AMF_ENDPOINT;
                ro.channelSet=channelSet;
                ro.destination="backend-destination";
                return ro;
            }        
        }
    }
    

     

    2.2. How to use it

    var ro:RemoteObject = new RemoteObjectFactory().createRemoteObject();
    ro.myFirstMethod(myFirstParameter);
    

     

    Cheers

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 5, 2010 2:32 AM   in reply to chandresh_patel
     
    |
    Mark as:
  • Currently Being Moderated
    Sep 21, 2011 3:16 AM   in reply to chandresh_patel

    Hey all

     

    Had the same problem with flash builder 4.5 and Google Chrome.

    I spend 2 and a half days debugging and figuring out the problem.

    First i thought that i was the large amount of data that i was loading thru zend amf but suddenly it got resolved by changing the browser.

    changed to latest firefox and it all started working correctly. Also works with IE 7.

     

    Did some more ground work with workmates and we found out that Chrome is failing in different areas. in flash, in joomla in different places....nobody knows why but the problems might get solved or not once the Chrome updates itself.

     

    That suxs!

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 28, 2012 6:39 AM   in reply to Andrew Stoev

    Hi Andrew,

     

     

    We are facing the similar issue with IE9.

     

    Error:

     

    id:0.code:Client.Error.MessageSend.detail:Channel.Connect.Failed error

    NetConnection.Call.Failed:HTTP:Failed:url:'http://localhost:8080/remotin

    g/messagebroker/amf'

     

     

    Can you please suggest a solution for this.

     

    Thanks,

    dbcs.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points