maltejur / discord-screenaudio

A custom discord client that supports streaming with audio on Linux.
1.09k stars 35 forks source link

Replicable [object DOMException] after external user stops screen sharing #215

Open Stay1444 opened 7 months ago

Stay1444 commented 7 months ago

discord-screenaudio encounters a DOMException when this specific steps are followed:

  1. Start discord-screenaudio
  2. Screen share
  3. Stop screen sharing
  4. Windows user starts screen sharing
  5. You open and watch their screen share
  6. They stop screen sharing

Now you get the Discord has crashed! Screen but you can still hear and talk, it's just the interface that has died.

This are the relevant logs, i can't seem to open the electron inspector to see the actual DOM exception:

[discord] [UnifiedConnection(stream)] peerConnectionState => connected
[discord] [UnifiedConnection(stream)] Connection state change: DTLS_CONNECTING => CONNECTED
[discord] [RTCConnection(X, stream)] RTC media connection state change: DTLS_CONNECTING => CONNECTED
[discord] [RTCConnection(X, stream)] RTC connection state: DTLS_CONNECTING => RTC_CONNECTED
[discord] [UnifiedConnection(default)] Creating user: X with audio SSRC: 10114 and video SSRCs: 0
[discord] [VideoStream] spinner visible for 336 ms
[discord]       [remote_stream, count for stream: 1]
[discord] [UnifiedConnection(default)] Creating user: X with audio SSRC: 9421 and video SSRCs: 0
[discord] [StreamTile] Stream Tile State - activeStream: true | selected: false | Video: true | MediaEngine: true
[discord] [StreamTile] Stream Tile State - activeStream: true | selected: true | Video: true | MediaEngine: true
[discord] [UnifiedConnection(stream)] Creating user: X with audio SSRC: 11352 and video SSRCs: 11353
[discord] [object DOMException] <- discord crashes here
[discord] [UnifiedConnection(stream)] Creating user: X with audio SSRC: 11352 and video SSRCs: 11353
[discord] [UnifiedConnection(stream)] Creating user: X with audio SSRC: 11352 and video SSRCs: 0
[discord] [UnifiedConnection(stream)] Renegotiating: User joined
[discord] [UnifiedConnection(stream)] Renegotiating: User left
[userscript] Cannot locate Mute/Deafen/Settings button container

Relevant system information: Distribution: Arch Linux Kernel: 6.6.4-zen1-1-zen Package: aur/discord-screenaudio 1.9.2-1 (+14 1.83) Discord Version: 251818 (f71d50a) discord-screenaudio 1.9.2 KDE Wayland on AMD

Frask99 commented 7 months ago

Verified. This happens to me aswell

maltejur commented 7 months ago

Hm, I can not reproduce this, although I also didn't try a windows machine, but just the official discord client on Linux. Can you figure out the exact exception through remote debugging? For that, start discord-screenaudio --remote-debugging and open http://127.0.0.1:9222 in a browser of your choice.

Stay1444 commented 7 months ago

It's weird. For some reason only happens when a Windows user stops screen sharing. I think this is the error that causes the crash image And then this appears image

The errors are not that useful (?) i think because the sources are minified and what not. Let me know if there's anything else I can do.