garris / BackstopJS

Catch CSS curve balls.
http://backstopjs.org
MIT License
6.71k stars 603 forks source link

fix: Upgrade Puppeteer to v22.1.0 #1550

Closed jperals closed 7 months ago

jperals commented 7 months ago

Chrome downloads changed their URLs: https://github.com/GoogleChromeLabs/chrome-for-testing/pull/108. This breaks Puppeteer installation until v22.1.0, which was updated to fetch from the new base URL: https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v22.1.0

Tested with npm install under this repo, it didn't work before this change and it works afterwards.

dgrebb commented 7 months ago

@garris this is needed in order to continue triage on #1546, so I'm including in the PR for a new Docker Hub workflow

13.41 npm ERR!   [cause]: Error: Download failed: server returned code 500. URL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/121.0.6167.85/linux64/chrome-linux64.zip

@jperals great catch and fix!

furai commented 7 months ago

This update broke delay functionality. https://github.com/garris/BackstopJS/blob/master/core/util/runPuppet.js#L178 This line is now giving errors.

Puppeteer had breaking changes reported in their release notes: https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v22.0.0

I guess that example scripts in init also need updating.

garris commented 7 months ago

@furai Thank you for catching this! What a bummer. I must say however -- I can't blame them for having this principle -- but it is inconvenient.

If someone would submit a solution as a backfill (e.g. the promise timeout workaround mentioned here https://github.com/puppeteer/puppeteer/pull/11780) I would gladly publish this backward compatibility fix!