1. Unsubscribe, Close CollectionNodes.
2. Logout user with session.logout()
3. Login user.
4. Create CollectionNode. AddEventListener on Sync Events.
5. No Event.
Is it bug? Ot maybe I should now to totally logout client.
this.rtcService.releaseSubscribers();
this.rtcService.close();
this.sessionService.close();
RTCService - releaseSubscribers
if (_webcamSubscriber != null) {
_webcamSubscriber.removeEventListener(StreamEvent.STREAM_DELETE, onCompanionStreamDelete);
_webcamSubscriber.removeEventListener(StreamEvent.STREAM_PAUSE, onCompanionStreamPause);
_webcamSubscriber.close();
_webcamSubscriber = null;
}
RTCService - close
_userManager = null;
_userDescriptor = null;
_collectionVacantUsers.removeEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, onSyncCollectionNode);
_collectionVacantUsers.unsubscribe();
_collectionVacantUsers.close();
_collectionVacantUsers = null;
_collectionChat.removeEventListener(CollectionNodeEvent.ITEM_RECEIVE, onItemReceiveChatCollectionNode);
_collectionChat.unsubscribe();
_collectionChat.close();
_collectionChat = null;
_webcamPublisher.removeEventListener(Event.CHANGE, onWebcamChange);
_webcamPublisher.close();
_webcamPublisher = null;
_connectionTimeout.removeEventListener(TimerEvent.TIMER, onConnectionTimer);
_connectionTimeout.removeEventListener(TimerEvent.TIMER_COMPLETE, onConnectionTimerComplete);
_connectionTimeout.reset();
_connectionTimeout = null;
SessionService
public function close() : void {
this.registerSession(null);
}
public function registerSession($session : ConnectSession) : void {
if (_session != null) {
_session.removeEventListener(SessionEvent.SYNCHRONIZATION_CHANGE, onLogin);
_session.logout();
_session.close();
}
_session = $session;
if (_session != null) {
_session.addEventListener(SessionEvent.SYNCHRONIZATION_CHANGE, onLogin);
_session.login();
}
}
Event doesn't fire
CollectionNodeEvent.SYNCHRONIZATION_CHANGE, onSyncCollectionNode
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Nicolas,
I am guessing its the same issue again. Can you assign a session to _webCamSubscriber too.
So what is happening in your case is that, when you dont assign a session to your collectionNodes & other LCCS components, they use the first default connectSession called the primarySession.
So when you login and logout the first time, you are logging out of your primaryConnectSession. On subsequent login's your components are inactive as your primarySession is inactive.
So the code below might fix your issue, if not can you post your entire src as it helps us provide you faster response.
_webCamSubscriber.connectSession = _session;
Thanks
Arun
Views
Replies
Total Likes
Hi there,
Sorry, that was really confusing. I don't see everything from 1-5 in your
code, but I see a ton of other stuff in your code. Could you narrow this
down please?
thanks
nigel
Views
Replies
Total Likes
After relogin, CollectionNode doesn't fire Sync event.
_collectionVacantUsers = new CollectionNode();
_collectionVacantUsers.sharedID = "VacantUsers";
_collectionVacantUsers.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, onSyncCollectionNode);
_collectionVacantUsers.subscribe();
Event listener:
private function onSyncCollectionNode(e : CollectionNodeEvent) : void {
if (_collectionVacantUsers.isSynchronized) {
CONFIG::DEBUG {
MonsterDebugger.trace(this, "VacantUsers synced and ready to use", "", "", DebugColors.SERVICE);
}
...}
}
Views
Replies
Total Likes
From your code, you are never logging out.
public function registerSession($session : ConnectSession) : void {
if (_session != null) {
_session.removeEventListener(SessionEvent.SYNCHRONIZATION_CHANGE, onLogin);
_session.logout();
_session.close();
}
_session = $session;
if (_session != null) {
_session.addEventListener(SessionEvent.SYNCHRONIZATION_CHANGE, onLogin);
_session.login();
}
}
From a cursory glance, the could should be modifed to
public function registerSession($session : ConnectSession) : void {
if (_session == null) {
_session.removeEventListener(SessionEvent.SYNCHRONIZATION_CHANGE, onLogin);
_session.logout();
_session.close();
}
_session = $session;
if (_session != null) {
_session.addEventListener(SessionEvent.SYNCHRONIZATION_CHANGE, onLogin);
_session.login();
}
}
Views
Replies
Total Likes
Are you sure?
It logouts ok. I see it in logs and Room console.
Views
Replies
Total Likes
this.registerSession(null);
resets _session if it exists already.
Views
Replies
Total Likes
Hi Nicolas,
I am making guesses from the code I am reading.
So assigning a session to your _collectionVacantUsers should fix the issue. I am making this guess, since you are sure that you succesfully logging in and out of your room, and its CollectionNodeEvent.SYNCHRONIZATION_CHANGE that is not being fired.
_collectionVacantUsers.connectSession = _session;
Thanks
Arun
Thanks it works, but i have now another issue.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.adobe.rtc.sharedManagers::StreamManager/get isP2P()
at com.adobe.rtc.collaboration::WebcamSubscriber/createNetStream()
at com.adobe.rtc.collaboration::WebcamSubscriber/playStream()
at com.adobe.rtc.collaboration::WebcamSubscriber/set publisherIDs()
It is error after reconnect.
Views
Replies
Total Likes
Hi Nicolas,
I am guessing its the same issue again. Can you assign a session to _webCamSubscriber too.
So what is happening in your case is that, when you dont assign a session to your collectionNodes & other LCCS components, they use the first default connectSession called the primarySession.
So when you login and logout the first time, you are logging out of your primaryConnectSession. On subsequent login's your components are inactive as your primarySession is inactive.
So the code below might fix your issue, if not can you post your entire src as it helps us provide you faster response.
_webCamSubscriber.connectSession = _session;
Thanks
Arun
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies