Closed sampierson closed 1 year ago
Thanks for reporting this @sampierson! Indeed janode keeps track of the existing sessions owned by a connection and heirs that abstraction from janus where sessions always live inside connections. I guess for admin connections this does not make much sense, since you can query the status of the server without actually owning the sessions. A possibile solution is to filter message handling for admin connections, I'll try to take a look in the next days.
Meanwhile you might want to check this new tool for janus that could accomplish the same task without janode.
Thanks for responding @atoppi.
I should have mentioned I have a workaround - I just send a list_handles
directly to the Janus HTTP admin API.
@sampierson this should be fixed now, thanks again for reporting!
I'm building a tool to interrogate our Janus servers and build a graph of who is connected to whom. Part of this process is to list all sessions then list their handles.
I can do this with direct http calls, but I cannot do it with janode. If I try to list handles for a session I did not create,
Connection._handleMessage
complains that: "session xxxxxxxxxxxx not found for incoming message success". Here: https://github.com/meetecho/janode/blob/master/src/connection.js#L194It seems that
Connection
keeps a cache of sessions so the right session can handle responses. But this is an admin function that takes a session parameter, and does not require one to establish a session first.Here is some code to demonstrate the issue:
I'm using a Janus with admin enabled on the websocket, and a videoroom call underway.
Here is the output:
I'm using janode version 1.6.4