protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Chrome driver process does not auto-close (hangs around afterwards) when running local tests

Open costescuandrei opened this issue 7 years ago • 34 comments

See versions/conf/test spec/example from #4689 which are the same as for this issue.

On that same example that also runs a chrome test, after each time I run the test I see one more "chromedriver_2.35.exe (32 bit)" process that never closes in Task Manager. (it is automatically started by protractor, I don't manually start chromedriver nor webdriver-manager). It should automatically stop to not leak processes as it does automatically start.

Because of that some npm/webdriver update operations fail (can't delete the files/folders). I have to manually kill all the chromedriver_2.35.exe processes to be able to switch to a different protractor version for example.

This does not happen with Protractor 4.0.11. So it seems to be a regression somewhere along the way.

costescuandrei avatar Feb 02 '18 13:02 costescuandrei

Note: sometimes I have to restart Task Manager to see the lingering chromeDriver processes.

costescuandrei avatar Feb 05 '18 14:02 costescuandrei

I have the same issue both with chromedriver and IEDriver. Chromedriver: 2.36 IEDriver: 3.11.1 Protractor: 5.3.0 Webdriver-manager: 12.0.6

marekpla avatar Mar 14 '18 09:03 marekpla

same issue here.

Chrome 65.0.3325.162 Protractor 5.3.0 Chromedriver 2.37 Selenium server 3.11.0

StasGrishaev avatar Mar 19 '18 12:03 StasGrishaev

Same issue for me.

Chrome 65.0.3325.162 Protractor 5.3.0 Chromedriver 2.37 Selenium server 3.11.0

MihailSeykov avatar Mar 29 '18 07:03 MihailSeykov

Same issue for me.

Chrome 65.0.3325.162 Protractor 5.3.0 Chromedriver 2.37 Selenium server 3.11.0

gergoszucs avatar Apr 03 '18 09:04 gergoszucs

Same Here

Chrome : 65.0.3325.181 Protractor : 5.1.2 Chromedriver 2.37 Selenium server 3.11.0

Pierrehb avatar Apr 05 '18 13:04 Pierrehb

Well, I too have the same issue Chrome : 62.0.3202.94 Protractor : 5.1.2 Chromedriver 2.35 Selenium server 3.9.1 Since we have constraints to upgrade Chrome, I am still using 62 and chromedriver 2.35

vvedachalam avatar Apr 09 '18 10:04 vvedachalam

Same problem with same versions as above. Is there a solution ???
Now I have to do call taskkill /im chrome.exe /f after running a test not really what I want :-)))

bruindav avatar Apr 11 '18 14:04 bruindav

Same problem with me , is there any solution? Chrome version : 65.0.3325.181 Protractor Version : 5.2.0 Chromedriver : 2.37

Tehaseen avatar Apr 16 '18 07:04 Tehaseen

@sjelin any update on this issue ? still actual on Chrome 66, 2.38 chromedriver

StasGrishaev avatar Apr 25 '18 17:04 StasGrishaev

For me chrome.exe process leaves hanging and consumes 30% of CPU. Though the chrome window is automatically closed. Node 8.9.3 protractor 4.0.4 chromedriver 2.38 Chrome 65.0.3325.181 webdriver manager 12.0.6 selenium standalone 3.11.0 Windows 8.1

Not sure when this started happening... Mb after some chrome or chromedriver update...
Around 1 month ago everything was fine with the same protractor 4.0.4.

DarthVanger avatar Apr 26 '18 15:04 DarthVanger

For me chrome.exe process leaves hanging and consumes 30% of CPU. Though the chrome window is automatically closed.

Same here

Pierrehb avatar Apr 26 '18 15:04 Pierrehb

For me chrome.exe process leaves hanging and consumes 30% of CPU. Though the chrome window is automatically closed.

+1

StasGrishaev avatar Apr 26 '18 15:04 StasGrishaev

We were getting that error recently as well. I found that creating chrome driver with the "no-sandbox" argument will create extra chrome processes that hang around. We fixed it by removing this flag. Full disclosure, we aren't using protractor. I just stumbled on this when searching for solutions.

phdrumlineka avatar Apr 26 '18 16:04 phdrumlineka

@phdrumlineka Thanks for that info. It seems that by providing the directConnect: true parameter in the conf.ts for Protractor, the chromedriver.exe will be closed after the test completes!

gergoszucs avatar Apr 27 '18 08:04 gergoszucs

Thanks for the info . directConnect: true parameter works only for Chrome and Fire Fox browsers and does not support IE11 browser I have been using this from past 11 days . Its working awesome for Chromedriver

Reference link for the syntax on dirrect connect : https://github.com/angular/protractor/blob/master/docs/server-setup.md

Any solutions for IE driver will be more help full.

Many Thanks in advance

Tehaseen avatar Apr 27 '18 08:04 Tehaseen

@phdrumlineka it works, thanks !

StasGrishaev avatar Apr 27 '18 10:04 StasGrishaev

directConnect might work because it does things a bit differently. Older versions used to work without it - so I still think it should get fixed.

costescuandrei avatar Apr 27 '18 11:04 costescuandrei

@phdrumlineka Thanks for hint, no more extra chrome processes if removing "no-sandbox" argument. Tried with chromedriver 2.38 (64bit) on Windows.

radulucian avatar May 02 '18 10:05 radulucian

Related to #4572

danwulff avatar May 22 '18 18:05 danwulff

An issue exists within chromium here: https://bugs.chromium.org/p/chromedriver/issues/detail?id=2311 It got changed from "unconfirmed" to "started" on May 1st. More traffic on that ^ issue would be helpful.

danwulff avatar May 22 '18 19:05 danwulff

For me it was solved by removing the no-sandbox option

capabilities: browserName: 'chrome' shardTestFiles: false maxInstances: 2 chromeOptions: 'args': ['no-sandbox']

bruindav avatar May 22 '18 20:05 bruindav

For me it was solved by removing the no-sandbox argument

capabilities: browserName: 'chrome' shardTestFiles: false maxInstances: 2 chromeOptions: 'args': ['no-sandbox']

2018-04-25 19:08 GMT+02:00 StasGrishaev [email protected]:

@sjelin https://github.com/sjelin any update on this issue ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular/protractor/issues/4690#issuecomment-384362217, or mute the thread https://github.com/notifications/unsubscribe-auth/AQn6vPThFYbOCiKqU_eT5wXeB_5x_8uFks5tsK10gaJpZM4R3JjC .

bruindav avatar May 22 '18 20:05 bruindav

It might be worth noting for people. Removing the no-sandbox option does not work for dockerized chrome instances since running as root is not supported. e.g. you'll get the error "Running as root without --no-sandbox is not supported."

danwulff avatar Jun 06 '18 19:06 danwulff

I'm having the same problem, but it appears that chromedriver, geckodriver and IEdriverServer stay lingering after tests.

I believe a temporary but bad solution is to kill the processes before each test.

Note: I'm not using driver quit in my specs.

Node 8.11.3 protractor 5.4.1 chromedriver 2.42 geckodriver 0.22 IEdriverServer 3.14 Chrome 69.0.3497.100 Firefox 62.0 IE 11.0.9600.18893 selenium standalone 3.14.0 Windows 7

NicoForce avatar Sep 28 '18 21:09 NicoForce

Same here. Windows 10 and Linux aswell, Chromedriver 2.44.609551 Removing "--no-sandbox" is not an option, because DevToolsActivePort file doesn't exist error will appear.

ykcycer avatar Nov 29 '18 10:11 ykcycer

This is also a problem on Windows 10 for me, and what is more of a concern is that IEDriverServer locks the node_modules folder from being deleted.

Coder2012 avatar May 23 '19 13:05 Coder2012

It looks like the related Chromedriver issue has been closed: https://bugs.chromium.org/p/chromedriver/issues/detail?id=2311

Supposedly Chrome version 71 or above resolves the issue.

Has anyone tried Chrome 71+?

danwulff avatar May 28 '19 20:05 danwulff

It seems the issue still persists with ChromeDriver 75.0.3770.90 (stored in C:\Windows).

Executing through IntelliJ IDEA 2019.1.3 with Selenium Pytest FW, Python 3.7 on Windows 10 Pro x64 (10.0.17134), NodeJS 11.12.0

R3gi avatar Jun 17 '19 09:06 R3gi

I am also experiencing the issue with 75.0.3770.90. I am running it from a git bash terminal inside VSCode and the VSCode instances stick around as well, so I end up with 30+ instances open until I task manager close them.

maplion avatar Jun 21 '19 04:06 maplion