Puppeteer Calling Browser.close() randomly throws an a error that is not catchable – Error: EPERM: operation not permitted

I have stripped out all of the code in my app to isolate this issue and it can be reproduce by only launching the browser and calling browser.close(). The error thrown is [Error: EPERM: operation not permitted, unlink ‘C:UsersxxxAppDataLocalTemppuppeteer_dev_chrome_profile-vHZSchCrashpadMetrics-active.pma’] and it hangs the process. I need to be able to catch this error so the server can continue to process requests, however this error cannot be caught. How can I catch/prevent this error?

The error is thrown from the browser.close() call as mentioned is possible in the documentation here. I wrapped an additional try catch within the finally around that call and it doesn’t catch but throws the error.

try{
 browser = await puppeteer.launch({
   args: ['--no-sandbox', '--unlimited-storage', '--disable-gpu', '--disable-dev-shm-usage', '--full-memory-crash-report', '--disable-setuid-sandbox'],
   headless: true,
   pipe: true
 }).catch((err) => {
   console.log('could not launch browser', err)
 });
} catch(err) {
   console.error(err);
} finally {
  try{
    if(browser) {
      console.log('closing down browser')
      const pages = await browser.pages();
      console.log(pages.length)
      await Promise.all(pages.map(page => page.close()))
      console.log('closed pages')
      // if (browser && browser.process() !== null){
      //     browser.process().kill('SIGINT');
      // }
      await browser.close().catch((err) => console.log(err));
      console.log('finished closing')
    }
  }
  catch(error){
    console.log('this caught', error)
  }    
}

The commented out lines for killing the process do prevent the error from being thrown, however I am on a windows machine and this does not actually kill the process, although I imagine this method works on linux.