If I start Chromy and the Mocha test somehow crashes, Chromy will not close the the browser and if i run the test again, aka firing up a new Chromy instance I get: Error: Failed to launch a browser.
This is on macOS 10.13.2 with Chrome Version 63.0.3239.132 (Official Build) (64-bit)
Details
I get this error whenever the Chrome instance fails to close after a test.
Error: Failed to launch a browser.
at Chromy.start$ (node_modules/chromy/dist/index.js:184:21)
at tryCatch (node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
at tryCatch (node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
at invoke (node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:152:20)
at node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:162:13
at <anonymous>
The solution i'm using right now is to call kill $(pgrep -f "Chrome.*--headless.*--window-size=1920,1080") before every test, but that seems very hacky.
Bug
If I start Chromy and the Mocha test somehow crashes, Chromy will not close the the browser and if i run the test again, aka firing up a new Chromy instance I get:
Error: Failed to launch a browser.
This is on macOS 10.13.2 with Chrome Version 63.0.3239.132 (Official Build) (64-bit)
Details
I get this error whenever the Chrome instance fails to close after a test.
This is my Mocha setup:
The solution i'm using right now is to call
kill $(pgrep -f "Chrome.*--headless.*--window-size=1920,1080")
before every test, but that seems very hacky.I can send more details if needed.