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

Browsers other than electron don't close #152

Open
fregante opened this issue Jan 13, 2020 · 2 comments
Open

Browsers other than electron don't close #152

fregante opened this issue Jan 13, 2020 · 2 comments

Comments

@fregante
Copy link
Contributor

fregante commented Jan 13, 2020

I noticed when using tape-run that Firefox closed but Chrome stayed open (even though the tests completed anyway)

However this doesn't close the tab and window either:

echo "console.log('Hey from ' + location); window.close()" | browser-run --browser firefox

...nor any other browser I tested: chrome and safari.

The interesting part is that this closed the tab once, but on a second call the tab and window stayed open:

echo "var run = require('browser-run');
  var browser = run({browser: 'chrome'});
  browser.pipe(process.stdout);
  browser.end('console.log(location); window.close()');" | node

I'm on macOS 10.15.2, Node v12.14.1

@ashnur
Copy link

ashnur commented Jan 13, 2020

closing chrome is notoriously hard, i've had issue elsewhere and others too with similar problems (just search on github for chrome not closing or kill chrome, or anywhere)

this might or might not be helpful https://unix.stackexchange.com/questions/139830/kill-stop-all-google-chrome-processes

@fregante
Copy link
Contributor Author

fregante commented Sep 7, 2023

I ended up running it with a timeout:

Via cli this is possible as:

timeout 5m npm run tests

Or on macOS: https://stackoverflow.com/questions/3504945/timeout-command-on-mac-os-x

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

No branches or pull requests

2 participants