Expand my Community achievements bar.

problem with knocking queue

Avatar

Level 4

i've run into a null pointer when trying to use the knocking queue.

steps.

1. log in a guest to a room that requires knocking .  awaits host

2. host logs in, starts publishing video stream, then sees the waiting guest, calls roomManager.knockingQueue.acceptUser()

3. in guests app, a null pointer occurs :

at com.adobe.rtc.sharedManagers::StreamManager/onItemReceive()[../src/com/adobe/rtc/sharedManagers/StreamManager.as:1789]

1789: if ( !userD.isPeer ) {

1790: streamEvent.name = "Firewall issues" ;

1791: _isP2P = false ;

}

userD is null.

it looks like the guest's app is receiving the stream information from the host in StreamManager.onItemReceive() before the UserManager is populated with UserDescriptors.  i confirmed this by inspecting UserManager and its userDescriptor collection is empty.  so the call to _userManager.getStreamDescriptor() is returning null.

i must be doing something in a wrong order here.  can you advise?

thanks

adam

17 Replies

Avatar

Employee

Hi Adam,

We did encounter a few issues around knocking queue and p2p

streamManager. Before reproducing this issue, I wanted to confirm a few

things.

1) Are you using the latest lccs SDK ?

2) Is the RTE consistent. ?

3) Flash player version of your app. ?

Thanks

Arun

Avatar

Level 4

thanks for the quick reply arun

1. can you point me to the latest lccs SDK?

2. what do you mean by RTE consistent?

3. flash player version 10.3.181.5

Avatar

Employee

You can get the latest lccs SDK , by opening the SDK Naviagator app (It would automatically update it for you).

Or you can download it from the developer portal too.

About the RTE being consistent, I meant to ask: is the exception/error consistent. Do you see it everytime, or just once in a while.

Thanks

Arun

Avatar

Level 4

i need the latest LCCS 10.3 SWC , which isn't distributed in the SDK, is it?  where can i find a spot for the latest 10.3 SWC release?  i'm already using one, but want to be sure i've got it up to date.

Avatar

Level 4

the 10.3 SWC i'm using is from http://forums.adobe.com/servlet/JiveServlet/download/3718199-63581/lccs10_3Beta_withAEC_1_5.zip .  i haven't seen a later version than that with AEC / 10.3 .  is that the sdk i should be using?

Avatar

Employee

Ah that’s the latest SDK. So is the error consistent ?.

Also would it be possible to share your code.

Thanks

Arun

Avatar

Level 4

the error does not seem to be completely consistent, occasionally it does not occur, but usually it does.

i can share my code, but, it's a huge project with its part split into various models, views, and controllers so it would be hard to decipher.  i'll have to take some time to take out snippets and arrange it all in a readable, succinct fashion.

in the mean time, i've encountered another issue that i'm totally stumped on, and hope you can resolve it for me.

it seems that

roomManager.knockingQueue.addEventListener(UserQueueEvent.ITEM_UPDATE, handleKnockingQueueUpdate);

will only fire events to the handler when the User's Role = 100 (i.e. the Owner). 

i've tried setting roomManager.knockingQueue.roleForManaging = UserRoles.PUBLISHER , but then Users with the PUBLISHER role don't get an event fired.

can only an OWNER get the ITEM_UDPATE event fired from knockingQueue?

Avatar

Employee

Thanks for the update. I would check both the issues and get back to you.

Thanks

Arun

Avatar

Level 4

thanks arun.

it may be worth noting that in the case where i'm logging in to the room as a Publisher (userRole = 50) , i am first doing external authentication on my own server, getting a token from LCCS, and then in the app i'm using that token to login to the LCCS room.

when i'm logging in as an Owner (userRole=100) i'm just logging directly into the room using my adobe account, with no external auth.

Avatar

Level 4

upon further debugging and inspecting variables at runtime, it looks like RoomManager.knockingQueue is empty when a UserRole=50 is the highest ranking user in the room, and a guest is in the Lobby. 

this leads me to believe that the Node(s) for knockingQueue items are not being created because the user is not an Owner?  hence nothing gets put in the queue, hence the ITEM_UPDATE event never gets fired.

