Error about "Chromium revision is not downloaded. Run BrowserFetcher.DownloadAsync or download Chromium manually"
See original GitHub issueDescription
There is a method ,named OpenChromiumPage(), which open Chromium page as headless=true. While opening chromium, download zip file with revision number but its size 0KB.
After that, the method threw an exception with message says that “Chromium revision is not downloaded. Run BrowserFetcher.DownloadAsync or download Chromium manually”
Sometimes zip file extracted but when try to download chromium, giving the same error.
Should I update or add any code to below method?
My code located below.
public static async Task<Page> OpenChromiumPage()
{
var browserFetcher = new BrowserFetcher(new BrowserFetcherOptions
{
Path = "C:\\Chromium"
});
await browserFetcher.DownloadAsync(BrowserFetcher.DefaultRevision);
var browser = await Puppeteer.LaunchAsync(new LaunchOptions
{
Headless = true,
Timeout = 0
});
return await browser.NewPageAsync();
}
Expected behavior:
Zip file extracted and Chromium works
Actual behavior:
“Chromium revision is not downloaded. Run BrowserFetcher.DownloadAsync or download Chromium manually”
Versions
Version of PuppeteerSharp : v1.19.0 but latest versions give same result. .NET runtime and version: .NET framework 4.6.2
Additional Information
I tried to set a value for ExecutablePath property which is chromium.exe file path. Then download and works.
Is there any other solution or What should I update my code?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
You have to pass
ExecutablePath
toPuppeteer.LaunchAsync
. It will look like this:If you do not pass
Path
in BrowserFetcher, the you do not need to addExecutablePath
because it will automatically look into default download location.BrowserFetch will always create its own folder. You can get that folder if you call
GetRevisionInfo
and get theExecutablePath
property from there.