normcap icon indicating copy to clipboard operation
normcap copied to clipboard

normcap not working on Ubuntu 24.10

Open Hyphaed opened this issue 1 year ago • 6 comments

What happened?

I'm running normcap from flathub

seems error is related with qt libraries

How did you install NormCap?

None

Operating System + Version?

No response

[Linux only] Display Server (DS) + Desktop environment (DE)?

No response

Debug log output?*

`(base) ferran@z590i:~/Documents/PersonalPackages/normcap$ flatpak run com.github.dynobo.normcap     
F: Not sharing "/usr/share" with sandbox: Path "/usr" is reserved by Flatpak
F: Not sharing "/usr/share/themes" with sandbox: Path "/usr" is reserved by Flatpak
10:08:10 - ERROR   - normcap.screengrab.handlers.dbus_portal:127 - Permission denied for Screenshot via xdg-portal! Message: <PySide6.QtDBus.QDBusMessage(type=Signal, service=":1.72", path="/org/freedesktop/portal/desktop/request/1_362/normcap_gcfaeefd", interface="org.freedesktop.portal.Request", member="Response", signature="ua{sv}", contents=(2, [Argument: a{sv} {}]) ) at 0x7ba40c466900>
10:08:10 - WARNING - normcap.screengrab.permissions:202 - Screenshot permissions on Wayland seem missing.
Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/normcap/screengrab/permissions.py", line 200, in _dbus_portal_has_screenshot_permission
    result = dbus_portal.capture()
             ^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/normcap/screengrab/handlers/dbus_portal.py", line 242, in capture
    image = _synchronized_capture(interactive=False)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/normcap/screengrab/handlers/dbus_portal.py", line 198, in _synchronized_capture
    raise error
PermissionError: Permission denied for Screenshot via xdg-portal! Message: <PySide6.QtDBus.QDBusMessage(type=Signal, service=":1.72", path="/org/freedesktop/portal/desktop/request/1_362/normcap_gcfaeefd", interface="org.freedesktop.portal.Request", member="Response", signature="ua{sv}", contents=(2, [Argument: a{sv} {}]) ) at 0x7ba40c466900>
10:08:12 - ERROR   - normcap:181 - [QT] qtfatalmsg - cannot mix incompatible qt library (6.7.3) with this library (6.7.0)
`

Hyphaed avatar Oct 29 '24 09:10 Hyphaed

Same error. Can't get AppImage or Flatpak to work on Ububtu 24.10.

cvpsmith avatar Nov 10 '24 01:11 cvpsmith

Still same? no fixes yet?

jasiralavibiztripz avatar Dec 10 '24 13:12 jasiralavibiztripz

I've solved it, just don't remember how

It crashes after first screenshot/OCR, yet is enough like this :: if I want a 2nd OCR I open again the app

I needed to install a library, and after I've installed it I got a message on the first run asking for "capturing screen" permission

Hyphaed avatar Dec 10 '24 13:12 Hyphaed

I'm on Ubuntu 24.04 with the same debug information. The Appimage works though.

yue-dongchen avatar Dec 10 '24 22:12 yue-dongchen

AppImage wasn't working when I had flatpak installed as well. I removed both and then downloaded AppImage again. it's working now.

jasiralavibiztripz avatar Dec 12 '24 07:12 jasiralavibiztripz

NixOS user here, with the same issue:

$ flatpak run com.github.dynobo.normcap
18:35:31 - ERROR   - normcap.screengrab.handlers.dbus_portal:127 - Permission denied for Screenshot via xdg-portal! Message: <PySide6.QtDBus.QDBusMessage(type=Signal, service=":1.65", path="/org/freedesktop/portal/desktop/request/1_1299/normcap_daggieie", interface="org.freedesktop.portal.Request", member="Response", signature="ua{sv}", contents=(2, [Argument: a{sv} {}]) ) at 0x7f0a8341a240>
18:35:31 - WARNING - normcap.screengrab.permissions:202 - Screenshot permissions on Wayland seem missing.
Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/normcap/screengrab/permissions.py", line 200, in _dbus_portal_has_screenshot_permission
    result = dbus_portal.capture()
             ^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/normcap/screengrab/handlers/dbus_portal.py", line 242, in capture
    image = _synchronized_capture(interactive=False)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/normcap/screengrab/handlers/dbus_portal.py", line 198, in _synchronized_capture
    raise error
PermissionError: Permission denied for Screenshot via xdg-portal! Message: <PySide6.QtDBus.QDBusMessage(type=Signal, service=":1.65", path="/org/freedesktop/portal/desktop/request/1_1299/normcap_daggieie", interface="org.freedesktop.portal.Request", member="Response", signature="ua{sv}", contents=(2, [Argument: a{sv} {}]) ) at 0x7f0a8341a240>
18:35:32 - ERROR   - normcap:181 - [QT] qtfatalmsg - cannot mix incompatible qt library (6.7.3) with this library (6.7.1)

NormCap ver. 0.5.9 Gnome 47 Wayland

dmchmk avatar May 08 '25 15:05 dmchmk

Same issue on Ubuntu 25.04 and normcap installed as a Flatpak.

flatpak run com.github.dynobo.normcap      
10:26:07 - ERROR   - normcap.screengrab.handlers.dbus_portal:127 - Permission denied for Screenshot via xdg-portal! Message: <PySide6.QtDBus.QDBusMessage(type=Signal, service=":1.86", path="/org/freedesktop/portal/desktop/request/1_432/normcap_hfhfhcba", interface="org.freedesktop.portal.Request", member="Response", signature="ua{sv}", contents=(2, [Argument: a{sv} {}]) ) at 0x728fb081eb80>
10:26:07 - WARNING - normcap.screengrab.permissions:202 - Screenshot permissions on Wayland seem missing.
Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/normcap/screengrab/permissions.py", line 200, in _dbus_portal_has_screenshot_permission
    result = dbus_portal.capture()
             ^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/normcap/screengrab/handlers/dbus_portal.py", line 242, in capture
    image = _synchronized_capture(interactive=False)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/normcap/screengrab/handlers/dbus_portal.py", line 198, in _synchronized_capture
    raise error
PermissionError: Permission denied for Screenshot via xdg-portal! Message: <PySide6.QtDBus.QDBusMessage(type=Signal, service=":1.86", path="/org/freedesktop/portal/desktop/request/1_432/normcap_hfhfhcba", interface="org.freedesktop.portal.Request", member="Response", signature="ua{sv}", contents=(2, [Argument: a{sv} {}]) ) at 0x728fb081eb80>
10:26:08 - ERROR   - normcap:181 - [QT] qtfatalmsg - cannot mix incompatible qt library (6.7.3) with this library (6.7.1)

AdnanHodzic avatar Jul 16 '25 08:07 AdnanHodzic

Did you provide the permission to take screenshots?

Image

sojusnik avatar Aug 19 '25 08:08 sojusnik

Did you provide the permission to take screenshots?

It doesn't ask for it:

Image Image

On the first screen it's only "notifications" and "run in background", on the second one - "network access"

dmchmk avatar Aug 19 '25 12:08 dmchmk

I see people still with problems, for me now is working :: Only I've done is keep updating my system.

Hyphaed avatar Aug 19 '25 12:08 Hyphaed

It doesn't ask for it:

Strange. Reinstall it and it should ask you for the permission on the first start, at least it was the case for me on Ubuntu + Flatpak version.

sojusnik avatar Aug 19 '25 13:08 sojusnik

Reinstall it and it should ask you for the permission on the first start

I literally just installed it today to make those screenshots, because it was uninstalled when I've discovered that it's not working:)

dmchmk avatar Aug 19 '25 16:08 dmchmk

Can you try granting the permissions manuall?

For Flatpak you can do this with:

flatpak permission-set screenshot screenshot com.github.dynobo.normcap yes

For AppImage on most Wayland systems you can do this with:

dbus-send --print-reply=literal \
  --session --dest=org.freedesktop.impl.portal.PermissionStore \
  /org/freedesktop/impl/portal/PermissionStore \
  org.freedesktop.impl.portal.PermissionStore.SetPermission \
  string:'screenshot' boolean:true string:'screenshot' \
  string:'com.github.dynobo.normcap' array:string:['yes']

If you are interested in more information about the unfortunate situation regarding screenshot permissions (and debugging tipps), please read this FAQ.

dynobo avatar Sep 04 '25 14:09 dynobo

Can you try granting the permissions manuall?

do you think it's the proper way how the app should be working on the user-side?

dmchmk avatar Sep 06 '25 20:09 dmchmk

do you think it's the proper way how the app should be working on the user-side?

Definitely not! As explained in the linked FAQ, I'm totally aware of the issues with Wayland, it's just very hard to do right, especially with limited resources as an open source project.

Nevertheless, I always strive for improvement, and also welcome any contribution. Even feedback like yours is really valuable!

dynobo avatar Sep 07 '25 08:09 dynobo

I literally just installed it today to make those screenshots, because it was uninstalled when I've discovered that it's not working:)

Could you please try again with the new v0.6.0 release? It includes some changes, which should help with automatically requesting the screenshot permissions, at least on some systems.

dynobo avatar Sep 07 '25 09:09 dynobo