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

Comments

Projects
None yet
6 participants
@jessicah

jessicah commented Apr 11, 2016

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

This comment has been minimized.

Show comment
Hide comment
@tkelman

tkelman 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.

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

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Apr 11, 2016

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

Member

sunilmut commented Apr 11, 2016

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

This comment has been minimized.

Show comment
Hide comment
@bitcrazed

bitcrazed Sep 28, 2016

Collaborator

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

Collaborator

bitcrazed commented Sep 28, 2016

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

@bitcrazed bitcrazed closed this Sep 28, 2016

@tkelman

This comment has been minimized.

Show comment
Hide comment
@tkelman

tkelman 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?

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

This comment has been minimized.

Show comment
Hide comment
@bitcrazed

bitcrazed Sep 28, 2016

Collaborator

Thanks for responding. Re-opening & investigating.

Collaborator

bitcrazed commented Sep 28, 2016

Thanks for responding. Re-opening & investigating.

@bitcrazed bitcrazed reopened this Sep 28, 2016

@jackchammons

This comment has been minimized.

Show comment
Hide comment
@jackchammons

jackchammons Dec 13, 2016

Member

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/

Member

jackchammons commented Dec 13, 2016

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/

@jackchammons jackchammons added the bug label Dec 13, 2016

@tkelman

This comment has been minimized.

Show comment
Hide comment
@tkelman

tkelman 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).

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).

@sunilmut sunilmut added the fixed label Dec 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment