Vencord / Vesktop

Vesktop is a custom Discord App aiming to give you better performance and improve linux support
GNU General Public License v3.0
3.49k stars 168 forks source link

[Bug] Dismissing screenshare request causes crash #753

Open Sqaaakoi opened 1 month ago

Sqaaakoi commented 1 month ago

Discord Account

sqaaakoi

Operating System

Debian trixie

Linux Only ~ Desktop Environment

KDE 5.27.10 Wayland

Package Type

deb

What happens when the bug or crash occurs?

Window will freeze and native will throw an UnhandledPromiseRejectionWarning then segfaults

What is the expected behaviour?

Not crash and do not attempt to start screensharing

How do you recreate this bug or crash?

Join a voice channel Click the screenshare button Click cancel/dismiss the system screenshare picker Crash

Debug Logs

Checking for beta autoupdate feature for deb/rpm distributions
Found package-type: deb
Checking for update
Gtk-Message: 06:18:59.855: Failed to load module "appmenu-gtk-module"
[arRPC > ipc] listening at /run/user/1000/discord-ipc-0
[arRPC > websocket] listening on 6463
[arRPC > process] started
[Vencord] Installed React Developer Tools
(node:815218) ExtensionLoadWarning: Warnings loading extension at /home/sqaaakoi/.config/vesktop/ExtensionCache/fmkadmapgofadopljbjfkapdkoienihi:
  Manifest version 2 is deprecated, and support will be removed in 2024. See https://developer.chrome.com/docs/extensions/develop/migrate/mv2-deprecation-timeline for details.

(Use `vesktop --trace-warnings ...` to show where the warning was created)
Update for version 1.5.3 is not available (latest version: 1.5.3, downgrade is disallowed).
checkForUpdatesAndNotify called, downloadPromise is null
[815218:0713/061913.582636:ERROR:screencast_portal.cc(367)] Failed to start the screen cast session.
[815218:0713/061913.582650:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 2
Error during screenshare picker Failed to get sources.
(node:815218) UnhandledPromiseRejectionWarning: TypeError: Video was requested, but no video stream was provided
    at AsyncFunction.<anonymous> (VCDMain:87:5244)
(node:815218) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
Segmentation fault (core dumped)

Request Agreement

EddoWagt commented 1 month ago

Can confirm, same happens for me on fedora, wayland using flatpak

Curve commented 1 month ago

Notably does not happen to me on KDE 6.1.2 (Arch Linux), promise rejection also occurs but no crash

FruitBoi commented 1 month ago

Happening for me as well on wayland KDE 6.1.2 (gentoo) in flatpak

Vendicated commented 1 month ago

can reproduce but probably not fixable by us. we changed nothing about the code, we just upgraded chrome / electron, so it's likely a regression in those

Daxanius commented 1 month ago

I'm getting the same issue but in my case it's not when dismissing the request, it's when clicking the screenshare button. It just crashes and leaves the same error message in the console.

I'm on EndeavourOS with Sway, installed it through pacman.

Daxanius commented 1 month ago

It looks like screenshare does not work for me even in older versions. It pops the error UnhandledPromiseRejectionWarning: TypeError: Video was requested, but no video stream was provided but this time without crashing. So it seems in the latest version the error gets popped, the screenshare request gets dismissed automatically, which in turn causes the crash.

kubni commented 1 month ago

Same behaviour. I had that UnhandledPromiseRejectionWarning for a while, and I can't screen share on Vesktop at all. Recently, it started segfaulting after showing that same message.

AvirukBasak commented 1 month ago

Can confirm on Ubuntu 24.04, Wayland, navigator.userAgent gives Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36