Sway + wayland + Brave screensharing not working


I recently moved to Sway, Wayland and I am now training to get Google meetup to screenshare.

It works if I share only tabs but when I move the tab to windows or entire screens I get this error (maybe similar to Firefox RTC screencasting not working)

[24578:24578:0510/163801.168698:ERROR:screen_capture_portal_interface.cc(48)] Failed to request session: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop
[24578:24578:0510/163801.168718:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 3
[24578:24578:0510/163813.586172:ERROR:fallback_task_provider.cc(126)] Every renderer should have at least one task provided by a primary task provider. If a "Renderer" fallback task is shown, it is a bug. If you have repro steps, please file a new bug and tag it as a dependency of crbug.com/739782.

I tried to look for #enable-webrtc-pipewire-capturer flag in Brave but I can’t find it in the list of flags.

I get to the same point with chromium as well.

This is a section of my current configuration:

  xdg.portal = {
    enable = true;
    wlr.enable = true;
    # gtk portal needed to make gtk apps happy
    extraPortals = [ pkgs.xdg-desktop-portal-gtk ];

 programs.sway = {
    enable = true;
    wrapperFeatures.gtk = true; # so that gtk works properly

  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
    # If you want to use JACK applications, uncomment this
    #jack.enable = true;
  hardware.pulseaudio.enable = lib.mkForce false;
  sound.enable = lib.mkForce false;
$ nix-info
system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.18.1, channels(root): "nixos-23.11, nixos-hardware, nixos2211-22.11, nixos2305-23.05, nixpkgs-unstable, unstable", channels(gianarb): "", nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos