Session.disconnect() error

Hi

I get an error when I try to session.disconnect().

An error occurs with version 2.18 or later.

  Stream.prototype.disposeWebRtcPeer = function () {
    var webrtcId = this.webRtcPeer.id;

    if (!!this.webRtcPeer) {
      this.webRtcPeer.dispose();
      this.stopWebRtcStats();
    }

    logger.info((!!this.outboundStreamOpts ? 'Outbound ' : 'Inbound ') + "RTCPeerConnection with id [" + webrtcId + "] from 'Stream' with id [" + this.streamId + '] is now closed');
  };

Hi,

This is fixed already on the development branch. We have protected access to the affected id property so this error is not thrown. Can you detail when exactly you get this error?

Just after stop screen sharing, error occured. Now It’s happening on your openvidu call demo site too.

https://drive.google.com/file/d/11vJMyYoQXvwJtO6CO7i27IvrMPLQ7U7I/view?usp=sharing

Okey, I’ve been investigaing this error, and it seems that for users with more than one connection established (usually to publish multiple streams at the same time, for example when streaming webcam and screenshare), one of the connections could throw an exception when the other was closed. Which happened in OpenVidu Call.
We have released in NPM a patched version (2.18.2) of openvidu-browser SDK that fixes the issue.
The minified js file is available here: https://s3.eu-west-1.amazonaws.com/aws.openvidu.io/openvidu-browser-2.18.2.min.js

Best regards

1 Like