nut.js icon indicating copy to clipboard operation
nut.js copied to clipboard

All screenshot related methods prints a transparent image

Open Linkaynn opened this issue 2 years ago • 4 comments

Version

@nut-tree/[email protected] Ubuntu 20.04.5 LTS

Short overview

When I try to take a screenshot, the image saved on the system is all transparent. I have tried all my options already, opening an issue was my last. I'm not sure if this is related to: https://github.com/nut-tree/libnut/pull/34

Issue occurs on

  • [ ] Virtual machine
  • [ ] Docker container
  • [X] Dev/Host system

Steps to reproduce error

await screen.capture('whatever', FileType.PNG)

Additional content

The resulting screenshot

screen

Linkaynn avatar Oct 25 '22 14:10 Linkaynn

Same here. Regardless of the method used (screen.grabRegion(), screen.captureRegion()) - image is always empty. Same code on Win10 works correctly.

Manjaro linux

maks-rafalko avatar Jan 23 '23 20:01 maks-rafalko

Hi @Linkaynn @maks-rafalko 👋

Are you running Wayland or the XWayland compatibility mode?

s1hofmann avatar Jan 24 '23 09:01 s1hofmann

Hi @s1hofmann ! Thanks for the reply

I used the Wayland option on Ubuntu login screen 🤔

Linkaynn avatar Jan 24 '23 09:01 Linkaynn

Could you please try using the XWayland option? Wayland support is still lacking

s1hofmann avatar Jan 24 '23 09:01 s1hofmann