Open grafoxy opened 3 years ago
The same error when I tried to emulate mobile device in a desktop browser using the following caps: 'goog:chromeOptions': { w3c:false, args: [ 'use-fake-ui-for-media-stream', 'use-fake-device-for-media-stream', 'disable-notifications', ], mobileEmulation: { deviceName: "Galaxy S5" } },
Error:
RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 921596. Received 921600
at boundsError (internal/buffer.js:77:9)
at Buffer.readUInt32BE (internal/buffer.js:300:5)
at Jimp.
I tried to make visual tests with Chrome 87 on Android 9, but screenshots failed with an error.
In test used the following command to make screenshots but with same result: ... browser.checkViewport([{}]); browser.checkDocument([{}]); ...
Service config: [ 'novus-visual-regression', { compare: new VisualRegressionCompare.Spectre({ url: testEnv.spectreUrl, project: 'xBees Mobile', suite: 'Visual regression testing', test: function getTest(context) { return context.test.title; }, browser: function getBrowser(context) { return context.browser.name; }, size: function getSize(context) { return context.meta.orientation; }, fuzzLevel: 30 }), viewportChangePause: 2000, orientations: ['portrait'], } ]
Error: RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 1918076. Received 1918080 at boundsError (internal/buffer.js:77:9) at Buffer.readUInt32BE (internal/buffer.js:300:5) at Jimp. (D:\MobileTeam\Projects\autotesting\node_modules\wdio-novus-visual-regression-service\node_modules\@jimp\plugin-crop\dist\index.js:43:37)
at scan (D:\MobileTeam\Projects\autotesting\node_modules\wdio-novus-visual-regression-service\node_modules\@jimp\utils\dist\index.js:53:9)
at Jimp.scanQuiet (D:\MobileTeam\Projects\autotesting\node_modules\wdio-novus-visual-regression-service\node_modules\@jimp\core\dist\index.js:1262:32)
at Jimp.cropQuiet (D:\MobileTeam\Projects\autotesting\node_modules\wdio-novus-visual-regression-service\node_modules\@jimp\plugin-crop\dist\index.js:42:12)
at Jimp. [as crop] (D:\MobileTeam\Projects\autotesting\node_modules\wdio-novus-visual-regression-service\node_modules\@jimp\core\dist\index.js:1176:23)
at _callee$ (D:\MobileTeam\Projects\autotesting\node_modules\wdio-novus-visual-regression-service\lib\utils\image\jimp.js:78:19)
at tryCatch (D:\MobileTeam\Projects\autotesting\node_modules\regenerator-runtime\runtime.js:63:40)
at Generator.invoke [as _invoke] (D:\MobileTeam\Projects\autotesting\node_modules\regenerator-runtime\runtime.js:293:22)
at Browser.runCommandWithHooks (D:\MobileTeam\Projects\autotesting\node_modules\@wdio\sync\build\wrapCommand.js:65:24)
at Browser.checkViewport (D:\MobileTeam\Projects\autotesting\node_modules\@wdio\sync\build\wrapCommand.js:44:44) at Browser.next [as checkViewport] (D:\MobileTeam\Projects\autotesting\node_modules\@wdio\utils\build\monad.js:94:33)
at Context. (D:\MobileTeam\Projects\autotesting\src\screentests\browser\vrt.js:15:17)
at Context.executeSync (D:\MobileTeam\Projects\autotesting\node_modules\@wdio\sync\build\index.js:25:22)
at D:\MobileTeam\Projects\autotesting\node_modules\@wdio\sync\build\index.js:46:68
Full logs: logs.txt