GoogleChrome / GoogleChrome/lighthouse

Screenshots with Puppeteer have incorrect dimensions

Open
#12,988 3 comments 1 reaction 0 assignees View on GitHub
bug P1.5 upstream-action-required
Dominant language
JavaScript
Stars
30.8k
Forks
9.8k
Avg merge
1d 20h
Merged PRs (30d)
19

Description

https://github.com/GoogleChrome/lighthouse/pull/12973#discussion_r696889448

Full page screenshot looks ok, but the timeline view has incorrect dimensions:
![Screen Shot 2021-08-26 at 4 00 51 PM](https://user-images.githubusercontent.com/6752989/131028157-3863bf1c-534f-4146-819b-046dcfdd31fa.png)

Edit: current workaround for Puppeteer is to use `ignoreDefaultArgs: ['--enable-automation']`

```js
await puppeteer.launch({
ignoreDefaultArgs: ['--enable-automation'],
});
```

Edit2: The above workaround isn't enough if you are using [Chrome for testing](https://developer.chrome.com/blog/chrome-for-testing/) which Puppeteer uses by default now. You can specify a path to a normal Chrome executable as a workaround:

```js
await puppeteer.launch({
ignoreDefaultArgs: ['--enable-automation'],
executablePath: '/path/to/chrome'
});
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.