-
Notifications
You must be signed in to change notification settings - Fork 39
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
Does not return any MAC addresses when offline #2
Comments
I have tested the library in a Windows XP machine and it worked quite well. Which version of node/iojs are you using? Could you give me the output of |
Using Node v0.10.38 from my Command Prompt, I get the following: When connected to hardwire internet:
When I disconnect the hardwire, I see this:
So yes, this is Node 0.10.x -- but I also notice the problem when running the command from inside the Electron shell, which (I think) runs the latest io.js. |
Hm, okay. So the way it currently works is:
In your case it fails in (1). Maybe I should add some means of getting that list of networkInterfaces in an OS-dependent manner if the list in (1) is empty. |
Just curious if you made any progress on this. I'm finally circling back to the issue myself, so please let me know if there is anything else I can help with. |
I do not have access to a windows machine right now :-( so I could not start to work on that. It's still on my radar though. |
This is an issue across all OS's (OSX El Capitan, Ubuntu 14.04, Windows 7 and Windows 10). Heres a method which works across all those listed OS (Its ugly but works).
Loopback Names
OSX need to remove loopback
Ubuntu need to remove loopback
Windows no need to remove loopback and it isn't returned in this command
|
For those suffering this issue. Heres a hacky workaround for the .one() method
Then call
It uses the same logic employed by the .one() method (And any of its warts). Ive tested it on the above platforms and its works fine. |
Has been fixed in https://github.com/scravy/node-macaddress/releases/tag/0.5.0 and is releases as |
I've been using this module in a project, and users have reported problems on various platforms -- the problems all boil down to my use of
macaddress
, but only when their machines are offline.I haven't been able to reproduce the issue personally on OSX, but on Windows 8.1 I see the problem.
To be clear, my Windows 8.1 machine does not have WIFI -- it only uses a hard ethernet connection. Removing that hard line is when I see the issue.
The text was updated successfully, but these errors were encountered: