jitsi / lib-jitsi-meet

A low-level JS video API that allows adding a completely custom video experience to web apps.
Apache License 2.0
1.34k stars 1.11k forks source link

Screen sharing blank while using E2EE ("Could not handle E2EE for LocalTrack") #2547

Open lyoungsdigi opened 3 months ago

lyoungsdigi commented 3 months ago

Description


Screen sharing with E2EE enabled shows a black screen in certain circumstances, including sharing before another user joins or toggling E2EE mid-session. Reproducible on https://meet.jit.si.

Current behavior


When screen sharing with E2EE enabled, other users in the session see a black screen.

At the time of the issue, the sending client gets the following warning:

KeyHandler.js:159 2024-07-23T14:03:27.620Z [modules/e2ee/KeyHandler.js] <fo._setupSenderE2EEForTrack>:  Could not handle E2EE for LocalTrack[2,video]: sender not found in TPC[id=1,type=JVB]
overrideMethod @ console.js:288
r @ Logger.js:155
_setupSenderE2EEForTrack @ KeyHandler.js:159
_onMediaSessionStarted @ KeyHandler.js:118
o.emit @ events.js:158
(anonymous) @ JitsiConference.js:2261
(anonymous) @ JingleSessionPC.js:978
(anonymous) @ strophe.umd.js:3396
run @ strophe.umd.js:2507
(anonymous) @ strophe.umd.js:3843
(anonymous) @ strophe.umd.js:3840
forEachChild @ strophe.umd.js:1502
_dataRecv @ strophe.umd.js:3838
_onMessage @ strophe.umd.js:6187
socket.onmessage @ strophe.umd.js:5920

Expected Behavior


Visible screen share or an error message.

Possible Solution


When this happens, under _setupSenderE2EEForTrack->pc.findSenderForTrack you can see it try to compare against an RTCRtpSender with null values for 'rtcpTransport' and 'track'. Presumably this is supposed to be the track for the screen share?

User can work around by toggling the screen off and back on.

Steps to reproduce


Repro by turning on E2EE prior to others joining:

  1. Open a conference on https://meet.jit.si and turn the camera on from the lobby screen before joining.
  2. Enable E2EE from the security options.
  3. Start sharing your screen.
  4. Join a second client to the call. Note the console warning and black screen for the "(name)'s Screen" tile on the receiving side.

Repro by turning on E2EE mid-session:

  1. Open a conference on https://meet.jit.si and turn the camera on from the lobby screen before joining.
  2. Start sharing your screen.
  3. Join a second client to the call. Screen sharing should work as expected.
  4. Turn on E2EE. Note the console warning and blank screen on the receiving client.

Environment details


jallamsetty1 commented 3 months ago

@lyoungsdigi Thanks for the report, we are looking into it.

iospro commented 2 months ago

We also bump into black screen when share screen user comes after others. It's not permanent situation, but sometimes we need to re-enter the room to get share picture

jallamsetty1 commented 1 month ago

@iospro Can you pls share some more details? Are you seeing this on meet.jit.si? What version of Chrome are you seeing this on? Have you tried with the latest?