4 Replies Latest reply: Dec 29, 2009 7:49 AM by Hironmay RSS

    Connection lost

    jesperkc

      Hi - I'm trying to figure out what happens when a connection to the service is lost.

      I have a listener for ConnectSessionEvent.CLOSE

       

      I tried disconnecting my LAN and this is the error I get in flash.

      I'm not sure what I can do to catch/prevent the error so I can post a message to the user.

       

      ArgumentError: Error #2126: NetConnection object must be connected.
           at flash.net::NetConnection/get nearID()
           at com.adobe.rtc.sharedManagers::StreamManager/createStream()[C:\work\main\connect\SDKApp\payload\libs\flashOnly\player10\src\com\adobe\rtc\sharedManagers\StreamManager.as:682]
           at com.adobe.rtc.collaboration::WebcamPublisher/createMyStream()[C:\work\main\connect\SDKApp\payload\libs\flashOnly\player10\src\com\adobe\rtc\collaboration\WebcamPublisher.as:1142]
           at com.adobe.rtc.collaboration::WebcamPublisher/publish()[C:\work\main\connect\SDKApp\payload\libs\flashOnly\player10\src\com\adobe\rtc\collaboration\WebcamPublisher.as:761]
           at dk.lektieronline.view.component.webcam::Webcam/addLocalCam()[C:\Users\tola.PEOPLEGROUP\Workspace\Lektier Online\source\classes\dk\lektieronline\view\component\webcam\Webcam.as:117]
           at dk.lektieronline.view.component.webcam::Webcam()[C:\Users\tola.PEOPLEGROUP\Workspace\Lektier Online\source\classes\dk\lektieronline\view\component\webcam\Webcam.as:51]
           at dk.lektieronline.controller::SessionConnectionEstablished/execute()[C:\Users\tola.PEOPLEGROUP\Workspace\Lektier Online\source\classes\dk\lektieronline\controller\SessionConnectionEstablished.as:103]
           at org.puremvc.as3.core::Controller/executeCommand()[C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src\org\puremvc\as3\core\Controller.as:115]
           at Function/http://adobe.com/AS3/2006/builtin::apply()
           at org.puremvc.as3.patterns.observer::Observer/notifyObserver()[C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src\org\puremvc\as3\patterns\observer\Observer.as:100]
           at org.puremvc.as3.core::View/notifyObservers()[C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src\org\puremvc\as3\core\View.as:126]
           at org.puremvc.as3.patterns.facade::Facade/notifyObservers()[C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src\org\puremvc\as3\patterns\facade\Facade.as:404]
           at org.puremvc.as3.patterns.facade::Facade/sendNotification()[C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src\org\puremvc\as3\patterns\facade\Facade.as:387]
           at org.puremvc.as3.patterns.observer::Notifier/sendNotification()[C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3\src\org\puremvc\as3\patterns\observer\Notifier.as:49]
           at dk.lektieronline.model::SessionProxy/onConnectionEstablished()[C:\Users\tola.PEOPLEGROUP\Workspace\Lektier Online\source\classes\dk\lektieronline\model\SessionProxy.as:78]
           at flash.events::EventDispatcher/dispatchEventFunction()
           at flash.events::EventDispatcher/dispatchEvent()
           at com.adobe.rtc.session::ConnectSession/onDisconnect()[C:\work\main\connect\SDKApp\payload\libs\flashOnly\player10\src\com\adobe\rtc\session\ConnectSession.as:468]
           at flash.events::EventDispatcher/dispatchEventFunction()
           at flash.events::EventDispatcher/dispatchEvent()
           at com.adobe.rtc.session.managers::SessionManagerBase/http://www.adobe.com/2006/connect/cocomo/session/internal::disconnect()[C:\work\main\connect\SDKApp\payload\libs\flashOnly\player10\src\com\adobe\rtc\session\managers\SessionManagerBase.as:112]
           at com.adobe.rtc.session.managers::SessionManagerFMS/onFmsConnectorDisconnect()[C:\work\main\connect\SDKApp\payload\libs\flashOnly\player10\src\com\adobe\rtc\session\managers\SessionManagerFMS.as:252]
           at flash.events::EventDispatcher/dispatchEventFunction()
           at flash.events::EventDispatcher/dispatchEvent()
           at com.adobe.rtc.session.sessionClasses::FMSConnector/mainNetStatusHandler()[C:\work\main\connect\SDKApp\payload\libs\flashOnly\player10\src\com\adobe\rtc\session\sessionClasses\FMSConnector.as:534]
      

        • 1. Re: Connection lost
          jesperkc Community Member

          Just found out that SessionEvent.SYNCHRONIZATION_CHANGE is dispatched when the connection is lost.

          But I get another error after the 5 times it tries to reconnect:

           

          TOOMANYATTEMPTS: undefined
               at com.adobe.rtc.session.managers::SessionManagerBase/receiveError()[C:\work\main\connect\SDKApp\payload\libs\flashOnly\player10\src\com\adobe\rtc\session\managers\SessionManagerBase.as:271]
               at com.adobe.rtc.session.managers::SessionManagerFMS/receiveError()[C:\work\main\connect\SDKApp\payload\libs\flashOnly\player10\src\com\adobe\rtc\session\managers\SessionManagerFMS.as:288]
               at com.adobe.rtc.session.managers::SessionManagerAdobeHostedServices/receiveError()[C:\work\main\connect\SDKApp\payload\libs\flashOnly\player10\src\com\adobe\rtc\session\managers\SessionManagerAdobeHostedServices.as:254]
               at com.adobe.rtc.session.managers::SessionManagerAdobeHostedServices/getFMSXML()[C:\work\main\connect\SDKApp\payload\libs\flashOnly\player10\src\com\adobe\rtc\session\managers\SessionManagerAdobeHostedServices.as:167]
               at com.adobe.rtc.session.managers::SessionManagerAdobeHostedServices/tryFMSAgain()[C:\work\main\connect\SDKApp\payload\libs\flashOnly\player10\src\com\adobe\rtc\session\managers\SessionManagerAdobeHostedServices.as:284]
               at flash.events::EventDispatcher/dispatchEventFunction()
               at flash.events::EventDispatcher/dispatchEvent()
               at flash.utils::Timer/tick()
          

          • 2. Re: Connection lost
            Hironmay Community Member

            Hi ,

             

            When your connection is lost, ConnectSession first throws SessionEvent.DISCONNECT which in turns throws SessionEvent.SYNCHRONIZATION_CHANGE as well as sets the isSynchronized property of a CollectionNode to false, i.e. CollectionNode is no longer synchronized.

             

            However, if your connection comes back within a particular timeframe, it tries to Reconnect and resync to the server and is able to do so.

            And if it can't then it just throws exception. Your error shows in this case, it tried to reconnect few times but failed in the timeframe so permanently failing.

            Do you get this error always or you are able to reconnect fine at other times?

             

            Regarding error in your previous email regarding near ID , I don’t get it locally but will investigate why it happens on reconnect. Looks like a flash player version conflict between 9 and 10.

             

            Thanks

            Hironmay Basu

            • 3. Re: Connection lost
              jesperkc Community Member

              It does reconnect fine.

              But I would like to catch that exception - just because I dislike exceptions and errors

               

              Thanks

              • 4. Re: Connection lost
                Hironmay Community Member

                Sure. Can you write a small app with the player version and the swc you are using that throws this error on reconnect? I will then take a look.

                 

                Thanks

                Hironmay Basu