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: invalid argument, uv_interface_addresses #1343

Closed
asvetliakov opened this Issue Nov 10, 2016 · 20 comments

Comments

Projects
None yet
@asvetliakov

asvetliakov commented Nov 10, 2016

Node 7.0
Windows build 14965.1001

Create test.js:

var os = require("os");
os.networkInterfaces();
node ./test.js

Output:

os.networkInterfaces();                                 
   ^                                                    
                                                        
Error: EINVAL: invalid argument, uv_interface_addresses 
    at Object.<anonymous> (/home/asvetl/test.js:3:4)    
    at Module._compile (module.js:573:32)               
    at Object.Module._extensions..js (module.js:582:10) 
    at Module.load (module.js:490:32)                   
    at tryModuleLoad (module.js:449:12)                 
    at Function.Module._load (module.js:441:3)          
    at Module.runMain (module.js:607:10)                
    at run (bootstrap_node.js:382:7)                    
    at startup (bootstrap_node.js:137:9)                
    at bootstrap_node.js:497:3

In my case i was trying to run webpack with css-loader (the error comes from it).

@JasonLinMS

This comment has been minimized.

Show comment
Hide comment
@JasonLinMS

JasonLinMS Nov 10, 2016

We're aware of this issue, and the fix will be pushed out soon, thanks.

JasonLinMS commented Nov 10, 2016

We're aware of this issue, and the fix will be pushed out soon, thanks.

@antcook

This comment has been minimized.

Show comment
Hide comment
@antcook

antcook Nov 23, 2016

This bug is still apparent in build 14971, is a fix still inbound?

antcook commented Nov 23, 2016

This bug is still apparent in build 14971, is a fix still inbound?

@ShimShamSam

This comment has been minimized.

Show comment
Hide comment
@ShimShamSam

ShimShamSam Nov 30, 2016

@antcook According to their latest Bash on Windows Release Notes, they were unable to push any changes in the last release.

ShimShamSam commented Nov 30, 2016

@antcook According to their latest Bash on Windows Release Notes, they were unable to push any changes in the last release.

@russalex

This comment has been minimized.

Show comment
Hide comment
@russalex

russalex Dec 8, 2016

Contributor

Hi @antcook, any chance you could test on build 14986?

From the release notes:

  • Fixed issue in WSL where Netlink request for network interface data would fail with EINVAL if the interface's hardware address is 32-bytes (such as the Teredo interface)
Contributor

russalex commented Dec 8, 2016

Hi @antcook, any chance you could test on build 14986?

From the release notes:

  • Fixed issue in WSL where Netlink request for network interface data would fail with EINVAL if the interface's hardware address is 32-bytes (such as the Teredo interface)
@antcook

This comment has been minimized.

Show comment
Hide comment
@antcook

antcook Dec 8, 2016

@russalex Just updated to 14986 and I can confirm that the issue is no longer present. (Node v7.0.1)

antcook commented Dec 8, 2016

@russalex Just updated to 14986 and I can confirm that the issue is no longer present. (Node v7.0.1)

@therealkenc

This comment has been minimized.

Show comment
Hide comment
@therealkenc

therealkenc Dec 8, 2016

Collaborator

"Note that the Linux "ip" utility contains a bug where it will crash if WSL reports a 32-byte hardware address. This is a bug in "ip", not WSL. The “ip” utility hard-codes the length of the string buffer used to print the hardware address, and that buffer is too small to print a 32-byte hardware address."

cat /sys/devices/virtual/net/und0
00:00:00:00:00:00:00:e0:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

Seriously??? Even on Windows with ipconfig /all those trailing zeros are apropos of nothing. If 00:00:...??.....00:00:01 is a valid address (and I am not sure even that is the case), jeez just XOR the thing down to 20 bytes or whatever buffer length happens to be customary. Yes, the buffer is too small, and that's a bug. But there's a rather stronger argument that outputting a string that has 63 zeros in it is also a bug. 32 bytes, and it isn't even great as a UID. It might not be a WSL bug, but it is a Windows bug.

Tunnel adapter Teredo Tunneling Pseudo-Interface:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2001:0:9d38:6abd:3882:3089:bacd:5430(Preferred)
Link-local IPv6 Address . . . . . : fe80::3882:3089:bacd:5430%59(Preferred)
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 989855744
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-78-C2-19-38-D5-47-23-08-52
NetBIOS over Tcpip. . . . . . . . : Disabled

Collaborator

therealkenc commented Dec 8, 2016

"Note that the Linux "ip" utility contains a bug where it will crash if WSL reports a 32-byte hardware address. This is a bug in "ip", not WSL. The “ip” utility hard-codes the length of the string buffer used to print the hardware address, and that buffer is too small to print a 32-byte hardware address."

cat /sys/devices/virtual/net/und0
00:00:00:00:00:00:00:e0:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

Seriously??? Even on Windows with ipconfig /all those trailing zeros are apropos of nothing. If 00:00:...??.....00:00:01 is a valid address (and I am not sure even that is the case), jeez just XOR the thing down to 20 bytes or whatever buffer length happens to be customary. Yes, the buffer is too small, and that's a bug. But there's a rather stronger argument that outputting a string that has 63 zeros in it is also a bug. 32 bytes, and it isn't even great as a UID. It might not be a WSL bug, but it is a Windows bug.

Tunnel adapter Teredo Tunneling Pseudo-Interface:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2001:0:9d38:6abd:3882:3089:bacd:5430(Preferred)
Link-local IPv6 Address . . . . . : fe80::3882:3089:bacd:5430%59(Preferred)
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 989855744
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-78-C2-19-38-D5-47-23-08-52
NetBIOS over Tcpip. . . . . . . . : Disabled

@JasonLinMS

This comment has been minimized.

Show comment
Hide comment
@JasonLinMS

JasonLinMS Dec 17, 2016

@therealkenc Thanks for your feedback, what you are saying does make sense, we've decided to truncate the physical address length returned by lxcore to 16 bytes.

JasonLinMS commented Dec 17, 2016

@therealkenc Thanks for your feedback, what you are saying does make sense, we've decided to truncate the physical address length returned by lxcore to 16 bytes.

@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Jan 13, 2017

Member

The teredo issue should be fixed in 15007

Member

sunilmut commented Jan 13, 2017

The teredo issue should be fixed in 15007

@Markus-ipse

This comment has been minimized.

Show comment
Hide comment
@Markus-ipse

Markus-ipse Jan 26, 2017

Any ETA for when this fix will be available for people not able to use Insider preview builds (work computer)?

Markus-ipse commented Jan 26, 2017

Any ETA for when this fix will be available for people not able to use Insider preview builds (work computer)?

@benhillis

This comment has been minimized.

Show comment
Hide comment
@benhillis

benhillis Jan 26, 2017

Member

@Markus-ipse - Windows 10 Creator's update due later this year.

Member

benhillis commented Jan 26, 2017

@Markus-ipse - Windows 10 Creator's update due later this year.

@Markus-ipse

This comment has been minimized.

Show comment
Hide comment
@Markus-ipse

Markus-ipse Jan 26, 2017

Haha, could we get something a tad more specific than "later this year", since we're not even out of January yet? 😁

Edit:
Never mind, google tells me April

Markus-ipse commented Jan 26, 2017

Haha, could we get something a tad more specific than "later this year", since we're not even out of January yet? 😁

Edit:
Never mind, google tells me April

@benhillis

This comment has been minimized.

Show comment
Hide comment
@benhillis

benhillis Jan 26, 2017

Member

@Markus-ipse - we have not yet announced a release date beyond "Spring 2017"

https://www.microsoft.com/en-us/windows/upcoming-features

Member

benhillis commented Jan 26, 2017

@Markus-ipse - we have not yet announced a release date beyond "Spring 2017"

https://www.microsoft.com/en-us/windows/upcoming-features

@buzinas

This comment has been minimized.

Show comment
Hide comment
@buzinas

buzinas Feb 14, 2017

I already had this issue and I'm doing this as a workaround:

// hack for Ubuntu on Windows
try {
  require('os').networkInterfaces();
}
catch (e) {
  require('os').networkInterfaces = () => ({});
}

Place that code in a file and require it in webpack.config.js file.

buzinas commented Feb 14, 2017

I already had this issue and I'm doing this as a workaround:

// hack for Ubuntu on Windows
try {
  require('os').networkInterfaces();
}
catch (e) {
  require('os').networkInterfaces = () => ({});
}

Place that code in a file and require it in webpack.config.js file.

@Vheissu

This comment has been minimized.

Show comment
Hide comment
@Vheissu

Vheissu Feb 22, 2017

@buzinas Brilliant. I love you. I didn't need to put it into a separate file, I just put it at the top of my Webpack config.

Vheissu commented Feb 22, 2017

@buzinas Brilliant. I love you. I didn't need to put it into a separate file, I just put it at the top of my Webpack config.

@Reon90

This comment has been minimized.

Show comment
Hide comment
@Reon90

Reon90 commented Mar 1, 2017

@buzinas Amazing!!!

@therealkenc

This comment has been minimized.

Show comment
Hide comment
@therealkenc

therealkenc Mar 1, 2017

Collaborator

Almost as amazing as when it was posted by @ghost last august. 😉

Collaborator

therealkenc commented Mar 1, 2017

Almost as amazing as when it was posted by @ghost last august. 😉

@LeoLiuYan

This comment has been minimized.

Show comment
Hide comment
@LeoLiuYan

LeoLiuYan commented Mar 16, 2017

@buzinas Good!!!

@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Mar 16, 2017

Member

Closing the issue out since it is fixed in the insider builds.

Member

sunilmut commented Mar 16, 2017

Closing the issue out since it is fixed in the insider builds.

@sunilmut sunilmut closed this Mar 16, 2017

@cbier1

This comment has been minimized.

Show comment
Hide comment
@cbier1

cbier1 Apr 20, 2017

@sunilmut Thank you! When will it be available for folks who do not use the insider builds?

cbier1 commented Apr 20, 2017

@sunilmut Thank you! When will it be available for folks who do not use the insider builds?

@vunb

This comment has been minimized.

Show comment
Hide comment
@vunb

vunb Apr 20, 2017

@cbier1 I'm running well on Windows 10 Creators Update 😁

vunb commented Apr 20, 2017

@cbier1 I'm running well on Windows 10 Creators Update 😁

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