diff --git a/lib/Launcher.js b/lib/Launcher.js index a8bb9e37..1d39ff79 100644 --- a/lib/Launcher.js +++ b/lib/Launcher.js @@ -178,10 +178,14 @@ class Launcher { helper.removeEventListeners(listeners); if (chromeProcess.pid && !chromeProcess.killed && !chromeClosed) { // Force kill chrome. - if (process.platform === 'win32') - childProcess.execSync(`taskkill /pid ${chromeProcess.pid} /T /F`); - else - process.kill(-chromeProcess.pid, 'SIGKILL'); + try { + if (process.platform === 'win32') + childProcess.execSync(`taskkill /pid ${chromeProcess.pid} /T /F`); + else + process.kill(-chromeProcess.pid, 'SIGKILL'); + } catch (e) { + // the process might have already stopped + } } // Attempt to remove temporary profile directory to avoid littering. try {