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

node/npmconf: os.networkInterfaces() appears to fail with EINVAL #118

Closed
jessicah opened this issue Apr 11, 2016 · 7 comments
Closed

node/npmconf: os.networkInterfaces() appears to fail with EINVAL #118

jessicah opened this issue Apr 11, 2016 · 7 comments

Comments

@jessicah
Copy link

Trying to run ungit, have the following error in log output:

root@localhost:~/haiku# ungit
2016-04-11T06:48:11.955Z - info: Listening on port 8448
Browse to http://localhost:8448/#/repository?path=%2Froot%2Fhaiku
Took 750ms to start server.
## Ungit started ##
2016-04-11T06:48:16.207Z - info: GET /images/logo.png
2016-04-11T06:48:16.214Z - info: GET /api/userconfig
2016-04-11T06:48:16.215Z - info: GET /api/latestversion
2016-04-11T06:48:16.247Z - error: Error: EINVAL, invalid argument
    at getLocalAddresses (/usr/local/lib/node_modules/ungit/node_modules/npmconf/config-defs.js:332:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/ungit/node_modules/npmconf/config-defs.js:281:23)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/ungit/node_modules/npmconf/npmconf.js:4:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.sysinfo.getUngitLatestVersion (/usr/local/lib/node_modules/ungit/source/sysinfo.js:36:27)

Which comes from https://github.com/npm/npmconf/blob/master/config-defs.js#L332

@tkelman
Copy link

tkelman commented Apr 11, 2016

If you follow this into libuv, you can reduce it down to

root@localhost:/home/tkelman# cat getifaddrs.c
#include <stdio.h>
#include <errno.h>
#include <net/if.h>
int main() {
struct ifaddrs *addrs;
int err = getifaddrs(&addrs);
printf("err = %d, errno = %d\n", err, errno);
}
root@localhost:/home/tkelman# gcc -g -o getifaddrs getifaddrs.c
root@localhost:/home/tkelman# ./getifaddrs
err = -1, errno = 22

And if you look at the glibc source for getifaddrs, from what I can tell the failure is in creating a netlink socket, so same as the first item in #69.

@sunilmut
Copy link
Member

Yes, NETLINK sockets are currently not implemented. We will be tracking\prioritizing which features to light up next by looking at the feedback provided at the wpdev portal. We appreciate your feedback and please make sure to provide it through the wpdev portal as well. Looks like there is already a post tracking this which you can upvote:

https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13383789-enable-network-interface-enumeraration

@bitcrazed
Copy link
Contributor

No response for several months. Closing for now. Let us know if this problem persists.

@tkelman
Copy link

tkelman commented Sep 28, 2016

Still fails exactly the same as it did in April #118 (comment) on build 14915. What change do you believe would have fixed this?

@bitcrazed
Copy link
Contributor

Thanks for responding. Re-opening & investigating.

@jackchammons
Copy link
Contributor

I am no longer seeing this issue in builds 14981+. @jessicah or @tkelman can you confirm that this is no longer an issue.

Info on installing insider builds: https://insider.windows.com/

@tkelman
Copy link

tkelman commented Dec 15, 2016

On build 14986, my C test case above now gives err = 0, errno = 0 which is encouraging. Would be good to test some higher-level integration use cases like node or julia (if I can remember what used to cause this that led me to getifaddrs, or get my hands on a pre-14981 build to reproduce it again).

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

7 participants