Skip to content

Commit

Permalink
core: fix viewport when running over adb (#14937)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine authored Apr 24, 2023
1 parent 4459f49 commit 6687cc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/gather/navigation-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ async function navigationGather(page, requestor, options = {}) {
// therefore we connect to the browser in the gatherFn callback.
if (!page) {
const {hostname = DEFAULT_HOSTNAME, port = DEFAULT_PORT} = flags;
lhBrowser = await puppeteer.connect({browserURL: `http://${hostname}:${port}`});
lhBrowser = await puppeteer.connect({browserURL: `http://${hostname}:${port}`, defaultViewport: null});
lhPage = await lhBrowser.newPage();
page = lhPage;
}
Expand Down
2 changes: 2 additions & 0 deletions docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ Lighthouse can run against a real mobile device. You can follow the [Remote Debu

You'll likely want to use the CLI flags `--screenEmulation.disabled --throttling.cpuSlowdownMultiplier=1` to disable any additional emulation.

> **Warning:** If you are running Lighthouse 10.x with any chrome version older than M112 (<=M111) you will need to add the `--legacy-navigation` to the `lighthouse` command. See https://github.com/GoogleChrome/lighthouse/issues/14746 for more info.
```sh
$ adb kill-server

Expand Down

0 comments on commit 6687cc4

Please sign in to comment.