-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
Callback is called immediately when opening a webpage in chrome with chrome already open #18
Comments
What Node.js and OS version are you on? Works correctly for me on OS If you're on Windows, please read the docs:
|
node version: 0.12.7 |
Works correctly for me on that exact same setup. |
Im running chrome 45.0.2454.101 (Official Build) (64-bit). Tried reinstalling chrome and Im still having the same issue. Just to be clear: I open a single chrome window, run 'node index.js' (https://gist.github.com/sgen/3538b746bfa23199bf91). Chrome opens a new tab in the same window and 'closed' is immediately printed to the terminal. |
I believe, I just can't reproduce with the exact same setup and code. Are you sure you're on the latest |
Yes I am (3.0.2) |
This happens for me as well. Callback is immediate. Chrome 45.0.2454.101 m (x86), v3.0.2 of opn on Windows 7 x64 Code looks like:
Error is undefined |
This is obviously not an answer as I am just trying to give more information to people to hopefully help. That being said this also doesn't seem to be an issue with opn itself and, while useful for people to find, should probably be closed. Same issue in C# A more in depth explanation into what is happening FWIW, the --user-data-dir flag is supposed to solve this, but I couldn't get that to work on any language, so if anyone is able to get this to work, please post for others to see (or if relatively trivial, create a pull for @sindresorhus). |
Bumping this as it's still happening. Any developments or at least ways to circumvent this? |
In my case, I'm trying to open an Excel file. Whenever I open the file while another file is open, it will call the callback immediately and not wait for the file to be closed. I want to detect when the file is closed so that I can read it afterwards. I created a repo for this issue with excel files if anyone interested in reproducing it: https://github.com/hyalkaf/nodejs-opening-multiple-excel-file-problem-opn |
Hi, Sadly the callback is called immedietly after the window opened if an instance of outlook is already running. This also initially occurred for excel files. I then set the I think the problem is with that "/f" argument which is used to open an msg file. But without that argument I'm not able to open my ".MSG" file. Versions: Code: |
Reproduce by opening chrome and then calling opn('http://google.com/', function() { console.log('closed'); });
The callback is immediately called and chrome remains open.
The text was updated successfully, but these errors were encountered: