auchenberg / vscode-browser-preview

A real browser preview inside your editor that you can debug.
MIT License
4.39k stars 153 forks source link

Migrate to new Chrome launcher #123

Closed auchenberg closed 3 years ago

auchenberg commented 4 years ago

Observations from https://github.com/auchenberg/vscode-browser-preview/issues/122

Observations Puppeteer only supports the version of chromium that it is bundled with. That means when we pick a version of chrome off of the users system, there is no guarantee that puppeteer can control it properly. This project only seems to use puppeteer to launch the browser and obtain a CDP connection. That shields us from most of the incompatibilities between puppeteer and various versions of chrome, but there have been times when old puppeteer can't launch and connect to new chrome, and vice versa.

Recommendation I'd recommend switching to something that intentionally supports multiple versions of chrome, like lighthouse's chrome-launcher. Or maybe just steal the launcher code from puppeteer and bake it in, and then if it ever breaks we can modify it ourselves to support multiple versions.