GoogleChromeLabs / carlo

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

createWindow fails silently when invalid args are provided #159

Open javiercbk opened 5 years ago

javiercbk commented 5 years ago

The following snippet reproduce the error

const carlo = require('carlo');

(async () => {
  // Launch the browser.
  const app = await carlo.launch({
    // removing the following args solves the issue with createWindow
    args: [
      '--load-extension=./invalid-extension',
      '--disable-extensions-except=./invalid-extension'
    ]
  });

  // Terminate Node.js process on app window closing.
  app.on('exit', () => process.exit());

  // this script should open two windows, one is the carlo window the other is an extra chrome window.
  // with the args provided (which are obviously wrong)  the application fails to create this window
  // but does not throw any exception
  await app.createWindow();
})();