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 not capturing Chrome (Angular project) #3185

Closed
gultyayev opened this issue Oct 14, 2018 · 1 comment
Closed

Karma not capturing Chrome (Angular project) #3185

gultyayev opened this issue Oct 14, 2018 · 1 comment

Comments

@gultyayev
Copy link

Expected behaviour

Should run tests and show them in browser

Actual behaviour

Tries to capture browser with no success. (Browser is opened by Karma with proper url and port)

Environment Details

  • Karma version (output of karma --version): 3.0.0
  • Relevant part of your karma.config.js file
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
  config.set({
    basePath: '',
    frameworks: ['jasmine', '@angular-devkit/build-angular'],
    plugins: [
      require('karma-jasmine'),
      require('karma-chrome-launcher'),
      require('karma-jasmine-html-reporter'),
      require('karma-coverage-istanbul-reporter'),
      require('@angular-devkit/build-angular/plugins/karma')
    ],
    client: {
      clearContext: false // leave Jasmine Spec Runner output visible in browser
    },
    coverageIstanbulReporter: {
      dir: require('path').join(__dirname, '../coverage'),
      reports: ['html', 'lcovonly'],
      fixWebpackSourcePaths: true
    },
    reporters: ['progress', 'kjhtml'],
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome'],
    singleRun: false
  });
};

Steps to reproduce the behaviour

There is no such steps since it's about one specific private project.

Question

Is there a logging or something like that so I could understand why Karma cannot capture Chrome?

The interesting part is that it successfully captures browser in other projects.

Log information

image

@johnjbarton
Copy link
Contributor

Try --log-level=DEBUG

Try running with --no-single-run then opening a browser at the localhost port given. Open devtools and look into your test page. The karma server is waiting for the browser to load: your code may be hanging or erroring the load.

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