ddev-contrib icon indicating copy to clipboard operation
ddev-contrib copied to clipboard

Update Puppeteer Chrome recipe to support latest ddev web image version and workaround for Apple M1 arch

Open juban opened this issue 3 years ago • 10 comments

The New Solution:

This PR provides a reliable way to make Puppeteer run inside the ddev web container (replacing the current "Puppeteer Headless Chrome support" recipe).

How this PR Solves The Problem:

The previous recipe was not working anymore on latest ddev web container images (> 1.16) because of outdated packages. Also, the current chromium bundled version in Puppeteer is not working on Apple Silicon M1 architecture. This update provides a workaround by overriding the webimage_extra_packages configuration to install a native chromium package which puppeteer will use instead of the bundled one.

Manual Testing Instructions:

Follow instructions provided in the recipe recipes/puppeteer-chromium-support/README.md file.

Related Issue Link(s):

https://github.com/drud/ddev-contrib/issues/192 (Not directly related as the "Headless Chrome for Behat Testing" service seams to work fine on M1)

juban avatar Jan 29 '22 16:01 juban

Please reach out for some other puppeteer users to review this, thanks!

rfay avatar Jan 29 '22 18:01 rfay

@rfay Will do. Do you have anyone in mind I could reach out in the ddev community? @isholgueras or @jonaseberle maybe?

juban avatar Jan 30 '22 11:01 juban

Installing headless browsers into the web container is not for me. I also don't use Puppeteer but selenium hub with chrome and firefox.

jonaseberle avatar Jan 30 '22 12:01 jonaseberle

Current ddev stable is v1.18, not sure why this is trying to support v1.16 and higher?

rfay avatar Jan 31 '22 23:01 rfay

@rfay In fact, the previous recipe stopped working starting ddev 1.16, in other words, the updated recipe will work on ddev 1.16 and upper. Sorry for not being clear.

juban avatar Feb 01 '22 08:02 juban

Thanks for the explanation. I'm not sure the difference is worth explaining, or that it's worth encouraging people to use ddev v1.16 :)

rfay avatar Feb 02 '22 01:02 rfay

Yes, maybe a simple "latest ddev version" would be better, I agree. I wanted to stick to the contribution guidelines which state that the goal of the update should be specified clearly. I'll simplified that.

juban avatar Feb 02 '22 16:02 juban

I fixed the README file accordingly.

juban avatar Feb 03 '22 17:02 juban

Could you please rebase this and test with ddev v1.19.0?

Thanks!

rfay avatar Mar 16 '22 20:03 rfay

The best place for ongoing work is https://github.com/drud/ddev-selenium-standalone-chrome

rfay avatar Dec 31 '22 14:12 rfay