Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Karma fails to capture Chrome v93 (but OK with Chrome Headless) #234

Open
craigfowler opened this issue Sep 3, 2021 · 1 comment
Open

Comments

@craigfowler
Copy link

craigfowler commented Sep 3, 2021

Not so much a Karma bug but an issue I imagine others will search for. I figure it's worth reporting it here so that others may find both the problem and workaround together. I have also posted this on StackOverflow with further detail.

I have recently found that following an auto-update to Chrome v93 on our CI build agents, Karma has begun failing to capture Chrome and eventually gives up. In our karma.conf.js file, we were previously using browsers: ['Chrome'].

We have worked around this (and our builds succeed again) by switching to browsers: ['ChromeHeadless'] in our Karma config.

There might also be some kind of issue with Chrome itself which needs fixing, but for those who can manage with ChromeHeadless instead of full Chrome, the workaround should get things going again.

@chekit
Copy link

chekit commented Sep 9, 2021

Actually we started to explore the same issue and the thing that helped was to start use of custom launcher with couple of flags.

Before our karma.conf.js contained the following settings:

module.exports = function (config) {
    config.set({
       ...
       browsers: ['Chrome'],
       ...
       customLaunchers: {
            ChromeHeadlessNoSandbox: {
                base: 'ChromeHeadless',
                flags: ['--no-sandbox']
            }
        },
    });
}       

Now it contains the following changes and tests are started to run again:

module.exports = function (config) {
    config.set({
       ...
       browsers: ['ChromeNoSandbox'],
       ...
        customLaunchers: {
            ChromeNoSandbox: {
                base: 'Chrome',
                flags: [
                    '--no-sandbox',
                ]
            }
        },
    });
}       

P.S.
Added the same comment on StackOverflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants