Bug 482157 - Crashes when trying to choose as a source
Summary: Crashes when trying to choose as a source
Status: RESOLVED NOT A BUG
Alias: None
Product: XWaylandVideoBridge
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: NixOS Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-01 14:08 UTC by oxdr92f0
Modified: 2024-06-23 17:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description oxdr92f0 2024-03-01 14:08:01 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
I am using hyprland and i installed xwaylandvideobridge according to the hyprland wiki.
But when i try to use it, the bridge either does not work (in zoom) or crashes (in discord).

STEPS TO REPRODUCE
1. Install xwaylandvideobridge from nixpkgs-unstable
2. launch it
3. try to choose it as a source for screen share on discord

OBSERVED RESULT
crashes with this error:
```
org.kde.xwaylandvideobridge: Couldn't initialize the remote control session
```

EXPECTED RESULT
it works

SOFTWARE/OS VERSIONS
Windows: None
macOS: None
Linux/KDE Plasma: Linux 6.1.79, NixOS, Hyprland
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
also it gives some warnings after i start it
```
(xwaylandvideobridge:4153): Gtk-WARNING **: 17:06:24.271: Unable to locate theme engine in module_path: "adwaita",

(xwaylandvideobridge:4153): Gtk-WARNING **: 17:06:24.278: Unable to locate theme engine in module_path: "adwaita",
```
Comment 1 David Edmundson 2024-03-04 09:54:52 UTC
>org.kde.xwaylandvideobridge: Couldn't initialize the remote control session

That's not a crash exactly. 
This happens if the portal fails in the request to "CreateSession". Can you check the portal logs? 

Can you confirm if any other screen recording (such as OBS) works using the portal?
Comment 2 oxdr92f0 2024-03-07 22:37:44 UTC
Thanks, my portal did not work. I fixed it and xwaylandvideobridge started working too.
Comment 3 Raphaël Weis 2024-06-21 18:36:22 UTC
(In reply to oxdr92f0 from comment #2)
> Thanks, my portal did not work. I fixed it and xwaylandvideobridge started
> working too.

I'm having the exact same issue (Also on hyprland and NixOS) but can't find the logs you are referring to. Are you talking about the xdg-desktop-portal-hyprland logs ? I tried getting those with
```
journalctl -u xdg-desktop-portal-hyprland
```
but it returned no entries. How did you manage to solve this ? Thanks in advance.
Comment 4 oxdr92f0 2024-06-23 15:40:45 UTC
(In reply to Raphaël Weis from comment #3)
> (In reply to oxdr92f0 from comment #2)
> > Thanks, my portal did not work. I fixed it and xwaylandvideobridge started
> > working too.
> 
> I'm having the exact same issue (Also on hyprland and NixOS) but can't find
> the logs you are referring to. Are you talking about the
> xdg-desktop-portal-hyprland logs ? I tried getting those with
> ```
> journalctl -u xdg-desktop-portal-hyprland
> ```
> but it returned no entries. How did you manage to solve this ? Thanks in
> advance.

I've added this to my home manager config:
```
    xdg.portal = {
      enable = true;
      extraPortals = with pkgs; [
        xdg-desktop-portal-hyprland
      ];
      configPackages = with pkgs; [
        xdg-desktop-portal-hyprland
      ];
    };
```
and it started working. Hope it helps.
Comment 5 Raphaël Weis 2024-06-23 17:21:12 UTC
(In reply to oxdr92f0 from comment #4)
> (In reply to Raphaël Weis from comment #3)
> > (In reply to oxdr92f0 from comment #2)
> > > Thanks, my portal did not work. I fixed it and xwaylandvideobridge started
> > > working too.
> > 
> > I'm having the exact same issue (Also on hyprland and NixOS) but can't find
> > the logs you are referring to. Are you talking about the
> > xdg-desktop-portal-hyprland logs ? I tried getting those with
> > ```
> > journalctl -u xdg-desktop-portal-hyprland
> > ```
> > but it returned no entries. How did you manage to solve this ? Thanks in
> > advance.
> 
> I've added this to my home manager config:
> ```
>     xdg.portal = {
>       enable = true;
>       extraPortals = with pkgs; [
>         xdg-desktop-portal-hyprland
>       ];
>       configPackages = with pkgs; [
>         xdg-desktop-portal-hyprland
>       ];
>     };
> ```
> and it started working. Hope it helps.

Thanks, this snipped solved it. Simply adding the xdg-desktop-portal-hyprland to home.packages was not enough, I had to configure the xdg module. 
Many thanks :)