question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on create screenshot when running testcafe on selenium grid (since version 1.18.3)

See original GitHub issue

What is your Scenario?

We are running testcafe tests on selenium grid using this plugin: https://github.com/alexschwantes/testcafe-browser-provider-selenium Since testcafe update to 1.18.3 there is an error on screenshot generate: image

What is the Current behavior?

Screenshot error occurs when running tests on remote browser on selenium grid

What is the Expected behavior?

Screenshots should be generated without error when running test on remote browser

What is your public website URL? (or attach your complete example)

It is reproducible with any test run using the selenium grid

What is your TestCafe test code?

import {Selector, t} from “testcafe” fixture example .page https://gojs.net/latest/samples/minimalBlob.html;

test(‘Throw error’, async t => { await t.expect(Selector(“#blobButton”).exists).notOk(“Error occured”);

});

Your complete configuration file

package.json:

{ “name”: “testcafeexample”, “version”: “1.0.0”, “description”: “”, “main”: “example.js”, “scripts”: { “test”: “testcafe selenium:chrome example.js -s takeOnFails=true” }, “author”: “”, “license”: “ISC”, “dependencies”: { “testcafe”: “1.18.3”, “testcafe-browser-provider-selenium”: “^1.2.0” } }

Your complete test report

example ✖ Throw error

  1. AssertionError: Error occured: expected true to be falsy

    Browser: Chrome 97.0.4692.99 / Linux 0.0

    1 |import {Selector, t} from “testcafe” 2 |fixture example 3 | .page https://gojs.net/latest/samples/minimalBlob.html; 4 | 5 |test(‘Throw error’, async t => {

    6 | await t.expect(Selector(“#blobButton”).exists).notOk(“Error occured”); 7 | 8 |}); 9 |

    at <anonymous> (/home/asia/testcafeExample/example.js:6:52) at asyncGeneratorStep (/home/asia/testcafeExample/example.js:1:218) at _next (/home/asia/testcafeExample/example.js:1:556) at <anonymous> (/home/asia/testcafeExample/example.js:1:721) at <anonymous> (/home/asia/testcafeExample/example.js:1:462) at <anonymous> (/home/asia/testcafeExample/example.js:5:5)

1/1 failed (8s)

Warnings (1):

Was unable to take a screenshot due to an error.

RangeError [ERR_OUT_OF_RANGE]: The value of “sourceStart” is out of range. It must be >= 0. Received -3538404 at _copy (buffer.js:227:13) at Buffer.copy (buffer.js:769:12) at Object.copyImagePart (/home/asia/testcafeExample/node_modules/testcafe/src/screenshots/utils.js:50:23) at Object.cropScreenshot (/home/asia/testcafeExample/node_modules/testcafe/src/screenshots/crop.js:140:12) at processTicksAndRejections (internal/process/task_queues.js:93:5) at /home/asia/testcafeExample/node_modules/testcafe/src/screenshots/capturer.js:152:34 at Capturer._capture (/home/asia/testcafeExample/node_modules/testcafe/src/screenshots/capturer.js:133:9) at Capturer.captureError (/home/asia/testcafeExample/node_modules/testcafe/src/screenshots/capturer.js:190:16) at BrowserManipulationQueue._takeScreenshot (/home/asia/testcafeExample/node_modules/testcafe/src/test-run/browser-manipulation-queue.js:55:20) at BrowserManipulationQueue._executeCommand (/home/asia/testcafeExample/node_modules/testcafe/src/test-run/browser-manipulation-queue.js:83:24) npm ERR! Test failed. See above for more details.

Screenshots

No response

Steps to Reproduce

1.use package.json and testexample provided above 2. run npm install 2. run selenium grid docker image, available with this command: docker run -d -p 4444:4444 --shm-size=“2g” selenium/standalone-chrome:4.1.1-20220121 3. run npm test NOT OK - error occurs on screenshot generate attempt

TestCafe version

1.18.3

Node.js version

12.16.3

Command-line arguments

testcafe selenium:chrome example.js -s takeOnFails=true

Browser name(s) and version(s)

Chrome 97.0.4692.99

Platform(s) and version(s)

linux ubuntu 20

Other

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Dmitry-Ostashevcommented, Jan 31, 2022

@wombatka Thank you for the detailed report. I reproduced the issue. We will research it and update this thread once we have news.

0reactions
miherlosevcommented, May 17, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Screenshots and Videos | Advanced Guides - TestCafe
Screenshots and Videos. TestCafe allows you to take screenshots of the tested webpage and record videos of test runs. Screenshots.
Read more >
Run TestCafe tests on a Selenium Grid - TestingBot
You will see a video recording of the test in the member dashboard, together with screenshots and logs.
Read more >
[JENKINS-54683] Pods entering error state due to ... - Jenkins Jira
recently we upgraded the plugin to 1.13.5 and we have been observing the pods entering into error state and the builds that are...
Read more >
How to make screenshots on Fail using TestCafe
You can configure TestCafe to automatically take a screenshot whenever a test fails. Use either of the following:.
Read more >
Experts for esp32 serial bootloader utility - Linknovate
Name Score News Web Monitoring Espressif 16.4 1 ‑ Google Cloud 7.5 2 ‑ GCtronic 4.7 ‑ 1
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found