Browser error not capturing exception and closing exe #43

Closed
opened 2025-07-29 02:45:00 +00:00 by melithine · 3 comments
Collaborator
System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'C:\Users\star\AppData\Local\PuppeteerSharp\Chrome\Win64-132.0.6834.83\chrome-win64\chrome.exe' with working directory 'C:\Users\star\of-dl'. The system cannot find the file specified.
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at PuppeteerSharp.States.ProcessStartingState.StartCoreAsync(LauncherBase p) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/States/ProcessStartingState.cs:line 68
   at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 77
   at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 110
   at OF_DL.Helpers.AuthHelper.GetAuthFromBrowser(Boolean isDocker)
```2025-07-28 18:07:45.226 -04:00 [ERR] Error getting auth from browser System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'C:\Users\star\AppData\Local\PuppeteerSharp\Chrome\Win64-132.0.6834.83\chrome-win64\chrome.exe' with working directory 'C:\Users\star\of-dl'. The system cannot find the file specified. at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at PuppeteerSharp.States.ProcessStartingState.StartCoreAsync(LauncherBase p) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/States/ProcessStartingState.cs:line 68 at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 77 at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 110 at OF_DL.Helpers.AuthHelper.GetAuthFromBrowser(Boolean isDocker) ```
Collaborator

I'm not sure what would cause this. The call to AuthHelper.GetAuthFromBrowser is wrapped in a try/catch.

OF DL/Program.cs Lines 42 to 55 in 37fae9185a
try
{
AuthHelper authHelper = new();
Task setupBrowserTask = authHelper.SetupBrowser(runningInDocker);
Task.Delay(1000).Wait();
if (!setupBrowserTask.IsCompleted)
{
AnsiConsole.MarkupLine($"[yellow]Downloading dependencies. Please wait ...[/]");
}
setupBrowserTask.Wait();
Task<Auth?> getAuthTask = authHelper.GetAuthFromBrowser();
Task.Delay(5000).Wait();

I'm not sure what would cause this. The call to `AuthHelper.GetAuthFromBrowser` is wrapped in a try/catch. https://git.ofdl.tools/sim0n00ps/OF-DL/src/commit/37fae9185a7e78155705c43e3039bdbfd4e69c65/OF%20DL/Program.cs#L42-L55
Author
Collaborator

Maybe PuppeteerSharp calls exit directly and its not being caught as a result?

Maybe PuppeteerSharp calls exit directly and its not being caught as a result?
Collaborator

That's possible, but if that's the case, there really isn't anything we could do about it. Hopefully transitioning to Playwright will fix this issue.

That's possible, but if that's the case, there really isn't anything we could do about it. Hopefully transitioning to Playwright will fix this issue.
melithine added the
bug
code-submitted
triaged-and-escalated
labels 2025-11-29 20:21:50 +00:00
whimsical-c4lic0 added this to the Development Board project 2026-02-19 18:57:38 +00:00
whimsical-c4lic0 moved this to In Review in Development Board on 2026-02-19 18:57:48 +00:00
whimsical-c4lic0 moved this to Pending Release in Development Board on 2026-02-20 14:47:34 +00:00
whimsical-c4lic0 moved this to Done in Development Board on 2026-02-27 00:56:25 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sim0n00ps/OF-DL#43
No description provided.