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

Chrome (52) have not captured, killing #74

Open
Hadev-JHH opened this issue Jul 27, 2016 · 13 comments
Open

Chrome (52) have not captured, killing #74

Hadev-JHH opened this issue Jul 27, 2016 · 13 comments
Labels

Comments

@Hadev-JHH
Copy link

Hadev-JHH commented Jul 27, 2016

As of an update to Chrome 52 our CI buildserver is having issues running our karma specs.

below is a log:

INFO [karma]: �[39mKarma v1.1.1 server started at http://localhost:9876/
INFO [launcher]: �[39mLaunching browser Chrome with unlimited concurrency
INFO [launcher]: �[39mStarting browser Chrome
WARN [launcher]: �[39mChrome have not captured in 60000 ms, killing.
INFO [launcher]: �[39mTrying to start Chrome again (1/2).
WARN [launcher]: �[39mChrome have not captured in 60000 ms, killing.
INFO [launcher]: �[39mTrying to start Chrome again (2/2).
WARN [launcher]: �[39mChrome have not captured in 60000 ms, killing.
ERROR [launcher]: �[39mChrome failed 2 times (timeout). Giving up.

Details:
Karma 1.1.1
Karma-Chrome-Launcher 1.0.1
Chrome 52

Kind Regards

@dignifiedquire
Copy link
Member

Chrome 52 works fine on my machine. This is probably due to other factors in your environment.

@edgahan
Copy link

edgahan commented Aug 1, 2016

@Hadev-JHH You may be experiencing this issue: #73 (comment)

@Hadev-JHH
Copy link
Author

That sure seems like the same issue

@andradf
Copy link

andradf commented Aug 10, 2016

Having the same issue.

@JoosjeBoon
Copy link

Having the same issue.
Windows 7
Chrome 61
Karma 1.7.1
Karma-chrome-launcher 2.2.0

Works fine on Linux.

@chrismwendt
Copy link

chrismwendt commented Sep 27, 2017

Make sure your CHROME_BIN environment variable points to a real binary. See my write-up here for other troubleshooting steps: karma-runner/karma#1206 (comment)

@Tin-Nguyen
Copy link

Got the same issue, any solution to fix it? As I know, since if we have 2 processes running at the same time, I will experience the issue on the second process that was trying to connect to Chrome I guess

@abruyat
Copy link

abruyat commented Feb 6, 2018

Hi! I still have this issue. BUT, everything is working localy on my laptot. I have this issue when runing my test on a docker container.

@zebslc
Copy link

zebslc commented Mar 14, 2018

To fix this I had to add the option '--no-sandbox' to the chrome flags part as chrome didn't seem to be running with enough security. Browsing with chrome in this way is heavily frowned on as it isn't safe but given that the browser starts and ends completely under automation with extensions off I consider it a low risk.

My Karma conf now looks like:

browsers: ['ChromeHeadless'],
singleRun: true,
customLaunchers: {
  ChromeHeadless: {
    base: 'Chrome',
    flags: [
      '--headless',
      '--disable-gpu',
      '--disable-translate',
      '--disable-extensions',
      '--no-sandbox',  // Added to fix an issue where of Failed to connect to chrome browser
     '--remote-debugging-port=9222',
    ],
  }
} 

@Chido42
Copy link

Chido42 commented Mar 28, 2018

After a long investigation the error was due to having Virtualbox installed with the VirtualBox Host-Only Network interface enabled.

Once this network interface disabled no more issue.
From our investigation it seems this interface slows down the connection a lot and since the timeout to connect it hardcoded inside the lib it fails to connect.

While changing the hardcoded timeout value (by a huge number) it also solved the issue.
Not sure if an issue should be also opened to virtualbox.

@buddyackerman
Copy link

buddyackerman commented May 22, 2018

Using Chrome v66. I've had Virtual Box on my machine for a quite a while and haven't had a problem until today (and I don't have VB running while trying to run my tests). Didn't change any of my configuration, it just started failing with the reported error. I tried @zebslc's solution and it didn't work either.

This is a Windows 10 (64 bit) machine using Node.js version 9.5.0, Angular CLI version 1.6.8, Angular version 5.2, Karma version 2.0.0. None of which have changed between this working and it now not working.

Update: This is not even a Chrome issue as I installed the Firefox launcher plugin and the same thing happens.

@buddyackerman
Copy link

I seemed to have solved the problem by installing the latest version (2.0.2). I suspect that the Karma installation had become corrupt and even a re-install of the existing version likely would have fixed the problem.

@philly-vanilly
Copy link

If you have this problem in an IDE (for me IntelliJ), try running the test(s) over CLI instead of the IDE-run-config.

For me Chrome was able to get captured this way and after deleting the old runtime configs, I could execute Karma-tests over IDE again

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

No branches or pull requests