Right now launchpad launch browsers within nodejs global process instances and just stops that process but the browser instance remains running and this leads to not close the browser if is launched next time.
Solution:
Make multi-profile browsers clean by default, or make an update the right configuration.
Run each browser instance in a separate clean profile, each profile can have its own directory.
The problem:
For now This happens with
Google Chrome
andFirefox
.Given the user has
Chrome
already opened, whenChrome
is launched it doesn't get closed even whenInstance.prototype.stop
is invoked .clean
option seems doesn't work.Right now
launchpad
launch browsers withinnodejs
globalprocess
instances and just stops that process but the browser instance remains running and this leads to not close the browser if is launched next time.Solution:
Make multi-profile browsers clean by default, or make an update the right configuration.
Run each browser instance in a separate clean profile, each profile can have its own directory.
Detach the child spawned browser instance, change this to: https://github.com/bitovi/launchpad/blob/c449a8e7930bd8bfe75e53f2ce90626035f3ef1d/lib/local/instance.js#L31
to
spawn(cmd, args, { detach: true, stdio: ['ignore', outFile, errFile] }})
Like this the browser spawned child processes can be killed as follow:
proccess.kill(-childProcess.pid)
I suggest to not extend
Instance
type fromnode
EventEmitter
, just usenode
globalprocess
instead which is an instance ofEventEmitter
.