From 868d8c4ba74fb0a41fa6db18ce35c12f3168781e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Mon, 16 Feb 2026 18:39:58 -0300 Subject: [PATCH] Fix ChromeHeadlessShell launch crash with "Invalid browser" error Add SupportedBrowser.ChromeHeadlessShell to the Process switch in Launcher so it uses ChromeLauncher, matching the buildId switch above. Fixes #2967 Co-Authored-By: Claude Opus 4.6 --- lib/PuppeteerSharp/Launcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PuppeteerSharp/Launcher.cs b/lib/PuppeteerSharp/Launcher.cs index 5e9811547..8bbdcc465 100644 --- a/lib/PuppeteerSharp/Launcher.cs +++ b/lib/PuppeteerSharp/Launcher.cs @@ -79,7 +79,7 @@ public async Task LaunchAsync(LaunchOptions options) Process = options.Browser switch { - SupportedBrowser.Chrome or SupportedBrowser.Chromium => new ChromeLauncher(executable, options), + SupportedBrowser.Chrome or SupportedBrowser.Chromium or SupportedBrowser.ChromeHeadlessShell => new ChromeLauncher(executable, options), SupportedBrowser.Firefox => new FirefoxLauncher(executable, options), _ => throw new ArgumentException("Invalid browser"), };