Testcafe: Unable to take screenshots on linux with GNOME on Wayland

Created on 26 Jan 2017  路  12Comments  路  Source: DevExpress/testcafe

Are you requesting a feature or reporting a bug?

Bug (I think)

What is the current behavior?

Test unable to take screenshots on linux
error screenshot

  Was unable to take a screenshot due to an error.

  Command failed: /home/browser-tests/node_modules/testcafe-browser-tools/bin/linux/64/screenshot
  /home/browser-tests/ss/2017-01-26_05-15-43/test-3/Chrome_55.0.2883_Linux_0.0.0/errors/1.png
  X Error of failed request:  BadWindow (invalid Window parameter)
    Major opcode of failed request:  3 (X_GetWindowAttributes)
    Resource id in failed request:  0x0
    Serial number of failed request:  7
    Current serial number in output stream:  8

What is the expected behavior?

To take screenshots normally, as it as introduced for linux in v0.12.0

How would you reproduce the current behavior (if this is a bug)?

I just run a test which fails with the options to take screenshots on fails

Steps to reproduce

test.js

fixture('test').page('http://google.com')

test('if is facebook', async (t) => {

    await t.expect(await t.eval(() => {window.location.toString()})).match(/(facebook.com)$/, 'hey, this is not facebook');
});
testcafe -S -s ./ss chrome test.js

Specify your

  • operating system: Arch Linux x86_64 / Kernel Release: 4.8.13-1-ARCH
  • testcafe version: v0.12.1
  • node.js version: v7.4.0
Auto-locked browser natives bug

Most helpful comment

Yes, we have, and I think that we have to develop it ASAP, because GNOME is quite popular desktop environment, and meanwhile Wayland is getting more common.

All 12 comments

Hello, @sirgallifrey! What window manager are you using? Currently we need full EWMH support: https://github.com/DevExpress/testcafe-browser-tools/issues/112.

Ohh I see.. Sorry I haven't searched for issues on testcafe-browser-tools
Is there something I can do to help?

My wm info:

# wmctrl -m
Name: GNOME Shell
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: N/A

Are you using Wayland or X11?

X11

Can you give me the outputs of pacman -Q and ps aux, please?

yes, but they are a little big, I paste here anyway?

Really thank you! Unfortunately, you are using Wayland (search for wayland in ps aux). GNOME Shell has very limited support for EWMH under Wayland: https://wiki.gnome.org/Initiatives/Wayland/Gaps#ICCCM.2BAC8-EWMH. With X11 Gnome Shell it must be fine, I have tested X11 GNOME on Fedora 24. As workaround, please, try to log out, get to the password input screen, press the gear and select regular GNOME (not GNOME on Wayland), like on the screenshot below.
image

:open_mouth: You know more about my OS setup than myself.. haha
In my 'gear menu' I have the options: GNOME, GNOME Classic and GNOME on Xorg. I was using the GNOME option and to test I changed to GNOME on Xorg but it had no effect and the ps aux still shows Wayland...
I am the one who have to thank you @AndreyBelym

So it's not a bug then.
It's expected to not work on a EWMH-non-compliant window manager.

I don't know if you guys have plans on supporting non EWMH window managers or not, but if you do I'm available to help if you need to test something

Yes, we have, and I think that we have to develop it ASAP, because GNOME is quite popular desktop environment, and meanwhile Wayland is getting more common.

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

Was this page helpful?
0 / 5 - 0 ratings