GoogleChromeLabs / carlo

Web rendering surface for Node applications
Apache License 2.0
9.31k stars 309 forks source link

app.exit never resolves #108

Open laggingreflex opened 5 years ago

laggingreflex commented 5 years ago

It seems app.exit() never resolves.

Repro:

const carlo = require('carlo');
(async () => {
  const app = await carlo.launch();
  console.log('launched');
  console.log('exiting...');
  await app.exit();
  console.log('exited'); // this never logs
})();

node v11.2.0 carlo v0.9.41 Chrome 71 OS: Windows 10

Possibly related: https://github.com/GoogleChrome/puppeteer/issues/3631, https://github.com/GoogleChrome/puppeteer/issues/2269

Possible workaround: app.browser_.process().kill()

hyjk2000 commented 5 years ago

this.browser_.close() never resolves, thus no exit event emitted after all windows are closed. This happens in Windows 10 but not in macOS.

pavelfeldman commented 5 years ago

The fix is on its way in the Chrome land. But it'll take too long for it to hit Chrome stable, so we might want to apply a workaround before that.

FranckFreiburger commented 5 years ago

Seems to be fixed with the latest chromium Version 75.0.3738.0 (r641577). Can someone else confirm ?