19 Replies Latest reply on Nov 23, 2006 11:57 PM by gdoumenc

    Flex behaviour dif on IE and FF..

    gdoumenc Level 1
      Hi,

      I use a <mx:HTTPService> tag in a simple flex aplication. It works fine on IE but not on FF (nothing rendered)??

      By the way, on IE, when I put several such flash objects in a single page, some of them are not renderedlike if I have a synchronization issue...

      I get the page thru tomcat server (I don't know if this is related to)

      Any idea on what reason?
        • 1. Re: Flex behaviour dif on IE and FF..
          ntsiii Level 3
          is Flash Player 9 installed for FireFox?
          Tracy
          • 2. Flex behaviour dif on IE and FF..
            gdoumenc Level 1
            yes of course (you're right never knows..)

            For info, when I use ActionScript, instead of mxml, I have the same issue... Here is the code :

            public function init():void {
            var serv:HTTPService = new HTTPService();
            //serv.useProxy = false;
            serv.url = " http://localhost:8080/juniorcity/value.gdo";
            //serv.send();
            }

            On FF : When I comment the url setting, it works. When I set the url it doesn't work... So thinking of security domain accrediential, then I set the useProxy prop to false (normally default value) then it works!!! But uncomment the serv.send() and again doesn' t work...!!

            On IE, if I put more than one of this flex application in the same window, sometime (about a once a five) one of the embeded flex application is not rendered (as it is always the case on FF)

            Hope you can have an idea...
            • 3. Re: Flex behaviour dif on IE and FF..
              jpwrunyan Level 1
              This is the first time I have ever heard of HTTPService not working on FF but working on IE. Normally it is the opposite.

              Could you please post the stack trace for the error you are getting? I assume it is an actual error and not an internal exception. Also, post the full version of the FlashPlayer you are using (I think 9,0,16,0 is the latest available to public)--again, just to be sure.
              • 4. Flex behaviour dif on IE and FF..
                gdoumenc Level 1
                > Normally it is the opposite : Right :)

                I have an internal error (no stack trace..). What can I do to get more info?
                For the player : V 9,0,16,0 on FF and IE..

                I don't know if it is related but if I add twice the same swf in the same page the second one is not loaded on FF (it is on IE..)
                • 5. Re: Flex behaviour dif on IE and FF..
                  jpwrunyan Level 1
                  Ok, hang on, are you sure it's an internal error? An internal error will pop-up a separate browser window and give you an error code and often (un)helpful message. A service error will always give you a fault (if you listen for the fault event) which will have a stack trace method.

                  Internal errors are from bad AS code only. You should get the same error despite the browswer (you should get the error even if you don't use a browser--just execute the swf locally).

                  Service errors could be anything.

                  Also, are you using FDS or the SDK?

                  You also ought to show your code, not describe it. The code snippet you posted before does not actually execute anything because you have commented out the .send() method. Unless you call send() you can create HTTPService instances till the cows come home and still nothing will happen--good or bad.

                  By the way, ver 28 appears to be available for download now. You can always try updating the flash player.
                  • 6. Flex behaviour dif on IE and FF..
                    gdoumenc Level 1
                    Here is the code (I simplified it..)

                    <?xml version="1.0" encoding="utf-8"?>
                    <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute"
                    creationComplete="onCreationComplete();" width="100%" height="100%">

                    <mx:Script><![CDATA[
                    import mx.controls.Alert;
                    import mx.rpc.http.HTTPService;

                    //public var srv:HTTPService;

                    public function onCreationComplete():void {
                    Alert.show("W4Segment creation complete");
                    }
                    public function invoke(event:Event):void {
                    Alert.show("invoke");
                    }
                    public function fault(event:Event):void {
                    Alert.show("fault" + event.toString());
                    }
                    public function result(event:Event):void {
                    Alert.show("result" + event.toString());
                    }
                    ]]></mx:Script>

                    <!--mx:HTTPService id="srv" url="{Url}" useProxy="false"
                    fault="fault(event)" result="result(event)" invoke="invoke(event)"/-->
                    <mx:VBox id="gridPanel" x="0" y="0" width="100%" height="100%">
                    </mx:VBox>
                    </mx:Application>

                    When I uncomment the variable declaration it doesn't work on FF (I have installed the new version of player). I get no error, nothing happen in fact (the completion alert is not rendered). The background color is there and right menu available (the flash player is running) but nothing rendered. (it works on IE)

                    I'm using FBuilder2 on eclipse.

                    For the other point, I think I have discover the issue. If two swf object have the same id then using history doesn't work on FF (but works on IE)...
                    • 7. Re: Flex behaviour dif on IE and FF..
                      Garenne
                      Hello gdoumenc, this post just to mention that i have exactly the same problem. As you do, i use an HTTService to access data from an XML file. XML File is on a distant server.

                      Considering I have downloaded the Debug version of Flash Player, here is a copy of the error message, appearing when using my app with Firefox :


                      [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
                      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()
                      at mx.rpc::Responder/fault()
                      at mx.rpc::AsyncRequest/fault()
                      at ::DirectHTTPMessageResponder/securityErrorHandler()
                      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
                      at flash.events::EventDispatcher/dispatchEvent()
                      at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()



                      Just as you, I have no problem when using IE ! And I become really mad when I see that other apps I've made before work fine on IE and FF, even when using HTTPService...

                      By the way, how can i check the Flash Player version, in both browsers ?
                      • 8. Re: Flex behaviour dif on IE and FF..
                        gdoumenc Level 1
                        Just click right on the swf rendered and chose the last item..
                        • 9. Re: Flex behaviour dif on IE and FF..
                          Garenne Level 1
                          ok, thanks. So both IE and FF Flash plugin are 9,0,28,0.
                          May i afford to publish here my application, if someone could find where's the problem :


                          <?xml version="1.0" encoding="utf-8"?>
                          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" initialize="ListeXML.send()">

                          <mx:Script>
                          <![CDATA[
                          import mx.collections.ArrayCollection;
                          import mx.rpc.events.ResultEvent;

                          [Bindable]
                          private var arrayfilms:ArrayCollection;
                          private function resultHandler(event:ResultEvent):void {
                          arrayfilms = event.result.liste.affiche;
                          }
                          ]]>
                          </mx:Script>

                          <mx:HTTPService id="ListeXML" url=" http://www.blablabla.bla/xml_file.php" result="resultHandler(event)"/>

                          <mx:DataGrid dataProvider="{arrayfilms}" width="500"/>

                          </mx:Application>
                          • 10. Re: Flex behaviour dif on IE and FF..
                            jpwrunyan Level 1
                            May I make one suggestion:

                            do NOT name methods the same as commonly used reserved words or objects.
                            Try renaming your fault, result, and invoke methods doFault, doResult, and doInvoke
                            or faultHandler, etc...

                            you are just asking for strange bugs to manifest themselves when you use the naming convention you are in your sample.

                            That said, I still don't see a send() command anywhere so I don't know how just uncommenting that code below will raise an error. You might also try testing once without the binding on url...
                            • 11. Re: Flex behaviour dif on IE and FF..
                              jpwrunyan Level 1
                              quote:

                              Originally posted by: Garenne
                              [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
                              at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()
                              at mx.rpc::Responder/fault()
                              at mx.rpc::AsyncRequest/fault()
                              at ::DirectHTTPMessageResponder/securityErrorHandler()
                              at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
                              at flash.events::EventDispatcher/dispatchEvent()
                              at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()



                              If you are getting a Security Error, first thing you should do is set a crossDomain.xml. However, why you would need to do that for IE and not FF is weird.
                              • 12. Re: Flex behaviour dif on IE and FF..
                                gdoumenc Level 1
                                Thanks jpwrunyan for the syntax advices..

                                Anyway the issue is just on the var declaration..!!!! If I uncomment it, I get no render on FireFox like if I have a classloader issue...!!! (no need to send to get an issue anyway complete use on IE works very well..)

                                I tried also to add a crossdomain.xml file but no success.. There should be something in the class loading phase no?

                                Regards
                                • 13. Re: Flex behaviour dif on IE and FF..
                                  ntsiii Level 3
                                  Easiest way to check the player version is to go to this site:
                                  http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15507

                                  Tracy
                                  • 14. Flex behaviour dif on IE and FF..
                                    gdoumenc Level 1
                                    I have created very simple test :

                                    <?xml version="1.0" encoding="utf-8"?>
                                    <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute"
                                    width="100%" height="100%">

                                    <mx:Script><![CDATA[
                                    import mx.rpc.http.HTTPService;

                                    [Bindable]
                                    public var srv:HTTPService;
                                    ]]></mx:Script>

                                    <mx:Label text="Is it working?" />
                                    </mx:Application>

                                    This application is rendered by tomcat here : http://jc.studiogdo.com (you can test)

                                    As the HTTPService is declared, you can see that nothing is rendered!!!! On a local machine (tomcat running on my localhost) then it works on IE. On real server like this example nothing works!!!

                                    useProxy is false, so no need for a crossdomain.xml... Where is the error????
                                    • 15. Re: Flex behaviour dif on IE and FF..
                                      jpwrunyan Level 1
                                      Well, if by declaring an HTTPService variable results in the Label not appearing on screen, then report it as a bug to Adobe. By the way, when you replace your variable declaration with an MXML tag, did it give the same result (on your new example)?

                                      This problem seems a little unbelievable, but then I have seen even less believable bugs manifest themselves in this release. I'm willing to accept you've just found a player bug. I don't have Firefox installed so I can't test your code except on IE, and since you say it works on IE....
                                      • 16. Flex behaviour dif on IE and FF..
                                        gdoumenc Level 1
                                        Yes declaring thru MXML or thru ActionScript gives the same result..

                                        jpwrunyan can you test as :

                                        When testing as a local file : works on IE & FF
                                        When testing on tomcat on the local host : works on IE not on FF
                                        When testing on tomcat on the net (jc.studiogdo.com) : don't work on IE & FF(I have made that to let you test..)

                                        ....

                                        Regards
                                        • 17. Re: Flex behaviour dif on IE and FF..
                                          jpwrunyan Level 1
                                          As I said, I don't have FireFox installed so I can't make that comparison test. I think you should report it as a bug. Adobe will work with you on email until they are able to reproduce the same effect (and I'm sure they also have FireFox).
                                          • 18. Re: Flex behaviour dif on IE and FF..
                                            gdoumenc Level 1
                                            jpwrunyan as I told you :
                                            ...
                                            When testing on tomcat on the net ( http://jc.studiogdo.com) : don't work on IE & FF(I have made that to let you test..)..

                                            So you can test... :)
                                            • 19. Flex behaviour dif on IE and FF..
                                              gdoumenc Level 1
                                              I found something!!! On the flash player menu if I select the play item it works...The issue is then on the wrapper created by Flex Builder2...

                                              Regards