when i log in with an Owner, RoomManager.knockingQueue correctly has the one pending user awaiting.

it's necessary for me to allow a user who is less than an owner to consume knockingQueue events, so i really need to get this sorted out.

thanks for the quick responses thus far

adam

Avatar

Employee

Hi Adam,

I don¹t have much experience with External Authentication. But here is one

thing you could do, Write a small client (flex) app, that you run only

once as the owner, and change the knocking queue settings. Knocking queue

enforces that pending lists could be managed only by users with role 100

(owner or host). You could modify that using the api

ConnectSession.RoomManager.knockingQueue.roleForManaging and set it to 50.

If you don¹t like the above idea, we could manually configure the node's

publisher settings using server to server api's.

Thanks

Arun

Avatar

Level 4

thanks arun

i already have server to server scripts that do room creation, so i could do the node modification there, correct?  however, in the Room Console i don't see any rooms as having a knockingqueue collection node, nor do i see a node piggybacked on other nodes. 

what is the collectionnode name, and the node name, that i need to configure with the server to server api?

Avatar

Level 4

okay, the collection name is RoomManager , the node name is knockingQueue_queue.  in the server to server api, i don't see a setNodeConfiguration() method.  i need to modify pre-existing rooms' nodes.  how can i do that?  does createNode() just update the node configuration if it already exists?

Avatar

Employee

You are right about the collection node name & the node under it. Hopefully remove-node & create-node should do the trick. Again I am making guesses here (Sorry abt that)

Node config details (copied from LCCS SDK src)

_nodeConfigurationForQueue = new NodeConfiguration();

_nodeConfigurationForQueue.accessModel = UserRoles.PUBLISHER;

_nodeConfigurationForQueue.publishModel = UserRoles.VIEWER;

_nodeConfigurationForQueue.modifyAnyItem = false;

_nodeConfigurationForQueue.userDependentItems = false;

_nodeConfigurationForQueue.sessionDependentItems = false;

_nodeConfigurationForQueue.itemStorageScheme = NodeConfiguration.STORAGE_SCHEME_QUEUE;

Since you are ready to use Dev Console, I am assuming running a small app would be no issue for you. So you can build app that would change the knockingQueue configurations, as dev console doesnt display RoomManager & UserManager nodes. I would recommend the app approach if the remove-node & create-node approach doesnt work.

Thanks

Arun

Avatar

Level 4

i've tried removeNode/createNode without success.  strangely, after i call createNode(), the node knockingQueue_queue node no longer exists in the RoomManager collection nodeNames.  i've used the debugger to confirm this.  all the other nodes are there.  when i call createNode() , i get an OK response.  i've tried calling removeNode() then createNode() , and also tried just called createNode().

i'm completely stuck now.  can you tell me why the knockingQueue_queue node has disappeared?

here's my php code:

$nodeConfig = array("accessModel"=>50,

"publishModel"=>10,

"persistItems"=>false,

"userDependentItems"=>false,

"sessionDependentItems"=>false,

"modifyAnyItem"=>false,

"itemStorageScheme"=>1);

echo $am->removeNode("encoding_tests","RoomManager","knockingQueue_queue");

echo $am->createNode("encoding_tests","RoomManager","knockingQueue_queue",$nodeConfig);

with the responses :

<result>

<status code="ok"/>

</result>

<result>

<status code="ok"/>

</result>

Avatar

Employee

I am not sure why it disappeared. But running a normal app with knocking queue enabled will restore the knockingQueue_queue node. Since the first approach didnt work, I would recommend the app approach of enabling publishers. The api to do that would be  ConnectSession.RoomManager.knockingQueue.roleForManaging (I know its a bit more painful)

I am not sure if we can provide nodeconfigurations, when creating nodes using server to server scripts. I will confirm that and update this post.

Thanks
Arun

Avatar

Level 4

so i would have to build a flex app to log into the room as OWNER, then set ConnectSession.RoomManager.knockingQueue.roleForManaging=50? i assume only the OWNER can set roleForManaging to something less than OWNER?

that's not practical at all. i'm building an automated service with many rooms that are programatically generated. having to run and launch a flex app to configure the room just doesn't make sense.