OttoAllmendinger/gnome-shell-screenshot

Screenshot fails with error message Error: exitCode=256

paulmccarthy opened this issue · 10 comments

Trying to take an area screenshot. Notification displayed with Error: exitCode=256. The screenshot is taken and the image can be found in /tmp, but the notification is failing.

OS: Ubuntu 20.04 Focal Fossa
Gnome Shell Version: 3.36.1

Error Messages:

JS ERROR: Error: ok=false
                                    main@/home/user/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/auxhelper.js:206:11
                                    @/home/user/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/auxhelper.js:216:3

JS ERROR: Error: cmd: gjs /home/user/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/auxhelper.js --filename /tmp/gnome-shell-screenshot-BJ1IJ0.png --area 2392,205,489,52 exitCode=256
                                          callHelper/<@/home/user/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/selection.js:87:16

No, I'm not. I don't have anything like that installed.

could you run this command in your terminal?

gjs /home/user/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/auxhelper.js --filename /tmp/gnome-shell-screenshot-BJ1IJ0.png --area 2392,205,489,52

The file in the command no longer exists on my system, so I tried taking a new screenshot and ran the command for that file. The command I ran was:

gjs /home/user/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/auxhelper.js --filename /tmp/gnome-shell-screenshot-IOP6J0.png --area 94,135,664,347

and the output was

(gjs:316721): Gjs-WARNING **: 19:58:42.851: JS ERROR: Error: ok=false
main@/home/user/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/auxhelper.js:206:11
@/home/user/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/auxhelper.js:216:3

Regards,
Paul.

Thanks. I'll try to reproduce the error in a VM.

If you need any more information to reproduce it, let me know.

Thanks for the work on this extension, and for looking in to this.

Ok I got around to installing a Ubuntu 20.04 VM but could not reproduce the issue (most reports for Ubuntu 20.04 seem to indicate that it works)

Are there any issues with the regular gnome-screenshot tool?

I guess if the file gets written we could just ignore the result of the ok value and continue anyway

I created a branch with a potential fix https://github.com/OttoAllmendinger/gnome-shell-screenshot/tree/122.ignore-dbus-ok

please try the fix like this

$ git fetch
$ git checkout origin/122.ignore-dbus-ok
$ make install 
# log out of gnome and log back in
$ gsettings --schemadir $HOME/.local/share/gnome-shell/extensions/gnome-shell-screenshot\@ttll.de/schemas/ \
  set org.gnome.shell.extensions.screenshot auxhelper-ignore-dbus-ok true

Thanks for the fix. I built the branch and installed it, but I still had the same problem. You mentioned that you were unable to replicate the issue, so I looked at the other extensions I had installed. I was eventually able to get your extension working after I disabled this shell extension:

https://extensions.gnome.org/extension/1474/no-flash-for-clipboard-screenshots/

I was able to get both your fix and the master branch working. I'm not sure why the other extension causes problems, but your extension is far more useful than the other one.

Sorry for creating extra work for you.

Do you have a donation link? I like to support Open Source developers when I can, and I'd like to show my appreciation for all the work you've put into this extension.

Regards.

no worries, I updated https://github.com/OttoAllmendinger/gnome-shell-screenshot#error-exitcode256

if you have any bitcoin, feel free to send a tip to 3NkWgrxHmQKiNMo94zs4vDQzwwpJ4FtwRN :)