Closed shirshak55 closed 6 months ago
https://github.com/puppeteer/puppeteer/issues/7740 has some interesting background discussion about this.
I suspect if we switch to Playwright, it'll still have the same problem? Basically there needs to be some way to automatically download the browser and nobody really has that set up for arm64 yet seemingly. If not, I'm open to that I suppose. I'd rather keep things simple if we can, but it would be nice to have a setup that worked out of the box for everybody.
As an alternative, it looks like you can make this work by just setting PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
. If you do so, the integration tests probably won't run (unless you also install Chromium and correctly configure the path, however that works) but to be honest you don't need those locally, they're only really important as a final check in CI, to make sure we never accidentally release a UI that doesn't load at all.
@pimterry i am not getting it. I have used playwright countless time in macos m1 and it doesn't give any error. Playwright download browser and manages itself. I don't know about puppeteer.
I don't know about their different approaches to be honest. They should both have similar constraints though, so if Playwright successfully downloads & installs Chrome then Puppeteer can probably do the same, it's just nobody has got around to adding specific support yet.
Does Playwright definitely install Chrome for you, or is it that it uses the existing Chrome you have locally?
In general puppeteer is the more widely used & more mature option I think... But not a big difference, both fairly similar overall popularity. My impression is it's more generic & flexible, for remote controlling browsers in general, while Playwright is a bit more focused & complex, providing in depth tools to handle browser integration testing specifically.
Have you tested the env var above? Does that work as a workaround?
@pimterry
Yes, playwright installs chrome for me and manages chrome automatically.
I think that environment variable works.
I think we can use playwright instead of puppeteer and seems to be well maintained.