os.networkInterfaces error in NodeJS / Yeoman

I managed to successfully install NodeJS, NPM and Yeoman. You see all installed components in the version below.

When create a new project and type.
yo <generator-name>
Everything works fine. A problem happens when I just try yo. Because Yeoman somehow tries to access the network interfaces of the operation system propably. This won't work on BashOnWindows because there is no network interface directly included in the Linux Sub System and just use the same network as the host one.

Am I completely wrong or can this be fixed in future releases? Thanx.

@StfBauer - If you can grab a strace of the failing command 'yo', we can see where it is failing and if it is tripping on something that is currently unimplemented. Thanks for trying out WSL!

@sunilmut Thank you. Attached the strace to this comment. Hope you find something useful.
Thanx for your great work so far. Love this.
yeoman-error.txt

socket(PF_NETLINK, SOCK_RAW, 0)         = -1 EINVAL (Invalid argument)
WSL currently does not support NETLINK sockets. We are using our user voice page to prioritize the things to implement next. Please feel free to up vote this relevant task.

@sunilmut Thank you for the update. This will be required for the new SharePoint Framework update released by Microsoft. Because it use Yeoman generator to extend SharePoint from Linux, MacOSX as well as Windows.
In this case it would be great to use it from Bash On Windows.
Will add a user voice.

Added entry to user voices:
https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/14605521-add-netlink-socket-support

I had a similar problem when trying to run the ionic.
Error getting IPv4 address: Error: EINVAL: invalid argument, uv_interface_addresses (CLI v1.7.15)

Has this been fixed?

Cause i am facing the same issue here is my error log
[22:09:50] Requiring external module babel-core/register
/mnt/c/Users/abhis/WebProjects/emails/cts-report/node_modules/browser-sync/node_modules/dev-ip/lib/dev-ip.js:21
var networkInterfaces = require("os").networkInterfaces();
^
Error: EINVAL: invalid argument, uv_interface_addresses
at Error (native)
at getIp (/mnt/c/Users/abhis/WebProjects/emails/cts-report/node_modules/browser-sync/node_modules/dev-ip/lib/dev-ip.js:21:43)
at Object. (/mnt/c/Users/abhis/WebProjects/emails/cts-report/node_modules/browser-sync/lib/utils.js:4:38)
at Module._compile (module.js:541:32)
at Module._extensions..js (module.js:550:10)
at Object.require.extensions.(anonymous function) [as .js] (/mnt/c/Users/abhis/WebProjects/emails/cts-report/node_modules/babel-core/node_modules/babel-register/lib/node.js:166:7)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
Error<EMAIL_ADDRESS>start: gulp
Exit status 1
at EventEmitter. (/usr/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/lifecycle.js:217:16)
at emitTwo (events.js:106:13)
at EventEmitter.emit (events.js:191:7)
at ChildProcess. (/usr/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/spawn.js:24:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

@StfBauer: I don't know for sure, but could the UserVoice suggestion you created be a duplicate of https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13383789-enable-network-interface-enumeraration?

Hi! When it will be done? :)

We are looking into supporting NETLINK and RAW sockets. It's difficult to give any ETA at the moment.

+1

+1

I'm also facing the same problem when i run gulp. Is there any solution?

Just a note on current build 14393 this now gets to the bind call
socket(PF_NETLINK, SOCK_RAW, 0)         = 9
bind(9, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = -1 EINVAL (Invalid argument)

Woohoo, progress! Soon I'll be able to switch to WSL for my node apps

Just wanna say, that BrowserSync propably fails because of the same reason:
/mnt/e/wsl/repos/static-site-generator/node_modules/dev-ip/lib/dev-ip.js:21
    var networkInterfaces = require("os").networkInterfaces();
                                          ^

Error: EINVAL: invalid argument, uv_interface_addresses
    at Error (native)
    at getIp (/mnt/e/wsl/repos/static-site-generator/node_modules/dev-ip/lib/dev-ip.js:21:43)
    at Object.<anonymous> (/mnt/e/wsl/repos/static-site-generator/node_modules/browser-sync/lib/utils.js:4:38)
    at Module._compile (module.js:541:32)
    at Module._extensions..js (module.js:550:10)
    at Object.require.extensions.(anonymous function) [as .js] (/mnt/e/wsl/repos/static-site-generator/node_modules/babel-register/lib/node.js:156:7)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/mnt/e/wsl/repos/static-site-generator/node_modules/browser-sync/lib/snippet.js:9:20)
    at Module._compile (module.js:541:32)
    at Module._extensions..js (module.js:550:10)
    at Object.require.extensions.(anonymous function) [as .js] (/mnt/e/wsl/repos/static-site-generator/node_modules/babel-register/lib/node.js:156:7)
    at Module.load (module.js:458:32)

@simonknittel  Yes still not work for me.

Same here, i've update to the recent build.  still get this error

Any news on this? Any workaround? This is causing my webpack builds to fail.

Without NETLINK and RAW sockets many webpack build fail. Any updates on this?

Yep, I'm watching this as well. Breaking for me.
Running "Bash on Ubuntu on Windows" in the Anniversary Update.

I've hit the issue with os.networkInterfaces(), and I've found a workaround (though it's ugly):

Look at the stack trace to determine what direct package is causing this issue.  Note that it's probably not the package that you're trying to run; it's probably a dependency of that package. @StfBauer , it looks like your problem is in npmconf (same as me).  @abhishek1214 @simonknittel @afdallah , it looks like all of you are hitting a problem in the dev-ip module.

Look inside ~/.npm/<packagename>/<version>/.  (If multiple versions are available, you probably want to update all of them?  Though for me there was only one version.)  You should see a directory named package and a file named package.tgz

Look inside the directory named package; you should be able to find the exact .js file where the failure in your stack trace is occurring.  Make a backup copy of that file somewhere so you can revert your changes if necessary.

Open that file in your favorite Linux text editor.  Replace all calls to os.networkInterfaces(), require("os").networkInterfaces(), etc with just {}.  (Do this intelligently, not blind search-and-replace -- make sure the file continues to be syntactically-valid JavaScript.)  This will cause the script to not see metadata for any network interfaces, which might cause problems in some applications, but WSL isn't providing that metadata right now anyway.

Save the file.  Exit your text editor.

Run cd .. as necessary to get yourself back to ~/.npm/<packagename>/<version>/.  Run the following command to re-create the .tgz file:  tar czvf package.tgz package

Go back to your project.  Re-run npm install.  You might need to remove your whole node_modules directory and reinstall.

Anyway, I think that gets all the steps?  This is definitely not a polished solution; it would be great if someone with a little more node experience than I could give it a try and report back on what other hackery they needed to do.

@aseering unfortunately, this isn't a workaround, nor fix, since it breaks the application. Its like saying "when your car doesn't steer correctly, remove the steering wheel"

If only I can get this working then I can watch the files for when my test changes then I can be golden!
On Wed, Aug 3, 2016 at 7:45 AM -0700, "Adam Seering"<EMAIL_ADDRESS>wrote:
I've hit the issue with os.networkInterfaces(), and I've found a workaround (though it's ugly):

Look at the stack trace to determine what direct package is causing this issue.  Note that it's probably not the package that you're trying to run; it's probably a dependency of that package. @StfBauer , it looks like your problem is in npmconf (same as me).  @abhishek1214 @simonknittel @afdallah , it looks like all of you are hitting a problem in the dev-ip module.

Look inside ~/.npm/<packagename>/<version>/.  (If multiple versions are available, you probably want to update all of them?  Though for me there was only one version.)  You should see a directory named package and a file named package.tgz

Look inside the directory named package; you should be able to find the exact .js file where the failure in your stack trace is occurring.  Make a backup copy of that file somewhere so you can revert your changes if necessary.

Open that file in your favorite Linux text editor.  Replace all calls to os.networkInterfaces(), require("os").networkInterfaces(), etc with just {}.  (Do this intelligently, not blind search-and-replace -- make sure the file continues to be syntactically-valid JavaScript.)  This will cause the script to not see metadata for any network interfaces, which might cause problems in some applications, but WSL isn't providing that metadata right now anyway.

Save the file.  Exit your text editor.

Run cd .. as necessary to get yourself back to ~/.npm/<packagename>/<version>/.  Run the following command to re-create the .tgz file:  tar czvf package.tgz package

Go back to your project.  Re-run npm install.  You might need to remove your whole node_modules directory and reinstall.

Anyway, I think that gets all the steps?  This is definitely not a polished solution; it would be great if someone with a little more node experience than I could give it a try and report back on what other hackery they needed to do.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/Microsoft/BashOnWindows/issues/468#issuecomment-237241437

+1

@george-cz -- what is your application doing that this workaround breaks?  It fixes my application.

@aseering no, It doesnt "fix" the application :) You are removing code, that is there for a reason. You cannot just remove a random piece of a program and expect it to work flawlessly...

Would love a fix for this +1

+1

@george-cz -- I appreciate your perspective.  But can you tell me what purpose that code serves in my application?  You seem confident that you can.  But I know you don't have access to my source code; it hasn't been published...  I have read my own code, and have investigated how it is used; when I say that it works, I mean that it works.
  Is it icky?  Sure.  Dangerous?  Probaby.  But an agile person can still crawl in the window and use the car if they have to.
My experience with node (which is admittedly limited; I'm more of a C++ person) has been that this function is often called to populate metadata that might be used later, but it isn't always used.  So sometimes removing the function is, in fact, a strict no-op.
If that's not sufficient, it would be possible to substitute in a hardcoded object representing what the return value of the function should be on the machine in question.  Or further steps could be taken.  In order to figure that out, could you please try applying this workaround and post back describing in more detail how it fails for you?

I've met this problem while using webpack to bundle css files.

What I do is just import '/path/to/cssfiles'; which succeed without BashOnWindows.

+1

Just to verify a comment from above, this fails with a similar error message with browser-sync, which I suspect will be for similar issues with the network:

dillieo:layout/ (add-related-events✗) $ gulp clean                                                           [10:49:45]
Error: EINVAL, invalid argument
at getIp (/mnt/c/Users/dilli/Projects/xxx/layout/node_modules/browser-sync/node_modules/dev-ip/lib/dev-ip.js:21:43)
at Object. (/mnt/c/Users/dilli/Projects/wscpa/layout/node_modules/browser-sync/lib/utils.js:4:38)
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. (/mnt/c/Users/dilli/Projects/xxx/layout/node_modules/browser-sync/lib/snippet.js:9:20)
at Module._compile (module.js:456:26)
dillieo:layout/ (add-related-events✗) $

For what it's worth, I used the download link to upgrade to Windows Anniversary edition this morning and did a fresh install of Bash on Windows shortly thereafter, so I'm guessing I have a pretty recent version.
I'm excited to see BashOnWindows though. Keep up the great work!

+1 My issue pops up just when doing npm install on my basic Ember application.

A silly question, but don't the decent installers (e.g. apt-get) check packages for prerequisites?
I suspect the package information available to the installer says that it is running pure Ubuntu Trusty Tahr in a standalone Linux box (or perhaps VM) and so forth. Why doesn't WSL configure itself so package managers and installers can tell just what features are implemented and which are not?
I should think it would be far more useful, even in this Alpha/Beta stage, if we could look at prerequisites for a given package and know immediately if it was going to fail, rather than doing trial and error?
Supposing enumeration of network interfaces and/or support for NETLINK sockets are on the list, might it not be easier for people to find them and vote them up in UserVoice? Wouldn't it be easier for apt-get (for example) to report it as a dependency not met, before starting, rather than stumbling around until it has to end with an obscure error message?

apt-get checks for prerequisites at a package level -- you can specify what packages need to be installed before this package can work.  So you can say things like "pidgin depends on libpurple being installed."  You can't say things like "virtualbox-dkms requires a real physical machine; it won't run in a hosted cloud environment" because "hosted cloud environment" is a property of the environment, not a ".deb" package that can be downloaded to fulfill a requirement.
Ubuntu uses the same packaging system as Debian.  If you'd like to learn more about it, Debian has a nice manual; the relevant section is here:
https://www.debian.org/doc/debian-policy/ch-relationships.html
The WSL folks are, in effect, implementing a kernel.  In most distributions, including Ubuntu, the whole kernel is just one package.  You could say that, because there are pieces of the kernel that aren't provided, WSL shouldn't report that it has a kernel.  But literally every executable package in Ubuntu needs some sort of kernel (complete or otherwise) to be present in order to run, so it would be confusing if WSL reported that it didn't have a kernel...

@OshotOkill I'm new to Webpack and trying to learn some stuff on this so this might be a dumb question, but where did you put that import statement? Running into the same error where it's occuring when it tries to bundle the CSS

@THEdavidharris I've put these statements into the entry of my app, however it doesn't matter which file you should specify the statement since import 'path/to/file' without from keyword will populate the global scope with all the codes from which file you want to import.

@aseering -
Okay, maybe not all the things that are missing will show up as missing packages (unless they come bundled with the image and are just "there" without being checked for dependencies etc by the package handler). Still, there ought to be checklists of things that the Debian package handler and npm and make and their ilk don't check for but assume are present.
It does seem that WSL is implementing a kernel. I wonder what the linux kernel folks have to say about WSL implying that it is running "Linux" but only in emulation, without a real kernel? Getting bash and the gnu command line utilities running on a "unix-like" environment is one thing, but saying it is Ubuntu implies something else, namely all of the features that are "assumed" when a program or package manager runs in Ubuntu 14.04. I'm thinking of upstart, for example; it seems to be there as part of the image, and lots of packages would normally depend on it in a standard Ubuntu 14.04 install, but they give error messages when you try to use them, when they try to talk to upstart on its socket. The Debian docs you cite imply that upstart isn't absolutely required, and that init scripts can run the old fashioned way, and in fact most of the init scripts in /etc/init.d work more or less as bash scripts if you invoke them that way. Isn't the presence of a working upstart something that apt-get notices or relies on, and if it were not there, it would react appropriately?
The same with a linux filesystem. They could probably just call it "the VolFS filesystem", and not expect the e2fsprogs, or the corresponding utilities for other filesystems, to run.

@aseering Saw your workaround today.
The good new is that I got some updates on user voices related to this issue: 👍
Add Netlink socket support
enable network interface enumeraration
Let's hope it will be fixed soon. My hope was actually that it would have been fixed in anniversary update.

@StfBauer -- indeed :-)  I'm also looking forward to the actual fix from Microsoft.  In the meantime, I'm hoping the workaround is at least a little helpful to someone somewhere.
@rodrymbo -- apt-get itself, again, checks for packages.  Nothing more, nothing less.  "working upstart" is not a package.  upstart is a package.  As you have noted, the package is installed.  So it passes apt-get's test.
In general, on binary Linux distributions like Ubuntu, Red Hat, etc, the expectation seems to be that the package manager just puts the program onto your computer.  It is then the responsibility of the program to explain to the user what it can or can't do in the current environment.
I'm guessing that the Linux kernel folks don't care too much about this aspect of WSL.  (Though they probably care about it for other reasons.)  The kernel itself is highly modular and configurable at the source-code level; it's trivial to build a kernel that's a perfectly valid kernel but that won't run most Ubuntu software.  It's the Linux distributions that impose stability and a standardized environment.  So I would imagine that Canonical (the company behind Ubuntu) would be the ones who care.
You correctly observe that WSL is not identical to Ubuntu on Linux, and doesn't intend to be identical.  "Identical" would be a virtual machine; we already have that technology :-)  The premise of this project seems to be that it is useful to have something that is very similar to Ubuntu but that is actually Windows under the hood, and that integrates more closely with Windows than real-Ubuntu could.  You're absolutely correct that this creates lots of integration challenges by design.  I don't have good answers for you on that.  But I'm personally guessing that (a) Microsoft will make substantial improvements in WSL<->real-Linux compatibility over the coming months, and (b) various popular open-source programs and libraries will add some new runtime checks to their programs to correctly handle fundamental differences between the two environments.
Incidentally, you mention apt-get, npm, and make.  One of these things is not like the others :-)  make (actually autoconf, which is part of the same ecosystem) can handle these types of dependencies.  But make is run on source code.  If you download Ubuntu's source packages and re-compile them all locally, you will find that some of them actually do work better because their build system recognizes the environmental changes and adapts to them.  But that's a lot of work; WSL has committed to have a good experience without requiring a re-compile, which is a much bigger challenge but arguably much more useful.
Regarding the filesystem -- Ubuntu, as you've noted, supports multiple filesystems.  It makes no guarantee about what filesystem is currently in use where.  It simply guarantees that programs and users can, at runtime, query to identify the current filesystem type.  There's a discussion somewhere in this bugtracker (unfortunately I'm not immediately finding it) about precisely what filesystem type WSL's filesystems should report as.  They each initially had their own new type, but there have been requests for one or the other to report as NTFS (which Ubuntu does have some native support/tools for).

Anyway @rodrymbo -- we should probably not monopolize this thread with the bigger question :-)  Feel free to file a new ticket if you'd like to discuss further.  Or you could post it to the forum that I've been trying to start for WSL discussion.

@aseering - Thanks for the suggestions and information.
A forum sounds like a good idea.

+1

+1

+1

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

Its now under review!

+1

+1

I understand that this is functionality that a lot of people want but a better place for these "+1's" is our User Voice page.

The simplest way to reproduce this problem:
ryerh@localhost:~/ $ node
> os.networkInterfaces()
Error: EINVAL: invalid argument, uv_interface_addresses
    at Error (native)
    at repl:1:4
    at REPLServer.defaultEval (repl.js:270:27)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)
    at REPLServer.<anonymous> (repl.js:439:10)
    at emitOne (events.js:95:20)
    at REPLServer.emit (events.js:182:7)
    at REPLServer.Interface._onLine (readline.js:211:10)
    at REPLServer.Interface._line (readline.js:550:8)
>

Same problem in webpack with css-loader. While we don't have a solution, i did a workaround. The package uniqid will fallback to process instead of mac address.
//first line of your application
require('os').networInterfaces = function() { return []; };

I just put up a shim for networkInterfaces() and FSEvents here.  Put it in your node_modules root and require("../../wsl-shim"); at the top of bin/browswer-sync.js, etc. dev-ip and chokidar are none the wiser.

It is also entirely possible to fill in the FSWatcher stub with fstat polling. Whether that is worth the trouble depends a lot on where the WSL team is with #216.

These workarounds are crazy. Simpler to run this before the problem:
// Hack for Ubuntu on Windows: interface enumeration fails with EINVAL, so return empty.
try {
  require('os').networkInterfaces();
} catch (e) {
  require('os').networkInterfaces = () => ({});
}

If you are using a CLI you can generally get it to require a module first with node's --require flag, eg:
node -r uow-hack.js node_modules/.bin/browser-sync.js ....

Others have config options, eg ava has ava.require in package.json

isn't it a bug with linux subsystem and network interface that needs to be fixed?
i run my dev at cmd not bash because of this.

Yes, but a lot of the time it's some deep package that doesn't actually need a valid entry and will fallback - eg webpack css-loader is just using it to create hashes for ids!

But yes, still a workaround, not a fix

+1

+1

@lamo2k123 @seungha-kim I don't think +1 has any effect on things, please upvote this issue on the user forms on the wsl microsoft page so they will see it and your voice can be heard!
+1 provides no real information and can be annoying.

@neoadventist - I'd love to vote but I can't although I have 4 votes left and I can vote for any other issue the vote button on this one is disabled :disappointed:

Let's hope it means that the Devs have prioritized this and don't need any more advice and we can expect a fix to work its way to use relatively soon?

I hit same issue when using Angular-CLI...

The workaround posted by @simonbuchan works pretty well for me, I was having this issue with the css-loader from Webpack.
I just placed the temporary fix at the top of my configuration file, like so...
// Hack for Ubuntu on Windows: interface enumeration fails with EINVAL, so return empty.
try {
  require('os').networkInterfaces()
} catch (e) {
  require('os').networkInterfaces = () => ({})
}

// Dependencies
const glob = require('glob')

module.exports = {
  entry: glob.sync('./app/**/*.js'),
  output: {
    path: 'build',
    filename: 'bundle.js'
  } ...

Ahhh it was all going so well for Bash on Windows ! :P
As @iainreid820 said - keen to see a real solution to this.

@JaredPage File a bug via windows 10 insiders feedback system. otherwise, this will never get fixed.

@orenmizr Someone has already done that and last I heard the bug passed review

@orenmizr @nmai Do you have a link to the bug submission ?

@JaredPage yep, the link has been posted in this discussion already but here it is again: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/14605521-add-netlink-socket-support

This is the only thing keeping me on Linux :(

This doesn't work for me too 😢

We are in October and the problem remains, thus stay hard defend you @Microsoft

this issue keeps us all on CMD and not on LINUX.  smart move @Microsoft

I was waiting the Bash to continues using Windows. But after a problem as this does not be resolved and the @microsoft does not provide any help to us, I'm almost changing my OS to Mac OS or Linux.
😞

I'm right there with you guys. Apple has almost zero commitment to their developers it seems (sometimes). Microsoft seems 100% committed in the last 6 months! But this is the major blocker for me.
I bought a windows computer and gave it a shot but without bash I just couldn't make the switch and I've moved back to macOS indefinitely.

Yep @framerate, I was waiting with anxiety the Bash and I am completely disappointed because it does not work with my workflow (basically Node, Gulp, Browser Sync, React, etc).

I'm not sure a GitHub issue is the right place to complain about this. The problem is already on Microsoft's radar. There are a bunch of us subscribed to the issue to track resolution and workarounds, and it's not helpful to see +1s and other unproductive comments.

@fongandrew its not unproductive, its just really frustrating to be 95% there and be blocked by something like this. I'm making due somehow by using cgywin on another window and running bash. the file watcher seems to be working for me now which is good.

@LFeh Patience is a virtue ;) We hear you loud and clear - bear with us!
Rest assured that the team is working hard to figure out a solution to this and many other issues: Some issues simply take longer to fix and bake than others.
While it's tempting to do so, please refrain from filling up comment threads with +1's, etc. Instead, vote on the Op's post using the thumbs/smiley "reactions" that GitHub has to thoughtfully provided for us to use 😉

Thanks @bitcrazed, we are waiting this fix 😸

@bitcrazed, we have no doubt this bug will be fixed eventually. some of us are just trying to figure out fix ETA / roll-out expectancy. three months, half a year, longer?
i'd personally would rather go back to stable build for 6 months as this was the only feature i was interested in.
btw. really appreciate your work.

@framerate Moved to Hackintosh and at this time a lot laptop easy to switch. My laptop work much faster on Sierra than on W10. In future looking to by real Mac. Were windows user and dev for 22 year. Bye @microsoft

Can confirm that this still an issue on my system.
$ gulp serve
/mnt/d/Workspaces/Projek.xyz/Codes/slim-skeleton/node_modules/dev-ip/lib/dev-ip.js:21
    var networkInterfaces = require("os").networkInterfaces();
                                          ^

Error: EINVAL: invalid argument, uv_interface_addresses
    at Error (native)
    at getIp (/mnt/d/Workspaces/Projek.xyz/Codes/slim-skeleton/node_modules/dev-ip/lib/dev-ip.js:21:43)
    at Object.<anonymous> (/mnt/d/Workspaces/Projek.xyz/Codes/slim-skeleton/node_modules/browser-sync/lib/utils.js:4:38)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)

Currently i'm working with gulp-connect-php and browsersync.

@JasonLinMS as FYI, who is working on this problem.

We are actively implementing this feature now, please stay tuned.

I get this same error when trying to use Ember CLI.  I hope this gets fixed soon.
$ ember new myember
/home/Johnny/.nvm/versions/node/v6.7.0/lib/node_modules/ember-cli/node_modules/portfinder/lib/portfinder.js:395
  var interfaces = os.networkInterfaces(),
                      ^

Error: EINVAL: invalid argument, uv_interface_addresses
    at Error (native)
    at /home/Johnny/.nvm/versions/node/v6.7.0/lib/node_modules/ember-cli/node_modules/portfinder/lib/portfinder.js:395:23
    at Object.<anonymous> (/home/Johnny/.nvm/versions/node/v6.7.0/lib/node_modules/ember-cli/node_modules/portfinder/lib/portfinder.js:410:2)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)

@johnnyoshika @LFeh @daniandl et al. Take note of @JasonLinMS comment here: https://github.com/Microsoft/BashOnWindows/issues/468#issuecomment-251298565:
"We are actively implementing this feature now, please stay tuned"
It's hard to give estimates of when this feature will be built and tested internally, and when it'll eventually bubble up to Insiders builds, but rest assured the team are actively working to fix this issue and will get it into Insiders builds as soon as it's stable.

I'm also hitting this when trying to run foundation watch on a fresh foundation sites project. It looks like it's failing on browser-sync, just like someone else mentioned above.
A fix for this would be fantastic.
><EMAIL_ADDRESS>start /home/currentUser/sites/test
> gulp

[13:49:46] Requiring external module babel-register
/home/currentUser/sites/test/node_modules/browser-sync/node_modules/dev-ip/lib/dev-ip.js:21
    var networkInterfaces = require("os").networkInterfaces();
                                          ^

Error: EINVAL: invalid argument, uv_interface_addresses
    at Error (native)
    at getIp (/home/currentUser/sites/test/node_modules/browser-sync/node_modules/dev-ip/lib/dev-ip.js:21:43)
    at Object.<anonymous> (/home/currentUser/sites/test/node_modules/browser-sync/lib/utils.js:4:38)
    at Module._compile (module.js:556:32)
    at Module._extensions..js (module.js:565:10)
    at Object.require.extensions.(anonymous function) [as .js] (/home/currentUser/sites/test/node_modules/babel-register/lib/node.js:152:7)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
Error<EMAIL_ADDRESS>start: `gulp`
Exit status 1
    at EventEmitter.<anonymous> (/home/currentUser/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/lifecycle.js:217:16)
    at emitTwo (events.js:106:13)
    at EventEmitter.emit (events.js:191:7)
    at ChildProcess.<anonymous> (/home/currentUser/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/spawn.js:24:14)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)`

Have the same problem when I want to install phantomjs2 I got the same error for node_modules/npmconf/config-defs.js, the rest is similar.

I think you should lock this issue, as it is clearly in works and all the latest comments are simply the noise that's not much relevant

@dreyks I'm not too sure if it should be locked. People have different applications that are running into this issue and I think its helpful to be able to see what applications are and are not being affected; for both testing and future users.

@neoadventist Well the thing is, that Microsoft knows where the problem is and all these comments only repeat those before them. Everyone has essentially the same problem. There is really no need for everyone to comment, as this bug is acknowledged to exist and being worked on.

@george-cz Agreed, it was easy to find out that this was not caused by a package and that the issue was with bash on windows. This should be locked.

Confirming that @ghost and @simonbuchan solution works.
My personal opinion is that this is a necessary hack that can be backed up in a commitable script for installation purposes without really effecting the original package or not even effecting the ability to update in the future when this issue gets resolved.

new statement from microsoft :

Just got tons of updates. Was hoping to have this fix... but not this time:(

what does the statement say in actuality about a timeline? "looking into". it's open since july

I gave up and I am using Mac now 😞

It's really sad that so critical bug is not fixed promptly - it's even not fixed in months. I really liked BASH for windows but with instability like this it's better to have always virtual machine, or it may be even better to work in linux directly.

The code for this has been checked in (enabling 'ip addr', 'ip link'), it'll take some time to make it to the insiders branch.

Don't forget that this is free software.
This guys here are doing an amazing job on fixing things asap, something that you rarely see in corporations of this scale.  There is no need for personal attacks.

Sorry I don't want to offend anyone (if someone takes it personal) - it's just frustration with bash. I've started using it for projects - but now I need to go back to virtual machines because of this bug...
I cannot see inside the issue - but it looked quite straightforward - maybe it's not.
But as I understand this project is developed by MS and it's normal software (bash as part of it) which you can buy and develop on, so please don't say that it may be crappy because it's free software... and I forget that bash is still in Beta - that mark may be an excuse for this :)
So please keep up the good work on bash. And please stop off-topic discussion - I don't want to start this.

@jurosh This was a significant amount of work, and there is more remaining.  We understand this is a very highly requested scenario and @JasonLinMS and others have been doing an excellent job lighting this up.

Use the hack provided by @simonbuchan in the meantime then.

@aseering One could even go a step furthe to fix this and statically put in the JSON object that is returned when running via windows. As the willingness to edit the module is already there might as well put the correct information in it to ensure everything works. Obviously the module wont' work across machines but at least it can contain all the interfaces that are typically being used while developing.
Example:
{
 "Ethernet": [
        {
            "address": "ffff::ffff:ffff:ffff:ffff", // <- IPv6 Here
            "netmask": "ffff:ffff:ffff:ffff::",
            "family": "IPv6",
            "mac": "00:00:00:00:00:00",
            "scopeid": 36,
            "internal": false
        },
        {
            "address": "x.x.x.x", // <- IPv4 Here
            "netmask": "<IP_ADDRESS>", //
            "family": "IPv4",
            "mac": "00:00:00:00:00:00", // Mac Address
            "internal": false
        }
    ],
    "Loopback Pseudo-Interface 1": [
        {
            "address": "::1",
            "netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
            "family": "IPv6",
            "mac": "00:00:00:00:00:00",
            "scopeid": 0,
            "internal": true
        },
        {
            "address": "<IP_ADDRESS>",
            "netmask": "<IP_ADDRESS>",
            "family": "IPv4",
            "mac": "00:00:00:00:00:00",
            "internal": true
        }
    ]
}

If I may speak for the calmer of us, I believe the frustration lies in the fact that things dramatically change too often lately. It's becoming EXTREMELY difficult to be a develop using Windows 10. It used to be the best thing since 'sliced bread.' Or even Thunderbolt3+USB Type-C. But now there are WEEKLY updates where one update has the potential of utterly changing how the development environment behaves.
I have one machine that is now able to create Symlinks as a User in the Administrators group. That wasn't possible before. I thought I had fixed something on my end, but nope, it seems to be a patch. As a different machine using the exact same setup and tools, minus the Windows 10 patches, behaves differently (disallowing the Symlinks.)
It's these frustrations that are making this difficult.
It might prove fruitful is this project code was opened sourced, or had a way for more of us to build it on our own, submit fixes and contribute overall to it's success. This single project can change the way we develop using Windows hands down. It's amazing! I am in no way bashing it (pun totally intended). I love this. It has blown my mind. With all that said, it's difficult to convince anyone who isn't a moderate risk taker to rely on ANY of the tools this provides as it's just too unstable.
I had almost made the switch over to using VHD's for all my work as it provides some very clean mechanisms for certain things. That was until Bash stopped working with them. If I had converted everything over I would be completely road blocked. With all the recent increase in developer support, amazing devices, technologies and ideas, they all become diminished when a single Windows 10 Update takes out whole days worth of work. Sometimes even weeks. It makes me hate computers at times.
With that said, let this be my official request to join the Insider track for this product as I would love nothing more than to contribute to it's success and ensure all these features work exactly the way we need them to. Thanks!

Ran into this in a NodeJS Project with Webpack CSS Loader.  Sad to see this has been a problem for awhile, so far Bash on Windows has been pretty awesome.  Using the fix @simonbuchan posted works great though for my situation.

It's been so long...is there any progress?  Workaround is obviously not a long-term choice.

Yes, this is resolved, as has been commented before and it will take some time before it arrives in the insider preview.
Everyone:
Please don't comment "I also ran into this problem" or "when do I get this??????". There are at least 53 watchers being notified of every time someone clutters the thread with comments. Useful information ("is this being worked on?" / "when is it released?") disappears between demanding comments.
If you also have come across this issue in your project:

Link the issue in your project
Subscribe to this issue to get notified when it lands in insider preview / release
(optionally) use the workaround by simonbuchan in the mean time

If you just came here to rant about this feature not working or Microsoft in general:

Please don't. It is stated multiple times that bash on windows is still beta software.
You wouldn't want users of your free, beta software to rant and complain about features you already work on.

Thank you.

This fix is in the latest insider build for the fast ring, 14965. https://msdn.microsoft.com/en-us/commandline/wsl/release_notes

After upgrading to build 14965, re-installing bash for windows, re-installing node and running webpack server, I'm still seeing these error messages:
EINVAL: invalid argument, uv_interface_addresses

Does 'ip addr show' work for you? If so, can you share the output?

From: Evgueni Naverniouk<EMAIL_ADDRESS>Sent: Wednesday, November 9, 2016 7:10:39 PM
To: Microsoft/BashOnWindows
Cc: Jason Lin; Mention
Subject: Re: [Microsoft/BashOnWindows] os.networkInterfaces error in NodeJS / Yeoman (#468)
After upgrading to build 14965, re-installing bash for windows, re-installing node and running webpack server, I'm still seeing these error messages:
EINVAL: invalid argument, uv_interface_addresses

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/BashOnWindows/issues/468#issuecomment-259591113, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKq71eEaXzhlsSvqnJS8tLCC-SwaKy0Sks5q8osvgaJpZM4ItDqq.

@JasonLinMS Was super excited to see the fix in the latest update, however after upgrading I'm still getting the same error as @EvNaverniouk
ERROR in EINVAL: invalid argument, uv_interface_addresses
 @ ./src/scss/app.scss 4:14-190

I tried ip addr show:
$ ip addr show
Cannot send dump request: Invalid argument
$ ip
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
       ip [ -force ] -batch filename
where  OBJECT := { link | addr | addrlabel | route | rule | neigh | ntable |
                   tunnel | tuntap | maddr | mroute | mrule | monitor | xfrm |
                   netns | l2tp | tcp_metrics | token }
       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
                    -f[amily] { inet | inet6 | ipx | dnet | bridge | link } |
                    -4 | -6 | -I | -D | -B | -0 |
                    -l[oops] { maximum-addr-flush-attempts } |
                    -o[neline] | -t[imestamp] | -b[atch] [filename] |
                    -rc[vbuf] [size]}

Works For Me™:
% ip addr
10: eth0: <> mtu 1500 group default qlen 1
    link/ether 98:5f:d3:33:87:e3
    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global dynamic
       valid_lft forever preferred_lft forever
12: eth1: <> mtu 1500 group default qlen 1
    link/ether 00:ff:eb:b5:ab:84
    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global dynamic
       valid_lft forever preferred_lft forever
3: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 group default qlen 1
    link/ether 58:82:a8:94:5e:c3
    inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global dynamic
       valid_lft 687836sec preferred_lft 687836sec
1: lo: <LOOPBACK,UP> mtu 1500 group default qlen 1
    link/loopback 00:00:00:00:00:00
    inet <IP_ADDRESS>/8 brd <IP_ADDRESS> scope global dynamic
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope global dynamic
       valid_lft forever preferred_lft forever
5: wifi0: <> mtu 1500 group default qlen 1
    link/ieee802.11 98:5f:d3:33:87:e2
    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global dynamic
       valid_lft forever preferred_lft forever
8: wifi1: <> mtu 1500 group default qlen 1
    link/ieee802.11 9a:5f:d3:33:86:e3
    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global dynamic
       valid_lft forever preferred_lft forever
% node -p 'os.networkInterfaces()'
{ eth2:
   [ { address: '<IP_ADDRESS>',
       netmask: '<IP_ADDRESS>',
       family: 'IPv4',
       mac: '58:82:a8:94:5e:c3',
       internal: false } ],
  lo:
   [ { address: '<IP_ADDRESS>',
       netmask: '<IP_ADDRESS>',
       family: 'IPv4',
       mac: '00:00:00:00:00:00',
       internal: true },
     { address: '::1',
       netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
       family: 'IPv6',
       mac: '00:00:00:00:00:00',
       scopeid: 0,
       internal: true } ] }

Thanks everyone. Seems like this issue depends on the specific network config on your machine.
Can you post the output of 'ifconfig' in WSL, and 'ipconfig /all' in Windows? Also let us know if you are using a commonly found machine like SP4 or SB so we can easily repro.

 : Media disconnected
   Connection-specific DNS Suffix  .  : Media disconnected
   Connection-specific DNS Suffix  .  : Media disconnected
   Connection-specific DNS Suffix  .   :

Relevant strace on ip addr show, if it helps:
socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE) = 3
setsockopt(3, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(3, SOL_SOCKET, SO_RCVBUF, [1048576], 4) = 0
bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, pid=255, groups=00000000}, [12]) = 0
time(NULL)                              =<PHONE_NUMBER>
sendto(3, "(\0\0\0\22\0\1\3\340\7$X\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 40, 0, NULL, 0) = -1 EINVAL (Invalid argument)
dup(2)                                  = 4
fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
brk(NULL)                               = 0x1de8000
brk(0x1e09000)                          = 0x1e09000
fstat(4, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
write(4, "Cannot send dump request: Invali"..., 43Cannot send dump request: Invalid argument
) = 43
close(4)                                = 0
exit_group(1)                           = ?

@therealkenc Thanks for the info, I'll start investigating,

I've got a bugcheck minidump sent in to Ben as well, which might be related, given my environment is sending "garbage in" you didn't anticipate. The bugcheck happens when starting Electron, and one of the first things Electron does is stomp all over socket(PF_NETLINK...). Could also be totally unrelated too of course, just a heads up.

@simonbuchan Interesting, it must be an issue with my setup. @JasonLinMS I've created a gist containing both my ifconfig and ipconfig results for you to view side by side here: https://gist.github.com/nmai/795f3d1a5f88c2ea8f1f5bbf98511e0b
Some more info on my setup:
$ ip -V
ip utility, iproute2-ss131122

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:        14.04
Codename:       trusty

The machine in question is a Surface Book running Win 10 fast ring, build 14965.rs_prelease.161104-1700
Later today I'll try wiping out my WSL data and creating a new installation.

Hmm, it shouldn't be anything to do with Trusty vs Xenial, right? I'm on Xenial (which I thought was default now?):
% ip -V
ip utility, iproute2-ss151103

I'm not in the office right now, but I'm guessing it's 99% because of the "Teredo" interface, which has 32-byte hardware addresses, which we are not handling correctly in lxcore. I actually fixed this bug last week, so it should be hitting insiders really soon. I'll update this thread tomorrow if I find out if it turns out to be a different issue.

@simonbuchan I upgraded my WSL Bash from Trusty to Xenial, tried again, same results. So it doesn't appear to be related to the Ubuntu version but rather the network setup itself, like Jason suspects.

I've got "Teredo Tunneling Pseudo-Interface" too. Will wait for another build to land.
Thanks for your work!

Running netsh interface teredo set state disabled in a privileged shell prompt fixed the problem for me! Running ip addr now prints my network interfaces, and after clearing and reinstalling my node_modules i was finally able to start my app. Thanks @JasonLinMS and everyone else! Hopefully we'll see that teredo fix released soon because it makes me uncomfortable leaving it disabled. 💯

Sorry for the late response.

Does 'ip addr show' work for you? If so, can you share the output?

No. I get Cannot send dump request.  : Media disconnected
   Connection-specific DNS Suffix  .  : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter Ethernet 4:

   Connection-specific DNS Suffix  .  :

Ethernet adapter Ethernet 11:

   Connection-specific DNS Suffix  .  :

Ethernet adapter Ethernet 16:

   Connection-specific DNS Suffix  .  :

Ethernet adapter VirtualBox Host-Only Network #7:

   Connection-specific DNS Suffix  .   : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Connection-specific DNS Suffix  .  : ::

Workaround (which will disable IPv6 support on your machine): Run a cmd as Administrator and run:
netsh interface teredo set state disabled
Afterwards stuff like ip addr show works again

Sorry to ask this after being asked not to, but the last few responses got a little confusing to me, with all the logs. What is the status of this?
I just bought a new machine last week, downloaded automatic updates, enabled bash, and it didn't work. Is it that there's anything extra I need to do to get the latest version, or is it - the fix - simply not out yet?

this does work if you disable the teredo interface as said above. the full fix is not out yet

Only in the insider preview builds.
On Fri, 16 Dec 2016, 07:40 Roman Usherenko<EMAIL_ADDRESS>wrote:

this does work if you disable the teredo interface as said above. the full
fix is not out yet
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/BashOnWindows/issues/468#issuecomment-267406363,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABwVo5uSYcQ4l9FpDxUa9bjgabo1F89vks5rIYmkgaJpZM4ItDqq
.

Okay, thanks for the quick feedback. I'll keep waiting for the full thing patiently :)"
Fortunately I still have an Ubuntu machine I can use for work until it works, so I won't mess with it for now.

How can I upgrade bashOnWindows?
I can't even to see my ifconfig:
$ ifconfig
Warning: Can not to open /proc/net/dev (No such file or directory). Limited output.
$

I'm one of those recent refuges that is making the switch from macOS...

this does work if you disable the teredo interface as said above. the full fix is not out yet

I did disable the teredo interface as detailed above but this still isn't working for me. I tried both simple tests ip addr show and the node test of os.networkInterfaces() (as well as running my gulp build)
I'm not opposed to getting on the Insider program, but I was hoping the workarounds would work for me...

@rohn -- welcome to Windows and WSL!  It may be a bit of a rough ride; this is definitely still beta software.  But in my opinion it's really cool and they're releasing big improvements on a regular basis.
The issue with Teredo interfaces is only relevant to recent Insider builds.  Unfortunately, network-address enumeration simply doesn't work at all on the current stable Windows version.
The KB things are service packs; unfortunately, WSL improvements are not being released that way.  If you're running bash and you're not in the Insider program, the only build that's available that can do that is build 14393.  Updates are only available via the Insider program, which is up to build 14986.  They will be rolled into the next Windows major-version release, which I believe is scheduled for next spring sometime.
(For a sense of how far things have come:  WSL was first introduced in Insider build 14316.  So, the Stable version of WSL is about 70 builds old; the Insider version is about 600 builds old.  It has been under continuous active development for that time.)
@vpArth -- Updates are available through Windows Update to people who have joined the Insider program:  http://insider.windows.com/  Note that Insider builds update all of Windows, not just WSL / Bash on Windows.

My current workaround is shimming the os.networkInterfaces function by shimming node to load my shim file... ;)
Basically, this shim will prevent the crash when any node script calls os.networkInterfaces(). It will not make the network interfaces work correctly, though - the scripts will always just see the loopback interface, but no actual interfaces. Still, this solves a lot of problems already.
I created a bash script which does the dirty work for you: https://gist.github.com/CherryDT/c1c7bf19e5258435bfbd3e3dee6e7dee

Make sure you have node installed managed by n, if not: sudo npm install -g n && sudo n latest (instead of latest, you can specify a node version)
Download the script: curl https://gist.githubusercontent.com/CherryDT/c1c7bf19e5258435bfbd3e3dee6e7dee/raw > ~/bin/wsl_node_network_interfaces_shim.sh && chmod +x ~/bin/wsl_node_network_interfaces_shim.sh
Install the shim: wsl_node_network_interfaces_shim.sh install
Test it: node -e 'console.log(require("os").networkInterfaces())' (should output a loopback interface instead of failing)

To uninstall the shim again, use: wsl_node_network_interfaces_shim.sh uninstall
In case anything goes wrong and the script left you in a state in which you can't use node, use: wsl_node_network_interfaces_shim.sh uninstall -f

Closing this out. If anyone is still (on builds 15007+) having problems, please let us know and we can reopen.

@sunilmut on the insider program website, the latest available version available is 15002. Where can we download 15007+?

@jumbosushi -- if you download and install 15002, 15014 should appear as a Windows Update.  It may take 24-48 hours to appear.  I unfortunately don't know of a better way to download it; you're not the first person to ask...

In build number 1607 still fails.

Child extract-text-webpack-plugin:
ERROR in EINVAL: invalid argument, uv_interface_addresses

@jonathancalb - Build 1607 is still the Anniversary Update build (14393). You can see that by using the Windows command ver. These fixes are currently only available to Windows Insider builds, but will soon will also be available to Creators Update release.

or we can just boot linux and ditech this whole mess....
Sorry but it just gets really annoying sometimes.

Is this available on Slow Ring or Fast Ring?

Currently only the fast ring.  Slow ring still seems to be on a build from December if Wikipedia can be trusted.

I'm going to be honest here. With once a year updates, this thing will never be viable as a development environment. This issue has prevented webpack development without workarounds. Maybe other issues come up in the future, I think there should be more regular updates to normal windows builds, not just insider updates. The package is clearly labeled as beta, so users could expect breaking changes, but I think it will be worth it in the long run.

Just have to voice my opinion on this, because even tho I'm in the same boat as you I don't agree at all.
Yes, I'm as frustrated as you that issues such as this and file watchers hinder a lot of modern development.
It is however labelled as beta very prominently and quite hard to enable, so it's obviously a very early feature.
It's only been in the wild since august (6 months) and the next update scheduled for April should include all the fixes needed.
OFC I can understand the sentiment that they should've waited longer before releasing it but I'd rather have early access to beta features that doesn't quite work than wait another 6 months just to get a taste.

@kokarn I completely agree with you. All I'm saying is that BashOnWindows should have a separate update mechanism, like Edge or Chrome. Frequent updates. This issue has been resolved in insider builds, but users should wait until April for it to land on their systems.

Yeah, that's very true. Hopefully, it will be when it get's closer to a final product, but who knows. Might not even be needed depending on how they implement things as coverage might get close to full pretty quickly.

@miladmostavi I believe they adressed this before, and the reason they can't ship updates to WSL alone is related to the fact that a lot of what happens underneath is coupled with other internal changes on the kernel and stuff.
I believe the fact that we need updates right now is because the initial release was a beta, like @kokarn said. I find it hard to believe that it will always be like that.
Once the LTP tests are almost all passing and they start tackling some of those lower priority (big) changes, I believe the need for constant update will decrease.

@miladmostavi, @kokarn, @mateusmedeiros - I appreciate the discussion.
Others have touched on this but I think it's important to note that WSL is still very much in beta.  As far as Microsoft goes we're in uncharted waters where we shipped an internal Windows component in a half-finished state (intentionally).  Personally I think this experiment has hugely paid off because by doing so we've gotten a ton of invaluable feedback that we've used to make our product even better.  I'm very proud of all of the work that has gone into our feature in the last 6 months and think our Creators Update release is going to a huge improvement.  Does that mean that we're done?  Absolutely not, but it does mean that we'll be enabling more developers to use more of the Linux tools that they rely on in their workflow.
I tend to agree with what others have said, that as our compatibility gets closer to native Linux the release cadence of WSL will become a much smaller issue.  I also agree that it would be nice to have a faster ship mechanism but there is currently no way for an internal Windows component to be serviced "out of band."

+1

I'm still having an issue here with the latest microsoft build 14393?
I get this when attempting to run a node localhost server.
var interfaces = os.networkInterfaces();
Error: EINVAL: invalid argument, uv_interface_addresses\
The comment feed here is very long and I'm unclear on rather this issue is closed due to it being solved or closed as in the team has given up on the issue? Thanks for any help

@micahblu It was fixed in build 15007.
Take a look at the tags of this issue: "fixedininsiderbuilds" is among them, indicating that it has been fixed already but is not on any release build yet (which takes months usually). You can get the fix if you join the Windows Insider program to get Insider builds. Once it is on a release build, the tag will be replaced with "fixed", I believe.

Hi @micahblu -- thanks for posting, but it's a long thread in part because people keep asking questions that have already been answered :-)  So I hope you'll understand if I give you a brief answer and direct you to go read the thread.
In short:  This problem has been fixed for a while now.  The fix is only available in Insider builds, which are much newer than build 14393.
The fix is not being backported; it will ship with the next major version of Windows, which is due out in a few months.  There's lots of discussion about all of this above.

Thanks!

@aseering Will this be fixed in the creators update?
https://blogs.windows.com/windowsexperience/2017/03/29/windows-10-creators-update-coming-april-11-surface-expands-markets/#y78c8ro81mrI2dXQ.97
because if so, the fix is less than 2 weeks out :D

@mikaturk It will. It has been fixed for us using insider buils for some good time now.

@mikaturk

Will this be fixed in the creators update?

Yes, it will be.

I'm waiting for the fix. Meanwhile I switched temporarly to git bash for Windows in order to run my node builds. I still have high hopes for Windows Subsystem for Linux feature.

As per @nmai & @saschagehlich said, I've tried this command
> netsh interface teredo set state disabled

On cmd (as Administrator), but still got no luck with either ip addr show and ifconfig
$ feryardiant at MIMIN-ZENBOOK in ~
[11:13:10] → ip addr show
SO_SNDBUF: Invalid argument

$ feryardiant at MIMIN-ZENBOOK in ~
[11:13:13] → ifconfig
Warning: cannot open /proc/net/dev (Tidak ada berkas atau direktori seperti itu). Limited output.

And still having same issue on node js
EINVAL: invalid argument, uv_interface_addresses

Did I need to completely reinstall WSL again? or reboot my PC? or what? 😅

Windows 10 Home 1607 build 14393.969

You are still on Anniversary Update, could you install Creators Update and try again?

Is the Creators Update already released publicly? or I need to join Windows Insider first?
Thanks for your fast reply @benhillis

No updates yet, unfortunately

Yes you can download now: https://www.microsoft.com/en-us/software-download/windows10ISO

Okay @benhillis, I'll try it and will back to you.

I can confirm that Creators Update is solve the issue. ifconfig and ip addr show works just fine,
$ feryardiant at Mimin-Zenbook in ~
[12:38:04] → ifconfig
eth1      Link encap:Ethernet  HWaddr 0a:00:27:00:00:02
          inet addr:<IP_ADDRESS>  Bcast:<IP_ADDRESS>  Mask:<IP_ADDRESS>
          inet6 addr: fe80::3411:3e51:18ca:2394/64 Scope:Unknown
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth2      Link encap:Ethernet  HWaddr 0a:00:27:00:00:07
          inet addr:<IP_ADDRESS>  Bcast:<IP_ADDRESS>  Mask:<IP_ADDRESS>
          inet6 addr: fe80::ac6f:9be5:bf8:2298/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:<IP_ADDRESS>  Mask:<IP_ADDRESS>
          inet6 addr: ::1/128 Scope:Global
          UP LOOPBACK RUNNING  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wifi0     Link encap:UNSPEC  HWaddr 10-02-B5-52-3F-CD-00-00-00-00-00-00-00-00-00-00
          inet addr:<IP_ADDRESS>  Bcast:<IP_ADDRESS>  Mask:<IP_ADDRESS>
          inet6 addr: fe80::f56d:7300:e95d:d95/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

$ feryardiant at Mimin-Zenbook in ~
[12:38:08] → ip addr show
8: eth0: <> mtu 1500 group default qlen 1
    link/ether 00:ff:ce:91:fd:d4
    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global dynamic
       valid_lft forever preferred_lft forever
    inet6 fe80::347d:e364:27e4:ec62/64 scope global dynamic
       valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 group default qlen 1
    link/ether 0a:00:27:00:00:02
    inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global dynamic
       valid_lft forever preferred_lft forever
    inet6 fe80::3411:3e51:18ca:2394/64 scope link dynamic
       valid_lft forever preferred_lft forever
7: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 group default qlen 1
    link/ether 0a:00:27:00:00:07
    inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global dynamic
       valid_lft forever preferred_lft forever
    inet6 fe80::ac6f:9be5:bf8:2298/64 scope global dynamic
       valid_lft forever preferred_lft forever
1: lo: <LOOPBACK,UP> mtu 1500 group default qlen 1
    link/loopback 00:00:00:00:00:00
    inet <IP_ADDRESS>/8 brd <IP_ADDRESS> scope global dynamic
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope global dynamic
       valid_lft forever preferred_lft forever
6: wifi0: <BROADCAST,MULTICAST,UP> mtu 1500 group default qlen 1
    link/ieee802.11 10:02:b5:52:3f:cd
    inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global dynamic
       valid_lft 86345sec preferred_lft 86345sec
    inet6 fe80::f56d:7300:e95d:d95/64 scope global dynamic
       valid_lft forever preferred_lft forever
4: wifi1: <> mtu 1500 group default qlen 1
    link/ieee802.11 10:02:b5:52:3f:ce
    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global dynamic
       valid_lft forever preferred_lft forever
    inet6 fe80::81f2:d837:a9ec:7129/64 scope global dynamic
       valid_lft forever preferred_lft forever

also my npm run build is working now.
$ feryardiant at Mimin-Zenbook in personal/codes/laravel-project on git:testing ●
[12:41:56] → npm run build

> @ build /mnt/d/Workspaces/personal/codes/laravel-project
> node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

 95% emitting

 DONE  Compiled successfully in 14380ms                                                                      12:42:39
                                                                                Asset       Size  Chunks                    Chunk Names
  assets/js/admin.js     301 kB       0  [emitted]  [big]  assets/js/admin
    assets/js/web.js     301 kB       1  [emitted]  [big]  assets/js/web
assets/css/admin.css   23 bytes    0, 0  [emitted]         assets/js/admin, assets/js/admin
  assets/css/web.css  519 bytes       0  [emitted]         assets/js/admin
   mix-manifest.json  194 bytes          [emitted]

Considering to remove babun from my PC 🤔
Thanks @benhillis

ubuntu apt-install npm
run npm err
how to solve?
so bad
root@2NH7VYN4YAJPLYK:~# npm
/usr/share/npm/node_modules/npmconf/config-defs.js:322
Object.keys(os.networkInterfaces()).map(function (nic) {
^
Error: EINVAL, invalid argument
at getLocalAddresses (/usr/share/npm/node_modules/npmconf/config-defs.js:322:18)
at Object. (/usr/share/npm/node_modules/npmconf/config-defs.js:269: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. (/usr/share/npm/node_modules/npmconf/npmconf.js:4:18)
at Module._compile (module.js:456:26)
root@2NH7VYN4YAJPLYK:~# /usr/bin/node --version
bash: /usr/bin/node: No such file or directory
root@2NH7VYN4YAJPLYK:~#

@SFLAQiu
You need to apt-get install node first

@SFLAQiu -- what version of Windows do you have?  (Run ver at a Windows Command Prompt, and copy/paste its output here.)  Is it version 14393?
That particular error should have been fixed in Windows build 15007.  You can get a newer version through Windows Update.

@aseering my windows os version is 14393,I'll try it out

@mikaturk I've installed node

have new question
I remove apt-get node and npm
then install nvm
nvm install stable success
root@2NH7VYN4YAJPLYK:/# nvm use 8
Now using node v8.4.0 (npm v5.3.0)
root@2NH7VYN4YAJPLYK:/# node -v
v8.4.0
root@2NH7VYN4YAJPLYK:/# npm  -v
5.3.0
root@2NH7VYN4YAJPLYK:/# nvm list
->       v8.4.0
node -> stable (-> v8.4.0) (default)
stable -> 8.4 (-> v8.4.0) (default)
iojs -> N/A (default)
root@2NH7VYN4YAJPLYK:/#
but i restart  bash，cmd node
root@2NH7VYN4YAJPLYK:/# node
The program 'node' can be found in the following packages:

node
nodejs-legacy
Try: apt-get install
root@2NH7VYN4YAJPLYK:/# node -v
The program 'node' can be found in the following packages:
node
nodejs-legacy
Try: apt-get install
root@2NH7VYN4YAJPLYK:/#

why？

Fixed in this release https://blogs.msdn.microsoft.com/commandline/2017/04/11/windows-10-creators-update-whats-new-in-bashwsl-windows-console/
Update your windows.

Is there any body can tell me how can fix this problem.
`D:\LSTU\LearnMySelf\web\Angular2\Angular2_GettingStarted\APM>npm start

<EMAIL_ADDRESS>start D:\LSTU\LearnMySelf\web\Angular2\Angular2_GettingStarted\APM
tsc && concurrently "tsc -w" "lite-server"

node_modules/@angular/common/src/directives/ng_class.d.ts(48,34): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/aot/compiler.d.ts(44,32): error TS2304: Cannot find name 'Map'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(342,20): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(344,28): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(346,15): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(348,23): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(350,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(352,25): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/output/output_ast.d.ts(433,63): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,15): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(28,16): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(87,123): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(87,165): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/lang.d.ts(12,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/lang.d.ts(13,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/browser/browser_adapter.d.ts(79,33): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(97,42): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/dom_renderer.d.ts(22,37): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/shared_styles_host.d.ts(11,30): error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/dom/shared_styles_host.d.ts(22,30): error TS2304: Cannot find name 'Set'.
node_modules/rxjs/Observable.d.ts(58,60): error TS2693: 'Promise' only refers to a type, but is being used as a value here.
node_modules/rxjs/Observable.d.ts(74,59): error TS2693: 'Promise' only refers to a type, but is being used as a value here.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR<EMAIL_ADDRESS>start: tsc && concurrently "tsc -w" "lite-server"
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR!      C:\Users\Mukhtar\AppData\Roaming\npm-cache_logs\2018-06-03T08_09_19_261Z-debug.log
D:\LSTU\LearnMySelf\web\Angular2\Angular2_GettingStarted\APM>`

update to the latest Node version


Sign Firefox Addon

Hey @rev087!
The Firefox addon at http://ng-inspector.org/ cannot be installed on Firefox Developer Edition (FDE) since all addons have to be signed from v42 onwards (according to https://wiki.mozilla.org/Addons/Extension_Signing#Timeline). FDE currently is on v42.
Could you please submit your addon to Mozilla to have it automatically reviewed and maybe even hosted on the addon marketplace? I'd really appreciate it!
Further instructions about how to sign an addon can be found here:
https://blog.mozilla.org/addons/2015/02/10/extension-signing-safer-experience/
Thanks! If you need any help, please let me know.

Hey @SteffenLanger. Thanks for the report!
We'd like to get the extension back in the Firefox marketplace, but there is some work required before that can happen (see #113).
We've both been pretty busy lately, but if you'd like to tackle some of the issues, we'd love the support.

I opened a pull request last week at https://github.com/rev087/ng-inspector/pull/137. I know you have a lot to do currently
For other developers having the same issue: Firefox Developer Edition and Firefox Nightly both allow to install unsigned addons if configured correctly (https://wiki.mozilla.org/Addons/Extension_Signing#FAQ).

Bump.  Firefox version 43.0 just completely broke ng-inspector.

I'm also looking forward for ng-inspector to be pushed to Mozilla's Marketplace.
I can also confirm that the ng-inspector is not working on FF 43.0.2 / Win server 2012 (it shows just a gray panel).

FF 48, which came out today, no longer supports the workaround of disabling signature checking. The addon is dead on today's FF and moving forward unless you sign it.

It's 2017 and the addon still cannot be used. Any news on this?

@MatejQ I gave up and just don't use it anymore.  It doesn't work with Angular2 anyway, so it's shelf life is limited.

Well, I have used it in Chrome on Angular 2 application but it was sluggish and crashing (maybe because the application was a more complex one). So I thought that maybe Firefox wouldn't have this issue. Anyway, looks like it is dead, that's a shame :(

augury  try it


How to implement the bread crumbs in the UWP application whit this template?

Where get steps navigation? How to do everything, if the control with crumbs will AppShell xaml.

You can try to use Frame BackStack and ForwardStack.
var frame = App.Current.NavigationService.Frame; // Get navigation Frame
var navParam = frame.BackStack.First().Parameter; // Navigation Parameter
var navPageType = frame.BackStack.First().SourcePageType; // typeof Destination Page
// frame.ForwardStack

Let SO be the home for this question http://stackoverflow.com/questions/39139336/how-to-implement-the-bread-crumbs-in-the-uwp-application

@JerryNixon This is exactly what I was asking the question, just another nickname :-)
Can you help me?


Implement system_status() and battery_blocks()

Fixes #6
implements call to /api/system_status with system_status()
implements battery_blocks() by merging data from calls to
system_status() and vitals()

I noticed that I failed to resync properly and so the raise ValueError() that you removed got put back into this PR. Sorry about that.

Thanks @wcwong !  These will be useful functions for anyone wanting detailed battery data.  I see you raised #11 for adding more from TPOD and TEPINV data.


⚠ Bofrost.at has degraded performance

In e56ac08, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2497 ms

Resolved: Bofrost.at performance has improved in cc8440f.


bench: unify the foyer bench

With the new storage engine, the old foyer-storage bench seems not that good to measure the ability of foyer.

close via #475


openntpd -s flag deprecated: how can I force synchronization ?

Describe the bug
I have a dual boot windows/linux. Booting windows messes up my clock in linux by 1 hour (I have  time.hardwareClockInLocalTime to false, I know I can fix it by configuring windows to save it in non localtime too but for the sake of the argument, stay with me. I used to run sudo ntpd -s to force a resync but that's apparently a thing of the past:
$ sudo ntpd -s
-s option no longer works and will be removed soon.
Please reconfigure to use constraints or trusted servers.

I've added constraints and restarted it
cat /etc/ntpd.conf                                                                                ~
server 0.nixos.pool.ntp.org
server 1.nixos.pool.ntp.org
server 2.nixos.pool.ntp.org
server 3.nixos.pool.ntp.org
constraints from "https://www.google.com/"
constraints from "https://www.nixos.org/"

with this log
Feb 04 13:07:38 jedha systemd[1]: Starting OpenNTP Server...
Feb 04 13:07:38 jedha ntpd[15232]: ntp engine ready
Feb 04 13:07:39 jedha ntpd[15232]: constraint reply from <IP_ADDRESS>: offset -3596.721515
Feb 04 13:07:39 jedha ntpd[15232]: constraint reply from 2a00:1450:4007:806::2004: offset -3596.731402
Feb 04 13:07:39 jedha ntpd[15232]: cancel settime because offset is negative or close enough
Feb 04 13:07:39 jedha systemd[1]: Started OpenNTP Server.
Feb 04 13:07:39 jedha ntpd[15232]: constraint reply from 2a03:b0c0:3:d0::d24:5001: offset -3596.855468
Feb 04 13:07:39 jedha ntpd[15232]: constraint reply from <IP_ADDRESS>: offset -3596.855715
Feb 04 13:07:39 jedha ntpd[15232]: constraint reply from <IP_ADDRESS>: offset -3596.861501
Feb 04 13:07:39 jedha ntpd[15232]: constraint reply from 2a05:d014:275:cb00:29f:95e8:f0de:2bdd: offset -3596.873497

I've tried "trusting" a server
server 1.nixos.pool.ntp.org
server 2.nixos.pool.ntp.org
server 0.nixos.pool.ntp.org trusted
constraints from "https://www.google.com/"
constraints from "https://www.nixos.org/

to no avail
Feb 04 13:38:18 jedha systemd[1]: Stopped OpenNTP Server.
Feb 04 13:38:18 jedha systemd[1]: openntpd.service: Consumed 150ms CPU time, received 44.7K IP traffic, sent 24.5K IP traffic.
Feb 04 13:38:18 jedha systemd[1]: Starting OpenNTP Server...
Feb 04 13:38:18 jedha ntpd[23113]: ntp engine ready
Feb 04 13:38:19 jedha ntpd[23113]: cancel settime because offset is negative or close enough
Feb 04 13:38:19 jedha systemd[1]: Started OpenNTP Server.
Feb 04 13:38:19 jedha ntpd[23113]: constraint reply from 2a00:1450:4007:80f::2004: offset -3596.577563
Feb 04 13:38:19 jedha ntpd[23113]: constraint reply from <IP_ADDRESS>: offset -3596.581681
Feb 04 13:38:19 jedha ntpd[23113]: constraint reply from <IP_ADDRESS>: offset -3596.728738
Feb 04 13:38:19 jedha ntpd[23113]: constraint reply from 2a03:b0c0:3:d0::d19:7001: offset -3596.730574
Feb 04 13:38:19 jedha ntpd[23113]: constraint reply from <IP_ADDRESS>: offset -3596.735960
Feb 04 13:38:19 jedha ntpd[23113]: constraint reply from 2a03:b0c0:3:e0::1b:1: offset -3596.801684
Feb 04 13:38:37 jedha ntpd[23113]: peer <IP_ADDRESS> now valid
Feb 04 13:38:40 jedha ntpd[23113]: peer 2001:bc8:2a01:100::42 now valid
Feb 04 13:38:40 jedha ntpd[23113]: peer <IP_ADDRESS> now valid
Feb 04 13:40:04 jedha ntpd[23231]: adjusting local clock by -3595.753295s

even though it says adjusting local clock by -3595.753295s, a call to  Thu Feb  4 01:42:56 PM CET 2021 is still 1 hour more.
@thoughtpolice asking here since I was unsure if https://github.com/openntpd-portable/openntpd-portable/issues was the correct tracker to ask for help ?
One may want to change the example for
    extraOptions = mkOption {
      type = with types; separatedString " ";
      default = "";
      example = "-s";
      description = ''
        Extra options used when launching openntpd.
      '';

sinmce -s is deprecated.
Notify maintainers

this is on unstable

actually my hardware clock assumes it's UTC when it is set to CET time instead
sudo hwclock --show --verbose
[sudo] password for teto:
hwclock from util-linux 2.36.1
System Time:<PHONE_NUMBER>.577741
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at<PHONE_NUMBER> seconds after 1969
Last calibration done at<PHONE_NUMBER> seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2021/02/04 12:53:40
Hw clock time : 2021/02/04 12:53:40 =<PHONE_NUMBER> seconds since 1969
Time since last adjustment is 17067 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2021-02-04 13:53:39.655853+01:00

I've switched to services.ntpd instead

@teto Sorry for the delay on this. Yes, the documentation should certainly be fixed at the very least, but more broadly I've actually thought of deprecating and removing openntpd anyway, for reasons like this one (the inability to immediately force a synchronization and wait on that to occur also makes openttpd an unusable solution for daemons like Ceph or CockroachDB that mandate precise synchronization before startup; letting clock sync occur in the background asynchronously isn't acceptable and it's not possible to paper over this discrepancy in any way, AFAICS.) I think the reality is just that the openntpd project is tailored exclusively for the needs and desires of OpenBSD developers, and its usage on Linux is only "nice to have" due to the work of volunteers making it possible, but it's otherwise not a development priority. So stuff like this (behavioral differences, deprecation of -s out of nowhere, etc) is bound to happen due to cultural differences.
Again, sorry for the delay here.

thanks for the insight ! No issue if you looked at timestamps i opend and closed the issue in 20mn; it served more like a ruibberduck thing xD


s3 path and filename 'undefined' in production (works in development)

Thanks for this project.  I'm trying to use it in a project where my React front end is completely separate from my node backend, and got everything working in local development.
However, for production I'm building static assets for my front end and serving them from a static web server (s3 actually...).  When I run the upload operation in my production app, the signing service works as expected but the PUT url to the s3 bucket leaves the s3path and fileName undefined.  Any ideas what could be going on?
Development:

Production:

I think this was an issue with my AWS configuration, nothing to do with this project.

I'm using Cloudfront in front of S3 as a CDN, and if I remember correctly the issue was that I had to setup a cloudfront behavior for the path pattern "/s3/sign", allow HTTP Options, and enable query string forwarding.
It was the query string forwarding thing that was causing undefined, I'm pretty sure.


HacktoberFest TeaTime logo to readme

Adds Tea Time logo to readme for Hacktoberfest!! :)

tidies up the readme a bit

Harry

Hi @hghazni thanks for your pull request! We have accepted one logo, do you still want to submit your linting changes + reference to the new logo that is now in the root of the project?

I do still want to submit it :)


Login & registration form offset

Gitea version (or commit ref): 1.15.0
Git version: 2.25.1
Operating system: Ubuntu 20.04.3 LTS
I am running gitea using the prebuilt binary from dl.gitea.io. It is running via systemd.

Database (use [x]):

[ ] PostgreSQL
[X] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[X] No

Log gist:
N/A

Description

The login & registration form appears to be offset (to the right) on mobile. You can see in the screenshots below.
Screenshots
(This is on mobile. On desktop, this issue does not exist.)
https://i.imgur.com/gnFQ9Ob.png
https://i.imgur.com/Jv3bbci.png

Can't reproduce on desktop browser in mobile mode at least:

Can't reproduce on desktop browser in mobile mode at least:

As mentioned, this issue is not present on Gitea.com
It is present with pretty much any other Gitea instance, including codeberg.org

I see it on https://codeberg.org/user/sing_up. Issue comes from this rule:
@media only screen and (max-width: 767.98px) {
  .ui.ui.ui.container:not(.fluid) {
    width: auto;
    margin-left: 1em;
    margin-right: 1em;
  }
}

No idea why but that rule does not seem to be present on try.

Actually this was fixed in https://github.com/go-gitea/gitea/pull/16396, will backport it.

I see it on https://codeberg.org/user/sing_up. Issue comes from this rule:
@media only screen and (max-width: 767.98px) {
  .ui.ui.ui.container:not(.fluid) {
    width: auto;
    margin-left: 1em;
    margin-right: 1em;
  }
}

No idea why but that rule does not seem to be present on try.

The issue also occurs on my personal gitea instance and some others. Not sure why.

Actually this was fixed in #16396, will backport it.

Alright, thanks.

Backport to 1.15 in https://github.com/go-gitea/gitea/pull/16976.


feat: CDK Build Integration Test

Adds @jsii/integ-test private module for defining new integration tests.
Adds a new integration test that downloads the latest CDK release source
code and builds it with the local version of jsii and jsii-pacmak.
This unit test requires a github access token defined in the environment
to get the latest release version and download the asset.
Fixes: #1209

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

AWS CodeBuild CI Report

Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

This unit test requires a github access token defined in the environment

Wait, why not clone the release branch of the public repo, or download the latest release's source? Neither of those should need a GitHub token, rite?

Wait, why not clone the release branch of the public repo, or download the latest release's source? Neither of those should need a GitHub token, rite?

We use the token to hit the GH API and get the tag of the latest release. Then using that tag we download the source from the archive. Neither of these actually requires a token but it gets rate limited pretty quickly without one.
Doing a git clone and checkout of the release branch wouldn't require a token, but I'd rather us know the specific tag we are checking out and not check out the latest release branch. In my mind its more robust? 🧐 Asking for "latest published release" vs git checkout release feels more decoupled.

AWS CodeBuild CI Report

CodeBuild project: AutoBuildProject6AEA49D1-Blkkw9bQFn8A
Commit ID: e90246fee7d225be554b7c0117ce285d27b2a617
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository


duplicate headers

Describe the bug
env: spring-cloud-gateway 3.1.3 version
os:mac os 10.15.7
jdk:11
desc： When I go to a URL that doesn't exist, I return a bunch of duplicate headers

If you'd like us to spend some time investigating, please take the time to provide a complete, minimal, verifiable sample (something that we can unzip attached to this issue or git clone, build, and deploy) that reproduces the problem.

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.


How do I set the workerSrc with chunkhash?

HI,
I got the webpack example like this:
webpack.config.js:
entry: {
    'pdf.worker': 'pdfjs-dist/build/pdf.worker.entry'
  },
  output: {
    filename: '[name].bundle.js'
  },

and main.js like this:
var pdfjsLib = require('pdfjs-dist');
pdfjsLib.PDFJS.workerSrc = '../../build/webpack/pdf.worker.bundle.js';

It's works!
But in my project, the webpack.config.js looks like this:
entry: {
    'pdf.worker': 'pdfjs-dist/build/pdf.worker.entry'
  },
  output: {
    filename: 'static/scripts/[name].bundle.[chunkhash].js'
  }

how do I set the pdfjsLib.PDFJS.workerSrc with chunkhash ?
I coded like this but I think it won't  work cause the value is a String:
var pdfjsLib = require('pdfjs-dist');
pdfjsLib.PDFJS.workerSrc = '../static/scripts/pdf.worker.bundle.[chunkhash].js';

Could you tell me How should I do? ^_^

I couldn't make it work this way, then I tried the
var pdfjsLib = require('pdfjs-dist/webpack');
It didn't work as well, but it was some worker-loader issue in my webpack configuration. I managed to use it after all just pointing to an external worker script.

This sounds more like a Webpack issue rather than a PDF.js one. However, a quick search brought up https://webpack.github.io/docs/long-term-caching.html, which seems relevant here.
Based on the information provided there you should be able to output the actual filename with Webpack, and then just assign that to workerSrc.
If you're not able to make that work, then as asked for in both https://github.com/mozilla/pdf.js/blob/master/.github/ISSUE_TEMPLATE.md and https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md, you'll need to provide a complete (runnable) example (since just code snippets aren't very helpful).


Rule with dynamic parameter

This is my rule
{
    "location": "here",
    "rule": {
        "action": {
            "code": "var msg ='Name :' + who + ' age : '+x; console.log(msg); msg;"
        },
        "condition": {
            "and": [
                {
                    "pattern": {
                        "age": "?x",
                        "name": "?who"
                    }
                },
                {
                    "code": "x >6"
                }
            ]
        },
        "when": {
            "pattern": {
                "age": "?x",
                "name": "?who"
            }
        }
    }
}

In the above JSON, I am checking with constant 6 where age> 6 in my condition, but is there a way where I can pass a variable instead of fix values from the uri: /api/loc/events/ingest
For example
uri: /api/loc/events/ingest
request
{
    "location": "here",
    "event": {
        "age": "8",
        "name": "sonu"
    }
}

The age passed here i.e. 8 should be used in the rule condition and the result should be according to that?

Do you want to pass the the value of age and the threshold both in the event digest? You can change the pattern then, to capture that value in a variable. But in the sample even digest, you are passing only the value of age. So 8 will be compared to which value?
I think you want to pass both the threshold and the value in the event. e.g.
{
    "location": "here",
    "event": {
        "age": "8",
       "age_threshold": "6",
        "name": "sonu"
    }
}

Then your rule can be,
{
    "location": "here",
    "rule": {
        "action": {
            "code": "var msg ='Name :' + who + ' age : '+x; console.log(msg); msg;"
        },
        "condition": {
            "and": [
                {
                    "pattern": {
                        "age": "?x",
                       "age_threshold": "?t",
                        "name": "?who"
                    }
                },
                {
                    "code": "x > t"
                }
            ]
        },
        "when": {
            "pattern": {
                "age": "?x",
                "age_threshold": "?t",
                "name": "?who"
            }
        }
    }
}

One thing, in the ingest you are passing the value as string so the comparison will be string comparison. I think in the code you should convert the value and threshold to numeric explicitly for numeric comparison.

Thanks @rakesh-roshan for the suggestion.
I will try it out and let you know about the result.
Thank you so much.

Hi Rakesh,
Your solution worked great. Thanks for sharing.
However, can we perform comparisons (>, <, etc) at the pattern level? and not on "code" level


not all code block highlight by lines

there were still something strange.

not all code block highlight by lines
the jsx and index is here @styfle
Desktop.zip

Hm, from the screenshot it looks like all the code snippets are highlighted as some other language, not Python. For instance, identifiers like dssm_preprocessor should not be highlighted at all for Python. It seems that autodetection took place here.
I don't really understand why it works that way. Can you please provide a complete example to play with?

I think so.
but i don`t know what should i offer, i write it with React. Maybe you can just try what i do.
Just use marked.js and highlight.js to make code block markdown highlighted. @egor-rogov

Can please you confirm is there is still an issue here or not?

Ping.

Closing due to inactivity.  If this is still an issue please response and we an re-open.


Multiple host addition

URL for relevant page?
What products and version are you using?
product is complete tick stack configured in one system. Now I wanna add more hosts so that I can monitor them so can anyone tell me how can i do so?
Where did you look before opening the issue?

@pratibhadeepti to make sure I understand your question... you have the TICK stack installed on a single node.  Now, you would like to use it to monitor some other machines?
If so, that is all about deploying and configuring Telegraf to gather the stats you want from those other machines and feeding it back to your InfluxDB instance.
You might consider visiting the community site for this kind of assistance.
https://community.influxdata.com
Since this isn't explicitly a documentation issue. I'm going to close this.


Backbone update event on collection should return the newly added or removed model(s)

Want to work on a PR?

Absolutely.


Slack module

To start by something , at least, one on them https://api.slack.com/ with https://github.com/slackapi/python-slackclient

#155 permits to use Slack webhook


Change which time and location are used for fetching weather

Right now the start location and time is used for the weather.
If possible, use the mid point of the activity to determine the time and location for the weather.
For activities above a certain duration, the start and end could be used. This may need to be configurable via a setting.

Look at #37 when implementing this. If it can easily be done, do it. Otherwise close as won't fix.

This may also be possible to do by simply looking at the extra data returned by the darksky api. If it returns the weather at the start of the activity, as well as hourly data, then long activities could use the hourly forecast to create a "range" value.


[Fix] CUTLASS path finding

This PR fixes the path finding for 3rdparty/cutlass by trying out different combinations. It is helpful when TVM is packaged differently.

CC: @masahi

This PR should have been sent to main.


Implement SingleOrNew

Originally reported on Google Code with ID 12
Implement SingleOrNew as per http://stackoverflow.com/questions/561762/what-about-a-singleornew-method-
instead-of-singleordefault-in-linq/561787#561787

Reported by jonathan.skeet on 2009-02-18 16:19:03

This is already implemented as SingleOrFallback

I think that SingleOrFallback should not exist, and instead provide FallbackIfEmpty, the same way that SingleOrDefault does not provide a way to specify the default value.

@fsateler Agree and this has been dormant for almost 7 years anyway! Closing this as addition of FallbackIfEmpty is now being followed-up in #122.


Add BitAdd to MiniRust

Add BitAdd to the binary ops of Int and Bool. The translate_rvalue now returns the new operation instead of None → therefore the return type does not have to be Option wrapped anymore.
Should I add some additional tests for this?

Apart from the missing test, looks good. :)

Yes please add a test in tooling/minitest.

Added a new test in tooling/minitest/src/tests/bit_and.rs :)

GitHub doesn't reliably send email notifications on force-pushes, so after you rebased and pushed please leave a message to ensure I see that.

@RalfJung branch is updated.


Data available-notification from sub domain

As Post Office I want to receive a notification about available data so that I can work with the data.

Fictional message must be generated in PoC.

Dependency on sub domains to deliver messages.


WIP: 36 Improve output and verbose options

Merge Request - GuideLine Checklist
Guideline to check code before resolve WIP and approval, respectively.
As many checkboxes as possible should be ticked.
Checks by code author:
Always to be checked:

[ ] There is at least one issue associated with the pull request.
[ ] New code adheres with the coding guidelines
[ ] No large data files have been added to the repository. Maximum size for files should be of the order of KB not MB. In particular avoid adding of pdf, word, or other files that cannot be change-tracked correctly by git.

If functions were changed or functionality was added:

[ ] Tests for new functionality has been added
[ ] A local test was succesful

If new functionality was added:

[ ] There is appropriate documentation of your work. (use doxygen style comments)

If new third party software is used:

[ ] Did you pay attention to its license? Please remember to add it to the wiki after successful merging.

If new mathematical methods or epidemiological terms are used:

[ ] Are new methods referenced? Did you provide further documentation?

[ ] The following questions are addressed in the documentation (if need be):

Developers (what did you do?, how can it be maintained?)

For users (how to use your work?)

For admins (how to install and configure your work?)

For documentation: Please write or update the Readme in the current working directory!

Checks by code reviewer(s):

[ ] Is the code clean of development artifacts e.g., unnecessary comments, prints, ...
[ ] The ticket goals for each associated issue are reached or problems are clearly addressed (i.e., a new issue was introduced).
[ ] There are appropriate unit tests and they pass.
[ ] The git history is clean and linearized for the merge request. All reviewers should squash commits and write a simple and meaningful commit message.
[ ] Coverage report for new code is acceptable.
[ ] No large data files have been added to the repository. Maximum size for files should be of the order of KB not MB. In particular avoid adding of pdf, word, or other files that cannot be change-tracked correctly by git.

Closes #36

@Philou31 Could you have a quick look if you like my suggestion? Better ideas or modifications proposed? How about the many commented lines of output (in particular disp()). Do we remove or uncomment and integrate them?
@CodingAllan Can you have a check that I did not introduce any new error?


Properly unit testing the failure

I am trying to test my catch handler in a piece of code :
class User {
  actionsOnDB () {
    this.knex('users')
      .create()
      .then( () => {
        console.log('Done');
      })
      .catch( (err) => {
        console.log('Error');
      })
  }
}

I am using Sinon with something like :
Sinon.stub(user.knex, 'create').returns(Promise.reject('Test Error'));

But I never get into my catch.
Is there a proper way to test that kind of things?
Thanks

@Caligone I've got the same problem and was wondering if you ever resolved it? Not sure how to test the catch statement either ...

@afgallo Sorry, I don't

@Caligone I actually got that to work:
const stub = Sinon.stub(User, 'fetchAll').returns(Promise.reject(new Error()));
Not sure why the "create" function can't be stubbed. @tgriesser could you shed some light?

create isn't a knex method, not sure what you're trying to stub here

Thanks @tgriesser, this should answer @Caligone's question.


style: convert all tabs to spaces ("    ")

so tabs and spaces are no longer mixed
It first seemed to me that there are more tabs than spaces, but then I saw the diff huge. I personally prefer spaces, so I switched. But then that also gave a big diff. I think there were more inconsistencies. Now we have four spaces consistently.

Spaces are better haha, thanks for this. I'll merge it this weekend