OnetapInc / chromy

Chromy is a library for operating headless chrome. 🍺🍺🍺
MIT License
605 stars 41 forks source link

Chrome which is running killed by Chromy #69

Open TechQuery opened 6 years ago

TechQuery commented 6 years ago

As I run the first demo script in ReadMe, my Chrome which is running for other Web pages was killed and restarted with only a confirm popup:

Chrome wasn't closed properly, do you need to recover ?

Then I set launchBrowser: false and run it again, a promise rejected by:

Error: connect ECONNREFUSED 127.0.0.1:9222

But when I removed chromy.close(), everything looked OK. So I think that Chromy kills all processes of Chrome...

(Windows 7 SP1 + Chrome 60, AMD 64)

dotneet commented 6 years ago

That's strange. Chromy uses the port 9222 by default to operate the Chrome process. this port must be open explicitly by chrome flags. chrome does not open the port automatically. therefore Chromy cannot attach to normal Chrome process.

Can you reproduce this problem now for everytime? If so, I think there is a possibility to be caused by chrome's bug.

TechQuery commented 6 years ago

@dotneet sometimes…… Perhaps, headless mode of Chrome is unstable now ?

dotneet commented 6 years ago

Umm... I have not encountered that problem for now. Which version of chromy do you use? What if update chromy to 0.5.3@beta and install chrome canary?