Bug 482157

Summary: Crashes when trying to choose as a source
Product: [Applications] XWaylandVideoBridge Reporter: oxdr92f0
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: crash CC: aleixpol, kde, raphael.weis
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: NixOS   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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 :)