webrtc / samples

WebRTC Web demos and samples
https://webrtc.github.io/samples
BSD 3-Clause "New" or "Revised" License
13.91k stars 5.7k forks source link

Uncaught error: Screen sharing extension causes javascript error #987

Closed vkkkumar closed 6 years ago

vkkkumar commented 6 years ago

Browsers and versions affected 64.0.3282.39 / Macbook, Macbook Air, Lenovo win 7, Asus win 10

Steps to reproduce

  1. Browse to https://webrtc.github.io/test-pages/src/peer2peer/
  2. Click screen capture and if you get an error, follow the instructions and install the extension or download the extension from drive folder : https://drive.google.com/drive/folders/0B84heIonLi5IMkxGQ1AxQTFvYW8?usp=sharing
  3. Open the javascript console (alt+cmd+j or ctr+shift+j) and watch for any errors
  4. Follow the instructions on the page
  5. Make sure to select a couple of different types of windows, e.g. 3rd party apps like skype or wordpad as well as OS windows like finder or Windows Explorer.
  6. Select "Entire Screen" in the window picker dialog and click "Share"
  7. Click Screen capture again and Click any other windows than chrome and then click share button.
  8. Repeat Step 5 or 6.

Expected results Screen share works as expected and show the right window under Local preview. (this is working now) There should not be any Javascript error as shown below.

Actual results Shows an Uncaught error: [Object MediaStream] MediaStreamTRack.onmute event has fired, no frames to the track.

**Logs are followed from now ***** main.js:1187 Requesting doGetUserMedia: constraints: {"audio":false,"video":{"mandatory":{"chromeMediaSource":"desktop","chromeMediaSourceId":"Qh/x4D4EDdfUzBBk3J4bxg==","maxWidth":1440,"maxHeight":900}}} main.js:1187 getUserMedia success main.js:1187 Requesting doGetUserMedia: constraints: {"audio":false,"video":{"mandatory":{"chromeMediaSource":"desktop","chromeMediaSourceId":"3OKwRPY3nkrKet8fBoDjZQ==","maxWidth":1440,"maxHeight":900}}} main.js:1187 getUserMedia success main.js:1185 Uncaught Error: [object MediaStream] MediaStreamTrack.onmute event has fired, no frames to the track. at printHandler (main.js:1185) at error (main.js:1172) at MediaStreamTrack.stream.getVideoTracks.onmute (main.js:916) printHandler @ main.js:1185 error @ main.js:1172 stream.getVideoTracks.onmute @ main.js:916 main.js:1187 Requesting doGetUserMedia: constraints: {"audio":false,"video":{"mandatory":{"chromeMediaSource":"desktop","chromeMediaSourceId":"kqK934nK90CorYvRCDv7SQ==","maxWidth":1440,"maxHeight":900}}} main.js:1187 getUserMedia success main.js:1185 # Uncaught Error: [object MediaStream] MediaStreamTrack.onmute event has fired, no frames to the track. at printHandler (main.js:1185) at error (main.js:1172) at MediaStreamTrack.stream.getVideoTracks.onmute (main.js:916) printHandler @ main.js:1185 error @ main.js:1172 stream.getVideoTracks.onmute @ main.js:916 main.js:1187 Requesting doGetUserMedia: constraints: {"audio":false,"video":{"mandatory":{"chromeMediaSource":"desktop","chromeMediaSourceId":"xA6QYUzwEsuqNY/kL831Ew==","maxWidth":1440,"maxHeight":900}}} main.js:1187 getUserMedia success main.js:1185 # Uncaught Error: [object MediaStream] MediaStreamTrack.onmute event has fired, no frames to the track. at printHandler (main.js:1185) at error (main.js:1172) at MediaStreamTrack.stream.getVideoTracks.onmute (main.js:916) printHandler @ main.js:1185 error @ main.js:1172 stream.getVideoTracks.onmute @ main.js:916

vkkkumar commented 6 years ago

This happens for all the following devices Windows 10, windows 7, Macbook 12 inches and Macbook Air.

100% reproducible.

vkkkumar commented 6 years ago

Same error is thrown when we stop sharing the screen. This is observed in chrome devices like PIT, Minnie, Falco and Yuna.

This might be applicable in other chrome devices too.

M64 stable Qual Testing.

KaptenJansson commented 6 years ago

The event is meant to fire, we should however only report it as an error when it's meaningful. Will fix later.

ErikHellman commented 6 years ago

Please see the new sample using getDisplayMedia() for how to do screen sharing. https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia/