sindresorhus / open

Open stuff like URLs, files, executables. Cross-platform.
MIT License
3.18k stars 218 forks source link

Does not open when browser is already running or doesn't open at all #79

Open schwarcu opened 6 years ago

schwarcu commented 6 years ago
var url = 'http://localhost/results/';
const opn = require('opn');
opn(url, { app: 'chrome' });

It doesn't open chrome when it's already running. When it's closed it works... sometimes It's weird because it worked before and I did no changes to code and it just stopped opening link when chrome is already running.

Edit: now it doesn't open the link at all or it's completely random.

tanmayrajani commented 6 years ago

Since the module would work differently for different platforms, please mention in which OS this is happening so that opn developers could debug.

I checked this on Ubuntu 16.04 and it works, although I changed app property that you are passing to google-chrome instead of chrome to make it work using xdg-open.

schwarcu commented 6 years ago

It's on Windows 7.

The weird part is that it was working. I didn't touch the code and it just stopped opening the link...