Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BrowserFetcher.DownloadAsync(BrowserTag) throws a 404 exception (Chrome) #2447

Closed
Dryvnt opened this issue Feb 15, 2024 · 3 comments · Fixed by #2448
Closed

BrowserFetcher.DownloadAsync(BrowserTag) throws a 404 exception (Chrome) #2447

Dryvnt opened this issue Feb 15, 2024 · 3 comments · Fixed by #2448

Comments

@Dryvnt
Copy link

Dryvnt commented Feb 15, 2024

Description

Attempting to fetch browser with a BrowserTag currently fails. Downloading without an explicit BrowserTag works fine.

I have tested all BrowserTags and reproduced the error for

  • Stable
  • Latest
  • Canary

Complete minimal example reproducing the issue

using PuppeteerSharp;

using var browserFetcher = new BrowserFetcher();
// Resolved URL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/121.0.6167.85/win64/chrome-win64.zip
// Works fine
await browserFetcher.DownloadAsync();
// Resolved URL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/121.0.6167.184/win64/chrome-win64.zip
// Exception: 404
await browserFetcher.DownloadAsync(BrowserTag.Stable);

Expected behavior:

Calling DownloadAsync should not throw an exception when providing an explicit release channel tag.

Actual behavior:

Calling DownloadAsync with an explicit release channel tag throws an exception.

Versions

  • Which version of PuppeteerSharp are you using?
    • Experienced on 12.0.0
    • Reproduced on 14.0.0
  • Which .NET runtime and version are you targeting? E.g. .NET framework 4.6.1 or .NET Core 2.0.
    • net8.0

Additional Information

As the comments in the example shows, I did some light digging. It seems that the automatic resolution of a build id provides a build id that is not present on the server we attempt to download from (https://edgedl.me.gvt1.com/edgedl/chrome-for-testing/...).

I don't know who is in charge of keeping the builds on that server up-to-date. I understand that it might not be your responsibility, but perhaps something could still be done to attempt to mitigate intermittent failure.

Update:
It seems Google changed where they upload builds to https://storage.googleapis.com/chrome-for-testing-public/, and newer assets are no longer uploaded to the old server. It looks like they wanted to do this in a way that avoids breakage, but shit happens. Regular puppeteer is also suffering. See related issues in comment for more.

@Dryvnt Dryvnt changed the title BrowserFetcher.DownloadAsync(BrowserTag) throws an exception (Chrome) BrowserFetcher.DownloadAsync(BrowserTag) throws a 404 exception (Chrome) Feb 15, 2024
@Dryvnt
Copy link
Author

Dryvnt commented Feb 15, 2024

Related:
puppeteer/puppeteer#11925
puppeteer/puppeteer#11923
GoogleChromeLabs/chrome-for-testing#108

@kblok
Copy link
Member

kblok commented Feb 15, 2024

Working on it!

@kblok
Copy link
Member

kblok commented Feb 15, 2024

@Dryvnt v14.1.0 is cooking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants