Connection.connectionProperties does not have data property

Hi,
we have just upgraded our OpenVidu Pro server to version 2.16.0 and our custom Node-based server to openvidu-node-client 2.16.2.
Now we think we stumpled upon a problem:
We can not get server-side data from a Connection object in Session.activeConnections array anymore. In previous versions you could just use Connection.serverData.
We have seen the updated documentation and according to it, we should now be able to get this data from Connection.connectionProperties.data. But it still is not working and a simple JSON.stringify() output of Connection.connectionProperties shows, that there is no data property at all or it is undefined. All other properties are there just as documented.
We definitely attach server-side data by providing a value for TokenOptions.data when calling Session.generateToken().

Is this a bug, an error in your updated documentation or are we missing something here?

Thanks for your help
Sven

+++ UPDATE +++
Just some more informations on this issue:
-Even if we use the new Session.createConnection() and provide a ConnectionProperties object with data property instead of the now deprecated Session.generateToken(tokenOptions), we are still not able to get the server-side data of the connection.
-We use Session.fetch() function to make sure the data is up to date before trying to access the data property of the Connection.connectionProperties object. We do it in the onResolve handler of the Promise object returned by Session.fetch().

+++ UPDATE 2 +++
The connectionProperties of the Connection object returned on resolve by Session.createConnection() does also not include any data property.

+++ UPDATE 3 +++
Server data in OpenVidu inspector web interface also shows No data.

Hi,

This is a known bug that is currently fixed in the master branch. There is no official release hotfix including it, but you can compile and install openvidu-node-client from scratch very easily following this steps:

git clone https://github.com/OpenVidu/openvidu.git
cd openvidu/openvidu-node-client
npm install
npm link

After this you can install this version in your Node app simply running npm link openvidu-node-client in the package.json application’s path.

Please, test the fix and let us know if it solves your problem.
Best regards.

1 Like

Hi,

i followed your steps but now i get the following error when i try to start debugging:

Cannot find module ‘c:\path\to\my\node\app\node_modules\openvidu-node-client\lib\index.js’

Ok, i have installed TypeScript and build it with tsc -p now i can use the self builded openvidu-node-client and the problem seems to be fixed.

I hope there wont be any other issues with that build…?

This build is pretty much the same as 2.16.0 with a couple of bugs fixed.

1 Like

@pabloFuente Thanks for the information and your fast reply. Much appreciated!