Skip to content

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

Closed

Description

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

Activity

  1. tkelman commented on Apr 11, 2016

    @tkelman

    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.

  2. sunilmut commented on Apr 11, 2016

    @sunilmut
    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

  3. bitcrazed commented on Sep 28, 2016

    @bitcrazed
    Contributor

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

  4. tkelman commented on Sep 28, 2016

    @tkelman

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

  5. bitcrazed commented on Sep 28, 2016

    @bitcrazed
    Contributor

    Thanks for responding. Re-opening & investigating.

  6. jackchammons commented on Dec 13, 2016

    @jackchammons
    Contributor

    I am no longer seeing this issue in builds 14981+. Jessica Hamilton (@jessicah) or Tony Kelman (@tkelman) can you confirm that this is no longer an issue.

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

  7. tkelman commented on Dec 15, 2016

    @tkelman

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions