Skip to content

[Bug] Screenshot fails with unkown reason #196

@KelvinNovais

Description

@KelvinNovais

Bug description

The screenshot sometimes fails with unknown reason. The error is not very descriptive, it just says "Screenshot failed".
The problem usually happens when:

  • taking a too big screenshot (almost the whole monitor, or across monitors)
  • taking a screenshot on the second monitor.

Maybe another issue: screenshot always fails on a virtual machine (Fedora 41, with Gnome)

More information

OS: Fedora Linux 41
DE: GNOME 47
Running GTK4 test (from this repository), without any modifications. On Flatpak sandbox.


Here is an example: I selected almost the whole screen, and the system performs the screenshot successfully. The following image was saved on my disk:

Image

However, the application gets an error (after the screenshot was taken):

(org.gnome.PortalTest.Gtk4:2): Gjs-WARNING **: 17:16:20.759: JS ERROR: Gio.IOErrorEnum: Screenshot failed
_takeScreenshot/<@resource:///org/gnome/PortalTest/Gtk4/js/window.js:666:46
main@resource:///org/gnome/PortalTest/Gtk4/js/main.js:66:24
run@resource:///org/gnome/gjs/modules/script/package.js:207:19
@/app/bin/org.gnome.PortalTest.Gtk4:9:17

If you need more information, please give me a way to get a more verbose debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions