Skip to content
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

Screenshot fails with error message Error: exitCode=256 #122

Closed
paulmccarthy opened this issue May 4, 2020 · 10 comments
Closed

Screenshot fails with error message Error: exitCode=256 #122

paulmccarthy opened this issue May 4, 2020 · 10 comments

Comments

@paulmccarthy
Copy link

paulmccarthy commented May 4, 2020

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
@OttoAllmendinger
Copy link
Owner

@paulmccarthy
Copy link
Author

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

@OttoAllmendinger
Copy link
Owner

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

@paulmccarthy
Copy link
Author

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.

@OttoAllmendinger
Copy link
Owner

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

@paulmccarthy
Copy link
Author

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.

@OttoAllmendinger
Copy link
Owner

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

OttoAllmendinger added a commit that referenced this issue May 17, 2020
Apparently sometimes `ok=false` for unclear reasons

Issue: #122
@OttoAllmendinger
Copy link
Owner

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

@paulmccarthy
Copy link
Author

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.

@OttoAllmendinger
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants