amazon-chime-sdk-js icon indicating copy to clipboard operation
amazon-chime-sdk-js copied to clipboard

Cannot read properties of null (reading 'getVideoTracks')

Open Fnopster opened this issue 2 years ago • 5 comments

What happened and what did you expect to happen?

We've received many Cannot read properties of null (reading 'getVideoTracks') errors in Sentry.

It was thrown by this code snippet:

audioVideoDidStart() { 
 this.mediaStreamBroker.mediaStream.getVideoTracks().length>0&&this.contentAudioVideo.videoTileController.startLocalV...

This appears to be from the DefaultContentShareController.

Looking at the code, it appears the ContentShareMediaStreamBroker can set the media stream to null when it cleans up.

Should the DefaultContentShareController check if mediaStream exists before invoking getVideoTracks?

Have you reviewed our existing documentation?

Reproduction steps

No repo steps at this time. Have only seen this error in Sentry.

Amazon Chime SDK for JavaScript version

3.10.0

What browsers are you seeing the problem on?

Chrome

Browser version

Chrome 111.0

Meeting and Attendee ID Information.

No response

Browser console logs

N/A

Fnopster avatar May 09 '23 22:05 Fnopster