ddev-contrib
ddev-contrib copied to clipboard
Update Puppeteer Chrome recipe to support latest ddev web image version and workaround for Apple M1 arch
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)
Please reach out for some other puppeteer users to review this, thanks!
@rfay Will do. Do you have anyone in mind I could reach out in the ddev community? @isholgueras or @jonaseberle maybe?
Installing headless browsers into the web
container is not for me. I also don't use Puppeteer but selenium hub with chrome and firefox.
Current ddev stable is v1.18, not sure why this is trying to support v1.16 and higher?
@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.
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 :)
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.
I fixed the README file accordingly.
Could you please rebase this and test with ddev v1.19.0?
Thanks!
The best place for ongoing work is https://github.com/drud/ddev-selenium-standalone-chrome