Kooha icon indicating copy to clipboard operation
Kooha copied to clipboard

Screencast Portal Request Error - Unable to start recording

Open dineshkp opened this issue 2 years ago • 31 comments

System Info

  • Kooha version 2.0.0
  • Zorin OS 16
  • Gnome
  • X11
  • Flatpak (Hoping it is Fltapak, Kooha was pre-installed in the OS)

Describe the bug Unable to start recording. Facing the following error message: "Portal request failed: Unknown: Unknown"

To Reproduce Steps to reproduce the behavior:

  1. Open Kooha from Applications
  2. Click on 'Record'
  3. See error: "Portal request failed: Unknown: Unknown"

Expected behavior Recording should start

Screenshots image

Additional context

 INFO  kooha::application > Kooha (io.github.seadve.Kooha)
 INFO  kooha::application > Version: 2.0.0 ()
 INFO  kooha::application > Datadir: /app/share/kooha
 DEBUG kooha::backend::recorder > is_show_pointer: true
 DEBUG kooha::backend::recorder > is_selection_mode: false
 INFO  kooha::backend::screencast_portal > ScreenCastProxy created
 ERROR kooha::backend::screencast_portal > Error from screencast call: Portal(ZBus(MethodError(OwnedInterfaceName(InterfaceName(Str("org.freedesktop.DBus.Error.UnknownMethod"))), Some("No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop"), Msg { type: Error, sender: UniqueName(Str(":1.128")), reply-serial: 18, body: Signature: [
	s (115),
] })))

dineshkp avatar Oct 06 '21 10:10 dineshkp

Does it work on wayland?

According to the errors, it seems like your system doesn't have the required interface for screencast

SeaDve avatar Oct 06 '21 10:10 SeaDve

@SeaDve Appreciate the quick response!

I switched to wayland and faced the same issue. Attached screenshot. How can I resolve the missing interface for screencast ?

image

dineshkp avatar Oct 06 '21 10:10 dineshkp

If it may help: It was working fine in the previous version prior to 2.0.0

dineshkp avatar Oct 06 '21 10:10 dineshkp

I am afraid that your distro may not support the new implementation.

You can also test it further with https://mozilla.github.io/webrtc-landing/gum_test.html to tell if only Kooha is affected. In the gum_test website you can test Screen Capture.

While it is not working, you can downgrade using flatpak update --commit=e52aeb30b4d9f97436de184b6703ae83c48468880d95f0b74916cd6fca3e7c2a io.github.seadve.Kooha to 1.2.1

SeaDve avatar Oct 06 '21 10:10 SeaDve

This the result, when on Wayland.

Could there be any other issues ? Please let me know if any other information will help debug this issue. I would love to help.

image

dineshkp avatar Oct 06 '21 12:10 dineshkp

Does kooha work on 2.0.0 wayland?

SeaDve avatar Oct 06 '21 12:10 SeaDve

Does kooha work on 2.0.0 wayland?

The image in this post shows kooha 2.0.0 running on wayland https://github.com/SeaDve/Kooha/issues/129#issuecomment-935937619

dineshkp avatar Oct 06 '21 14:10 dineshkp

I checked (googled) the error in the debug log and came across this related issue

https://github.com/flatpak/xdg-desktop-portal/issues/446

The discussion in the bug report provides better clarity: https://bugs.launchpad.net/ubuntu/+source/xdg-desktop-portal/+bug/1879580

But as per the later report, screencast should work fine on x11, Which I am still facing an issue. Maybe I need to wait for a stable release of xdg-desktop-portal to sort out this.

Does kooha run on x11? Asking since you requested a check on wayland at the start of the discussion.

dineshkp avatar Oct 06 '21 14:10 dineshkp

it should work on both. I think it is still weird though that it works on chrome, but not Kooha, so I think it is an internal issue with Kooha, ill investigate on it, thanks for detailed info!

SeaDve avatar Oct 06 '21 15:10 SeaDve

In the meantime, I will be using version 1.2.1

The downgrade instructions specified in this post works fine.

Thank you @SeaDve

dineshkp avatar Oct 07 '21 02:10 dineshkp

I've gotten the issue too since the 2.0.0 update. I'm also on Zorin OS 16. I also downgraded to v1.2.1 and it works now.

YukKevChuHau avatar Oct 12 '21 02:10 YukKevChuHau

Same problem on Zorin OS 16, downgrade works fine

Use the mask after downgrading, for not to update

sudo flatpak update --commit=e52aeb30b4d9f97436de184b6703ae83c48468880d95f0b74916cd6fca3e7c2a io.github.seadve.Kooha
sudo flatpak mask io.github.seadve.Kooha

And then if you want remove mask sudo flatpak mask --remove io.github.seadve.Kooha

JumperLuko avatar Nov 10 '21 22:11 JumperLuko

When I use the 1.2.1, the part of section reports

kooha                                                           ░▒▓ ✔  7s   01:47:59  ▓▒░
Traceback (most recent call last):
  File "/usr/share/kooha/kooha/window.py", line 60, in on_start_record_button_clicked
    self.video_recorder.set_selection_mode()
  File "/usr/share/kooha/kooha/recorders.py", line 194, in set_selection_mode
    self.coordinates = self.gnome_selectarea.call_sync(
gi.repository.GLib.Error: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: SelectArea is not allowed (9)
Traceback (most recent call last):
  File "/usr/share/kooha/kooha/window.py", line 60, in on_start_record_button_clicked
    self.video_recorder.set_selection_mode()
  File "/usr/share/kooha/kooha/recorders.py", line 194, in set_selection_mode
    self.coordinates = self.gnome_selectarea.call_sync(
gi.repository.GLib.Error: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: SelectArea is not allowed (9)
^C

starsareintherose avatar Nov 26 '21 01:11 starsareintherose

When I use the 1.2.1, the part of section reports

kooha                                                           ░▒▓ ✔  7s   01:47:59  ▓▒░
Traceback (most recent call last):
  File "/usr/share/kooha/kooha/window.py", line 60, in on_start_record_button_clicked
    self.video_recorder.set_selection_mode()
  File "/usr/share/kooha/kooha/recorders.py", line 194, in set_selection_mode
    self.coordinates = self.gnome_selectarea.call_sync(
gi.repository.GLib.Error: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: SelectArea is not allowed (9)
Traceback (most recent call last):
  File "/usr/share/kooha/kooha/window.py", line 60, in on_start_record_button_clicked
    self.video_recorder.set_selection_mode()
  File "/usr/share/kooha/kooha/recorders.py", line 194, in set_selection_mode
    self.coordinates = self.gnome_selectarea.call_sync(
gi.repository.GLib.Error: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: SelectArea is not allowed (9)
^C

I'm afraid that the only fix is to update to 2.0.0

In gnome-shell 41, the SelectArea is now private, so apps cannot access it anymore

SeaDve avatar Nov 26 '21 01:11 SeaDve

THen it occurs same issue with 2.0.1

 ERROR kooha::backend::screencast_portal > Error from screencast call: Portal(ZBus(MethodError(OwnedInterfaceName(InterfaceName(Str("org.freedesktop.DBus.Error.UnknownMethod"))), Some("在路径 org.freedesktop.portal.ScreenCast 的对象上没有“/org/freedesktop/portal/desktop”接口"), Msg { type: Error, sender: UniqueName(Str(":1.93")), reply-serial: 18, body: Signature: [
	s (115),
] })))

Notice https://github.com/SeaDve/Kooha/issues/140

starsareintherose avatar Nov 26 '21 01:11 starsareintherose

If I might jump in here. I too have a problem both with Kooha and OBS so it strikes me it must be something to do with pipewire/wayland though I am at a loss what as I went through the troubleshooting steps, but they all check out.

The error I get on start is similar to above

ERROR kooha::backend::screencast_portal > Error from screencast call: Response(Other)

If we could work out what response it is getting maybe we work out what we are supposed to be expecting. Is there anyway to get this debugging information ? 1.19.0-2+b1 EDIT: Oh FTR I am using Kooha 2.0.1 Flatpak on Debian 11 testing with xWayland 2:21.1.3-1+b1 and libwayland-server 1.19.0-2+b1 on kernel 5.15.5-1

develroo avatar Dec 08 '21 17:12 develroo

Facing the same problem. Want to report that I was able to use v2.0.1 until yesterday. My guess is that some recent update of ZorinOS broke it (for me).

kojid0 avatar Dec 14 '21 08:12 kojid0

Well I am currently also seeing a problem with the flatpak OBS not seeing any pipewire-window-capture-source so I suspect this is all related. I raised an issue with them as well.

develroo avatar Dec 14 '21 13:12 develroo

UPDATE: I have just been chatting to the flatpak OBS guys and they suggested I checked if I had xdg-desktop-portal{,-gnome,-gtk,-kde} installed. It turns out xdg-desktop-portal-gnome was NOT installed by default. So I installed it and restarted Gnome and now Kooah works again!

So please, everyone check to see if your desktop xdg portals are installed, if not install them and restart the destop. With luck it should work.

develroo avatar Dec 17 '21 10:12 develroo

@develroo I've installed xdg-desktop-portal-gnome and started it's systemd service, but my Kooha 2.0.1 still doesn't work (both installation via native package manager and Flatpak) , reporting the same error like yours ('Other Response'). My DE is KDE Plasma 5.23 (X11), all xdg-desktop-portal- things are installed and their systemd services have started. I have no idea if Kooha can only work with GNOME......

WhiredPlanck avatar Jan 05 '22 00:01 WhiredPlanck

@develroo I've installed xdg-desktop-portal-gnome and started it's systemd service, but my Kooha 2.0.1 still doesn't work (both installation via native package manager and Flatpak) , reporting the same error like yours ('Other Response'). My DE is KDE Plasma 5.23 (X11), all xdg-desktop-portal- things are installed and their systemd services have started. I have no idea if Kooha can only work with GNOME......

Did you logout/login again and reboot. It is not a service that is dynamically started and detected. You have to restart the gnome session.

Edit: Oh I just noticed you said you are using KDE then you need the xdg-desktop-portal-kde package.

develroo avatar Jan 05 '22 09:01 develroo

No, I didn't...... I'll give it a try, thanks.


发件人: develroo @.> 发送时间: 2022年1月5日 17:46 收件人: SeaDve/Kooha @.> 抄送: WhiredPlanck @.>; Comment @.> 主题: Re: [SeaDve/Kooha] Screencast Portal Request Error - Unable to start recording (#129)

@develroohttps://github.com/develroo I've installed xdg-desktop-portal-gnome and started it's systemd service, but my Kooha 2.0.1 still doesn't work (both installation via native package manager and Flatpak) , reporting the same error like yours ('Other Response'). My DE is KDE Plasma 5.23 (X11), all xdg-desktop-portal- things are installed and their systemd services have started. I have no idea if Kooha can only work with GNOME......

Did you logout/login again and reboot. It is not a service that is dynamically started and detected. You have to restart the gnome session.

― Reply to this email directly, view it on GitHubhttps://github.com/SeaDve/Kooha/issues/129#issuecomment-1005531354, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALLK3JEAO3FABHYHVLPI3VLUUQHPNANCNFSM5FODZOFQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.***>

WhiredPlanck avatar Jan 07 '22 08:01 WhiredPlanck

@SeaDve Hi Dave, I just installed Kooha flatpak after hearing about it and I too am having issues getting it to record due to "Other" portal request failing.

When I start Kooha via the terminal and press record, this is what is printed:

 ERROR kooha::backend::screencast_portal > Error from screencast call: Response(Other)

In the pop-up that appears saying for "Other" portal errors check the link, which I did. https://github.com/SeaDve/Kooha#-it-doesnt-work

However I am running the flatpak, I shouldn't be missing any dependencies. On top of that, I used flatseal to give every single permission possible and the "Other" response persists so I'm not sure what could be the portal error besides what I suggest below:

From looking this issue up online, I believe the flatpak needs the permission "xdg-desktop-portal", "xdg-desktop-portal-kde" for me and "xdg-desktop-portal-gnome" if on Gnome. These are not present by default and should probably be added. At least they are not present by default in the latest version I received from Flathub and I am not sure where I would put them in flatseal as I am still new to Linux.

I already had the required packages installed. It just seems like the flatpak cannot communicate with them. xdg-desktop-portal 1.12.1-1 xdg-desktop-portal-kde 5.23.5-1

Flatpak: 2.0.1

Thank you.

WineBottles avatar Jan 27 '22 17:01 WineBottles

I have had the same problem for a long time. Thought this was an issue of Kooha but it is not and I figured this out after upgrading to Ubuntu 22.04 beta (didn't work on 20.04 either).

There are a few requirements you need to meet

  1. xdg-desktop-portal and xdg-desktop-portal-gnome must be installed. The latter was not in my case
  2. gstreamer needs a registered pipewire plugin (even though gstreamer1.0-pipewire was installed gstreamer did not pick it up no matter what I did). "gst-inspect-1.0 pipewiresrc" this must work. I had to move the libgstpipewire.so somewhere else, start gstreamer, move it back and only then it was picked up. Don't ask me why
  3. My system was missing these 2 packages as well pipewire-media-session libpipewire-0.3-common Even though it seems they are not needed, they are in fact.

When all of these are met Kooha works properly via flatpak.

jakubklos77 avatar Mar 07 '22 08:03 jakubklos77

I have had the same problem for a long time. Thought this was an issue of Kooha but it is not and I figured this out after upgrading to Ubuntu 22.04 beta (didn't work on 20.04 either).

There are a few requirements you need to meet

1. xdg-desktop-portal and xdg-desktop-portal-gnome must be installed. The latter was not in my case

2. gstreamer needs a registered pipewire plugin (even though gstreamer1.0-pipewire was installed gstreamer did not pick it up no matter what I did). "gst-inspect-1.0 pipewiresrc" this must work. I had to move the libgstpipewire.so somewhere else, start gstreamer, move it back and only then it was picked up. Don't ask me why

3. My system was missing these 2 packages as well
   pipewire-media-session libpipewire-0.3-common
   Even though it seems they are not needed, they are in fact.

When all of these are met Kooha works properly via flatpak.

Tried your suggestions but:

  1. couldnt be found or installed, i use pureos 10
  2. followed steps in 2. no cigar, also gst-play command to start gstreamer doesnt work for me, how do you start gstreamer?
  3. couldnt be found or installed, i use pureos 10

CaptainMorgan12 avatar Oct 02 '22 17:10 CaptainMorgan12

Did you logout/login again and reboot. It is not a service that is dynamically started and detected. You have to restart the gnome session.

Edit: Oh I just noticed you said you are using KDE then you need the xdg-desktop-portal-kde package.

@develroo Sorry for very late reply. But the result is still that the app cannot start up a recording.

WhiredPlanck avatar Oct 06 '22 15:10 WhiredPlanck

Not sure what to say then. As you can see from the attached screencast it is working for me with Kooha. But I am using Gnome so? shrugs

Kooha-2022-10-12-18-49-17.webm

develroo avatar Oct 12 '22 17:10 develroo

it seems Zorin OS 16 only has 1.8.1 available in its apt repositories and in order to build xdg-desktop-portal-gnome it needs >= 1.15.0

not sure how to get around it without a bit of manual intervention (e.g. build all of these dependencies from their respective repos)

lifeiscontent avatar Oct 20 '22 16:10 lifeiscontent

The downgrade is unfortunately not working anymore, I've got 404 error with that commit hash. Also, the oldest version I found with flatpak command is 1.2.1

Does anyone have any other solution?

image image

tungdt-90 avatar Aug 19 '23 18:08 tungdt-90

I was able to get the downgrade to install v2.1.1 via flatpak just the other week on elementary os 7x, however it didn't resolve the recording issue, still got this error with it.

Failed to start recording

Caused by:
    0: Check out <a href="https://github.com/SeaDve/Kooha#-it-doesnt-work">It Doesn't Work page</a> for help.
    1: Failed to create ScreencastSession
    2: Failed to create session
    3: Failed to call `CreateSession` with parameters: Variant { ptr: 0x555e0a6c2750, type: VariantTy { inner: "(a{sv})" }, value: "({'handle_token': <'kooha_1'>, 'session_handle_token': <'kooha_0'>},)" }
    4: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop

sysfu avatar Aug 28 '23 16:08 sysfu