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

the process of running cases is blocked since No binary for Chrome browser on your platform, but I have configured two browsers, one is available and one is missing. #3855

Open
hanalice opened this issue Jul 12, 2023 · 0 comments

Comments

@hanalice
Copy link

Expected behaviour

I am working on a Centos environment, it has Firefox by default, and I didn't install Chrome browser. I have install the karma-firefox-launcher in devDependencies. I have browsers: ['Firefox','Chrome'] in karma.conf.js, I suppose it can automatically open Firefox and executes cases, and ignore the Chrome not installed error.

And I have tested, once I remove the Chrome from the browsers, and the require of karma-chrome-launcher, it will execute the cases immediately. So my question is, whether does this happen? I am not sure if it's a bug or work-as-design.

And I have tested on Windows environement ,which has both Firefox and Chrome, it works fine.

Actual behaviour

After I run npm run test, it throws below errors, and indeed, I have no chrome in my environment. It will automatically open firefox, but the cases will not run, it has been blocked.

below is the console output,

[root@localhost]$ npm run test
> ng test

?Browser application bundle generation complete.
12 07 2023 15:14:54.270:WARN [karma]: No captured browser, open http://localhost:9876/
12 07 2023 15:14:54.283:INFO [karma-server]: Karma v6.3.20 server started at http://localhost:9876/
12 07 2023 15:14:54.284:INFO [launcher]: Launching browsers Firefox, Chrome with concurrency unlimited
12 07 2023 15:14:54.288:INFO [launcher]: Starting browser Firefox
12 07 2023 15:14:54.349:INFO [launcher]: Starting browser Chrome
12 07 2023 15:14:54.350:ERROR [launcher]: No binary for Chrome browser on your platform.
  Please, set "CHROME_BIN" env variable.
12 07 2023 15:14:59.124:INFO [Firefox 102.0 (Linux x86_64)]: Connected on socket xH76gJECbuD7YSLcAAAB with id 78973281

this is the browser screenshot,
image

Environment Details

  • karma version "~6.3.0",

  • Relevant part of karma.config.js file

module.exports = function (config) {
  config.set({
    basePath: '',
    frameworks: ['jasmine', '@angular-devkit/build-angular'],
    plugins: [
      require('karma-jasmine'),
      require('karma-firefox-launcher'),
      require('karma-chrome-launcher'),
      require('karma-jasmine-html-reporter'),
      require('karma-coverage'),
      require('@angular-devkit/build-angular/plugins/karma')
    ],
    ...
    port: 9876,
    autoWatch: true,
    browsers: ['Firefox','Chrome'],
    singleRun: false,
    restartOnFileChange: true
  });
};

Steps to reproduce the behaviour

  1. install the karma-firefox-launcher in devDependencies
  2. add Firefox into browsers option, and add require of karma-firefox-launcher in karma.conf.js
  3. run npm run test in a Centos ssh terminal
@hanalice hanalice changed the title the process of running cases is blocked since No binary for Chrome browser on your platform, but I have configure two browsers, one is available and one is missing. the process of running cases is blocked since No binary for Chrome browser on your platform, but I have configured two browsers, one is available and one is missing. Jul 12, 2023
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

1 participant