Tracing screenshot size differs
See original GitHub issueI get issue to compute the speed index using speedline
module.
The size of the screenshots into the tracing file are not all the same.
The strange thing is that the issue occurs around 66% times, running 3 times the same code, the issue occurs twice.
Steps to reproduce
- Puppeteer version: puppeteer@0.13.0
- Platform / OS version: Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux
const puppeteer = require('puppeteer');
const devices = require('puppeteer/DeviceDescriptors');
const speedline = require('speedline');
async function run() {
const iPhone = devices['iPhone 6'];
const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
const filename = 'trace.json';
const page = await browser.newPage();
await page.emulate(iPhone);
try {
await page.tracing.start({path: filename, screenshots: true});
await page.goto('https://www.amazon.fr');
await page.tracing.stop();
const results = await speedline(filename);
console.log('Speed Index value:', results.speedIndex);
} catch (e) {
console.error(e);
}
browser.close();
}
run();
What is the expected result?
Image should all be 375x667 according to the DeviceDescriptors.js
file
{
'name': 'iPhone 6',
'userAgent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1',
'viewport': {
'width': 375,
'height': 667,
'deviceScaleFactor': 2,
'isMobile': true,
'hasTouch': true,
'isLandscape': false
}
},
What happens instead?
The two first pictures size are 376x667, triggering an exception Images have different sizes!
into ImageSSIM
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Tracing screenshot size differs · Issue #1427 - GitHub
I get issue to compute the speed index using speedline module. The size of the screenshots into the tracing file are not all...
Read more >Screenshots size of file - Microsoft Community
Hi everyone. I have a question regarding the screenshots that I save. I have a lot of screenshots saved. Some of them are...
Read more >Visual Testing using Screenshot Comparison - Ghost Inspector
The system will track different baselines for each combination of browser, screen size and geolocation. This means that if you run at test...
Read more >1164757 - Capture full size screenshot is broken - Monorail
Regarding different width of the "headfull" screenshots - it can be due to the different scrollbars' width, or due to different scale factor....
Read more >App Screenshot Sizes and Guidelines for Huawei AppGallery
Huawei Guidelines clearly state that AppGallery can accept a minimum of 3 different app screenshots for your app. However, pay attention to the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can repro this every other time. Seems to be a chromium bug.
I ran into the same issue today. This happens also when setting the device or viewport at all.