Skip to content

Screencast Portal Request Error - Unable to start recording #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dineshkp opened this issue Oct 6, 2021 · 38 comments
Closed

Screencast Portal Request Error - Unable to start recording #129

dineshkp opened this issue Oct 6, 2021 · 38 comments
Labels
bug Something isn't working

Comments

@dineshkp
Copy link

dineshkp commented Oct 6, 2021

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),
] })))
@SeaDve
Copy link
Owner

SeaDve commented Oct 6, 2021

Does it work on wayland?

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

@dineshkp
Copy link
Author

dineshkp commented Oct 6, 2021

@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
Copy link
Author

dineshkp commented Oct 6, 2021

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

@SeaDve
Copy link
Owner

SeaDve commented Oct 6, 2021

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

@dineshkp
Copy link
Author

dineshkp commented Oct 6, 2021

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

@SeaDve
Copy link
Owner

SeaDve commented Oct 6, 2021

Does kooha work on 2.0.0 wayland?

@dineshkp
Copy link
Author

dineshkp commented Oct 6, 2021

Does kooha work on 2.0.0 wayland?

The image in this post shows kooha 2.0.0 running on wayland
#129 (comment)

@dineshkp
Copy link
Author

dineshkp commented Oct 6, 2021

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

flatpak/xdg-desktop-portal#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.

@SeaDve
Copy link
Owner

SeaDve commented Oct 6, 2021

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!

@dineshkp
Copy link
Author

dineshkp commented Oct 7, 2021

In the meantime, I will be using version 1.2.1

The downgrade instructions specified in this post works fine.

Thank you @SeaDve

@YukKevChuHau
Copy link

YukKevChuHau commented Oct 12, 2021

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.

@SeaDve SeaDve added the bug Something isn't working label Nov 5, 2021
@JumperLuko
Copy link

JumperLuko commented Nov 10, 2021

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

@starsareintherose
Copy link

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

@SeaDve
Copy link
Owner

SeaDve commented Nov 26, 2021

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

@starsareintherose
Copy link

starsareintherose commented Nov 26, 2021

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 #140

@develroo
Copy link

develroo commented Dec 8, 2021

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

@kojid0
Copy link

kojid0 commented Dec 14, 2021

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

@develroo
Copy link

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
Copy link

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.

@WhiredPlanck
Copy link

WhiredPlanck commented Jan 5, 2022

@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......

@develroo
Copy link

develroo commented Jan 5, 2022

@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.

@WhiredPlanck
Copy link

WhiredPlanck commented Jan 7, 2022 via email

@WineBottles
Copy link

WineBottles commented Jan 27, 2022

@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.

@jakubklos77
Copy link

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.

@CaptainMorgan12
Copy link

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

@WhiredPlanck
Copy link

WhiredPlanck commented Oct 6, 2022

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.

@develroo
Copy link

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

@lifeiscontent
Copy link

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)

@tungdt-90
Copy link

tungdt-90 commented Aug 19, 2023

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

@sysfu
Copy link

sysfu commented Aug 28, 2023

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

@tungdt-90
Copy link

@sysfu It was my mistake, so sorry. I mean v1.2.1

But anyway, I switched to Kazam, it works well and can record 60 fps. which Kooha 1.2.1 still has some problem

@SeaDve SeaDve unpinned this issue Nov 3, 2023
@SeaDve
Copy link
Owner

SeaDve commented Feb 8, 2024

Closing this since there is nothing much we can do from Kooha's side here, aside from providing more helpful issue messages.

@KaKi87
Copy link

KaKi87 commented Feb 8, 2024

So what's the solution to this issue ?

@SeaDve
Copy link
Owner

SeaDve commented Feb 8, 2024

So what's the solution to this issue ?

See #129 (comment)

@KaKi87
Copy link

KaKi87 commented Feb 8, 2024

Thought this was an issue of Kooha but it is not

Actually it is, because dependencies should be automatically installed when installing Kooha, which is the purpose of package management.

@SeaDve
Copy link
Owner

SeaDve commented Feb 25, 2024

Actually it is, because dependencies should be automatically installed when installing Kooha, which is the purpose of package management.

That's more of a packaging issue, not an application issue.

In Flatpak at least, installing flatpak would bring xdg-desktop-portal and, therefore, the required pipewire libraries with it, so it won't be possible to install Kooha in the first place without having those dependencies installed.

@virtuallyunknown
Copy link

Getting the following error currently with version 2.3.0 from Flatpak.

Failed to start recording

Caused by:
    0: Failed to create session
    1: Failed to call `CreateSession` with parameters: Variant { ptr: 0x5eb296328b90, type: VariantTy { inner: "(a{sv})" }, value: "({'session_handle_token': <'kooha_6'>, 'handle_token': <'kooha_7'>},)" }
    2: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop

OS: Linux Mint 21.2 Cinnamon

@alex-startengine
Copy link

getting the following on sway WM with Kooha 2.3.0 from arch repo:

2024-07-22T23:38:50.747829Z ERROR kooha::window: Failed to start recording

Caused by:
    0: Failed to create session
    1: Failed to call `CreateSession` with parameters: Variant { ptr: 0x57c50d724e30, type: VariantTy { inner: "(a{sv})" }, value: "({'session_handle_token': <'kooha_0'>, 'handle_token': <'kooha_1'>},)" }
    2: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests