karma-runner / karma-chrome-launcher

A Karma plugin. Launcher for Chrome and Chrome Canary.
MIT License
469 stars 119 forks source link

Google Chrome 78.0.3904 (Mac OS X 10.15.1) requires --disable-ipc-flooding-protection command-line argument #217

Open ajvincent opened 5 years ago

ajvincent commented 5 years ago

The latest version of Google Chrome on MacOS has begun an obscure throttling of page loads. I have a testcase of fully checked in code which breaks using Google Chrome, but adding the --disable-ipc-flooding-protection command-line argument manually into index.js of this project repairs my tests.

Steps to reproduce:

  1. git clone https://github.com/ajvincent/es-membrane
  2. cd es-membrane
  3. npm install
  4. npm run gui-tests # note: this will launch both Mozilla Firefox and Google Chrome, per my project's gui-tests.conf.js

Expected results: All tests pass

Actual results:

Chrome 78.0.3904 (Mac OS X 10.15.1) DistortionsRules .validateConfiguration for non-functions truncateArgList being 0 FAILED Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

When I modify karma-chrome-launcher's index.js to include this command-line argument at line 36:

    return [
      '--disable-ipc-flooding-protection',
      '--user-data-dir=' + userDataDir,
      '--no-default-browser-check',
      // ...

the test passes.

When I instead modify es-membrane's gui-tests.conf.js to set singleRun: false, and open the Google Chrome developer tools, I find an obscure warning in the developer tools console:

Throttling navigation to prevent the browser from hanging. See https://crbug.com/882238. Command line switch --disable-ipc-flooding-protection can be used to bypass the protection IFrameLoadPromise @ VM29 promiseTypes.js:13

When I open the link, I end up on a "Permission denied" page for that particular bug. I thus have no more insight to offer on that front.

Through an online search, I found https://github.com/cypress-io/cypress/issues/5132 , which supports my conclusion.

Older versions of Google Chrome (on a mid-2012 MacBook Pro that I no longer have) did not have this bug.