-
Notifications
You must be signed in to change notification settings - Fork 20
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
UnhandledPromiseRejectionWarning: RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range #22
Comments
Do you have a sample that I can use to re-create this issue? |
Same here |
Basically the issue occurs when the selected element exceeds the viewport of the browser. But only in Firefox. So on this page (#22) when trying to capture the element with class .js-discussion the error occurs.
|
have exactly the same for chrome |
Same here. Chrome 88.
I must agree. I was trying |
@apboon Could you please elaborate a little more about your workaround and where have you added the style in the project. |
Not any particular location in my project. I just made sure the style was applied with the objective of the thing that a wanted to capture isn't larger than the browser's viewport. |
When using Firefox Geckodriver, vrt returns the following error when capturing a screenshot of the specified element:
(node:24488) UnhandledPromiseRejectionWarning: RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 7253872. Received -1179984 at boundsError (internal/buffer.js:55:9) at Buffer.readUInt32BE (internal/buffer.js:198:5) at Jimp.<anonymous> (D:\TFS\Wavin\Wavin_SXP_TestAutomation\Nightwatch\node_modules\jimp\index.js:896:37) at Jimp.scan (D:\TFS\Wavin\Wavin_SXP_TestAutomation\Nightwatch\node_modules\jimp\index.js:679:15) at Jimp.crop (D:\TFS\Wavin\Wavin_SXP_TestAutomation\Nightwatch\node_modules\jimp\index.js:895:10) at Jimp.read.then (D:\TFS\Wavin\Wavin_SXP_TestAutomation\Nightwatch\node_modules\nightwatch-vrt\commands\captureElementScreenshot.js:65:24) at process._tickCallback (internal/process/next_tick.js:68:7) (node:24488) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:24488) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
This error does not occur when using Chromedriver.
nightwatch: v0.9.21
vrt: v0.2.6
Geckodriver: v0.21.0
Selenium Standalone Server: v3.13.0
Element specifications:
y = -156.1999969482422
height = 1115.199951171875
screenshot.bitmap.height = 959
x = 0
width = 1891
screenshot.bitmap.width = 1891
The text was updated successfully, but these errors were encountered: