Yanosky Rios La Hoz
Yanosky Rios La Hoz

Reputation: 41

PuppeteerSharp: Failed to launch Chromium

The error started to happen after updating google chrome to the latest version: 89.0.4389.82 (Official Build) (64-bit). OS: Windows 10

Error:

PuppeteerSharp.ChromiumProcessException: 
Failed to launch Chromium! [0309/160320.924:ERROR:os_crypt_win.cc(70)] Failed to encrypt: The system cannot find the file specified. (0x2)

Help, please!

Upvotes: 3

Views: 7371

Answers (2)

Tim_Mac
Tim_Mac

Reputation: 166

after much faffing around trying to get this working in an asp.net app running in a production server environment (windows server 2019 in azure VM), i wanted to elaborate on vidya's answer "upgrade google chrome manually":

set the version number manually based on the latest version on this URL: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win_x64/

in my case that version is 890410. set your code to use this version instead of DefaultChromiumRevision

const string ChromiumRevision = "890410";
var options = new BrowserFetcherOptions();
options.Path = HttpContext.Current.Server.MapPath("/App_Data");
var bf = new BrowserFetcher(options);
await bf.DownloadAsync(ChromiumRevision);   
string exePath = bf.GetExecutablePath(ChromiumRevision); 
var browser = await Puppeteer.LaunchAsync(new LaunchOptions
{
   Headless = true,
   ExecutablePath = exePath,
   Args = new string[]{"--disable-gpu","--no-sandbox"}
}); 

Upvotes: 1

vidya
vidya

Reputation: 69

I too got the same error while launching the chrome in the server using an application. I did upgrade google chrome manually and everything worked fine as normal.

Upvotes: 1

Related Questions