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

Testcafe screenshot is not working for firefox on Cent os #200

Open
sumant28 opened this issue Feb 26, 2020 · 4 comments
Open

Testcafe screenshot is not working for firefox on Cent os #200

sumant28 opened this issue Feb 26, 2020 · 4 comments

Comments

@sumant28
Copy link

sumant28 commented Feb 26, 2020

Scenario :
1] Using frontend-maven-plugin to download node and testcafe in project directory.
2] Running testcafe based tests from Java using xvfb-run command along with node and testcafe using code like :
Runtime.getRuntime().exec()
3] Using .testcaferc.json to add configuration where the screenshot is enabled.

The actual command that is running :
xvfb-run --server-num=43717 --server-args=-screen 0 1024x768x24 {project_root_path}/node/node {project_root_path}/node_modules/testcafe/lib/cli/cli.js 'path:/mnt/jenkins/firefox/firefox-68.1.0esr/firefox/firefox --start-fullscreen' {project_root_path}/src/test/resources/testcafe-test-files/transform-add-and-subtract-time.js

The error while taking the screenshot is :

Warnings (2): -- Was unable to take a screenshot due to an error.

  `Error: Command failed:
  {project_root_path}/node_modules/testcafe-browser-tools/bin/linux/glibc-64/screenshot
  200002
  {project_root_path}/target/screenshots/Add Time.png`

Software versions I am using :
Testcafe version : 1.1.0
FirefoxBinary version: Mozilla Firefox 68.1.0esr
CentOS version : Linux release 7.4.1708 (Core)

Can you please help me in resolving this issue ?
@AndreyBelym

@miherlosev
Copy link
Contributor

miherlosev commented Feb 26, 2020

Hi @sumant28

Could you please provide us with the result of the 'ldd /node_modules/testcafe-browser-tools/bin/linux/glibc-64/screenshot' command execution?

@sumant28
Copy link
Author

sumant28 commented Feb 26, 2020

@miherlosev @AndreyBelym
Thanks for your reply.
Here is the complete error log :

    --
      Was unable to take a screenshot due to an error.

      Error: Command failed:
     {project_root_path}/node_modules/testcafe-browser-tools/bin/linux/glibc-64/screenshot
      200002
      {project_root_path}/target/screenshots/Add
      Time.png

          at ChildProcess.exithandler (child_process.js:275:12)
          at emitTwo (events.js:126:13)
          at ChildProcess.emit (events.js:214:7)
          at maybeClose (internal/child_process.js:925:16)
          at Socket.stream.socket.on (internal/child_process.js:346:11)
          at emitOne (events.js:116:13)
          at Socket.emit (events.js:211:7)
          at Pipe._handle.close [as _onclose] (net.js:557:12)

@sumant28
Copy link
Author

@miherlosev @AndreyBelym

FYI,
I am seeing this issue only on centos servers and firefox full-screen mode. And I am running my test using Jenkins.
Testcafe is able to take a screenshot on my local Mac machine for both firefox and chrome

@aleks-pro
Copy link
Contributor

Hello @sumant28 ,

The log you provided is a TestCafe error log. Please execute the ldd /node_modules/testcafe-browser-tools/bin/linux/glibc-64/screenshot command and send us its output. Also, you can try to use a headless mode to avoid the issue.

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

No branches or pull requests

5 participants