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

Showing a warning as unable to take screenshots when running the test in Lambda Test #6887

Closed
Vooha-QualiTlabs opened this issue Feb 21, 2022 · 6 comments · Fixed by #6897
Closed
Assignees
Labels
FREQUENCY: level 1 SYSTEM: screenshot capturing An issue related to the screenshot capturing functionality. TYPE: bug The described behavior is considered as wrong (bug).

Comments

@Vooha-QualiTlabs
Copy link

Vooha-QualiTlabs commented Feb 21, 2022

What is your Scenario?

I am creating a custom reporter at my end. The tests to be run in the Lambda Test. I have created a report to get the screenshots whenever the test fails.

What is the Current behavior?

The testRunInfo shows warning

What is the Expected behavior?

The screenshots should be captured without any issue

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

https://www.xeniapp.com/

What is your TestCafe test code?

It is happening for any test

Your complete configuration file

{
"selectorTimeout": 90000,
"pageLoadTimeout": 90000,
"browserInitTimeout": 180000,
"assertionTimeOut": 90000,
"disableMultipleWindows": true,
"skipJsErrors": true,
"concurrency": 1,
"speed": 1,
"stopOnFirstFail": false,
"quarantineMode":{
"successThreshold":1,
"attemptLimit": 2
},
"screenshotPath": "/screenshots/",
"screenshots": {
"takeOnFails": true,
"fullPage": true,
"pathPattern": "${DATE}/test-${TEST_INDEX}/${FILE_INDEX}.png"
}
}

Your complete test report

Test Run Info:

{
errs: [
TestRunErrorFormattableAdapter {
userAgent: 'Chrome 98.0.4758.102 / Windows 10 ( https://automation.lambdatest.com/logs/?sessionID=e40d33f6fe0ce21c05486ae9875529da )',
screenshotPath: '',
testRunId: 's1EQippPj',
testRunPhase: 'inTest',
code: 'E53',
isTestCafeError: true,
callsite: [CallsiteRecord],
errMsg: "AssertionError: not exactly matching with given location : Hyderabd: expected 'hyd- hyderabad, all airports' to include 'hyderabd'",
diff: false,
id: 'wBAieQe'
}
],
warnings: [
'Was unable to take a screenshot due to an error.\n' +
'\n' +
'RangeError [ERR_OUT_OF_RANGE]: The value of "sourceStart" is out of range. It must be >= 0. Received -7387924\n' +
' at _copy (buffer.js:227:13)\n' +
' at Buffer.copy (buffer.js:768:12)\n' +
' at Object.copyImagePart (C:\Users\LENOVO\qaautomation\node_modules\testcafe\src\screenshots\utils.js:50:23)\n' +
' at Object.cropScreenshot (C:\Users\LENOVO\qaautomation\node_modules\testcafe\src\screenshots\crop.js:140:12)\n' +
' at runMicrotasks ()\n' +
' at processTicksAndRejections (internal/process/task_queues.js:95:5)\n' +
' at C:\Users\LENOVO\qaautomation\node_modules\testcafe\src\screenshots\capturer.js:152:34\n' +
' at Capturer._capture (C:\Users\LENOVO\qaautomation\node_modules\testcafe\src\screenshots\capturer.js:133:9)\n' +
' at Capturer.captureError (C:\Users\LENOVO\qaautomation\node_modules\testcafe\src\screenshots\capturer.js:190:16)\n' +
' at BrowserManipulationQueue._takeScreenshot (C:\Users\LENOVO\qaautomation\node_modules\testcafe\src\test-run\browser-manipulation-queue.js:55:20)'
],
durationMs: 81471,
unstable: false,
screenshotPath: null,
screenshots: [],
videos: [],
quarantine: { '1': { passed: false }, '2': { passed: false } },
skipped: false,
browsers: [
{
testRunId: 's1EQippPj',
name: 'Chrome',
version: '98.0.4758.102',
platform: 'desktop',
os: [Object],
engine: [Object],
prettyUserAgent: 'Chrome 98.0.4758.102 / Windows 10',
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36',
alias: 'lambdatest:Chrome@98.0:Windows',
headless: false
}
],
testId: 'YAv2QFu'
}

Screenshots

image

No response

Steps to Reproduce

  1. Run the tests in Lambda Test.
  2. Print the Test Run Info in the reporter

TestCafe version

1.18.3

Node.js version

14.17.4

Command-line arguments

testcafe lambdatest:Chrome@98.0:Windows 10 src/tests/*.js --skip-js-errors --reporter my-custom-reporter

Browser name(s) and version(s)

Chrome 98

Platform(s) and version(s)

Windows 10

Other

No response

@Vooha-QualiTlabs Vooha-QualiTlabs added the TYPE: bug The described behavior is considered as wrong (bug). label Feb 21, 2022
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Feb 21, 2022
@Vooha-QualiTlabs
Copy link
Author

Vooha-QualiTlabs commented Feb 21, 2022

@Dmitry-Ostashev Please take a look into this issue. Thanks

@Dmitry-Ostashev
Copy link
Contributor

Thank you for your report. I reproduced this problem with a simple test. This issue looks similar to this: #6886.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Feb 22, 2022
@Dmitry-Ostashev Dmitry-Ostashev added FREQUENCY: level 1 SYSTEM: screenshot capturing An issue related to the screenshot capturing functionality. labels Feb 22, 2022
@Vooha-QualiTlabs
Copy link
Author

Thank you for your response @Dmitry-Ostashev . May I know what could be the time estimation for this fix? thank you.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Feb 22, 2022
@AlexSkorkin AlexSkorkin added the STATE: No estimations No estimations can be made at this point. label Feb 23, 2022
@github-actions
Copy link

Any personal estimate may be misleading, so we cannot currently tell it at the moment. Once we get any results, we will post them in this thread.

@github-actions github-actions bot removed STATE: Need response An issue that requires a response or attention from the team. STATE: No estimations No estimations can be made at this point. labels Feb 23, 2022
@miherlosev miherlosev self-assigned this Feb 24, 2022
@miherlosev
Copy link
Collaborator

miherlosev commented Feb 25, 2022

The issue can be reproduced with the local browser:

testcafe ie test.js
fixture `Screenshot`
    .page('https://google.com');

test('Take screenshot', async t => {
    await t.takeScreenshot();
});

@Vooha-QualiTlabs
Copy link
Author

Thank you for fixing, @miherlosev . The screenshots are working in this version npm i testcafe@1.18.5-alpha.1

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Mar 3, 2022
@viktoria2506 viktoria2506 removed the STATE: Need response An issue that requires a response or attention from the team. label Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FREQUENCY: level 1 SYSTEM: screenshot capturing An issue related to the screenshot capturing functionality. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
5 participants