Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 Bash on Windows Error: addMembership EINVAL #955

Closed
StalkAlex opened this issue Jun 22, 2017 · 8 comments · Fixed by #958
Closed

Windows 10 Bash on Windows Error: addMembership EINVAL #955

StalkAlex opened this issue Jun 22, 2017 · 8 comments · Fixed by #958

Comments

@StalkAlex
Copy link

StalkAlex commented Jun 22, 2017

After updating from 2.4.5 to 2.5.0 it starts to give an error during start up. It happens straight away.

> node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress --colors

 10% building modules 1/1 modules 0 activeevents.js:182
      throw er; // Unhandled 'error' event
      ^

Error: addMembership EINVAL
    at exports._errnoException (util.js:1016:11)
    at Socket.addMembership (dgram.js:579:11)
    at Socket.<anonymous> (/mnt/f/****/****/app/node_modules/multicast-dns/index.js:53:16)
    at emitNone (events.js:110:20)
    at Socket.emit (events.js:207:7)
    at startListening (dgram.js:144:10)
    at _handle.lookup (dgram.js:249:7)
    at _combinedTickCallback (internal/process/next_tick.js:105:11)
    at process._tickCallback (internal/process/next_tick.js:161:9)
    at Function.Module.runMain (module.js:607:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! *****@4.4.0 dev: `node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress --colors`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the *****@4.4.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/****/.npm/_logs/2017-06-22T13_00_13_678Z-debug.log

Hide some sensitive info by star symbol.

I'm using dev server on Bash on Windows (Ubuntu inside Windows 10). As error showes problem with sockets, it's impossible to use sockets or other core stuff on Bash on Windows only user mode. I guess error related to this limitation. How this can be fixed?
Looks not good, some minor update completely breaks stuff.

@Plazmaz
Copy link

Plazmaz commented Jun 22, 2017

So I ran into this issue as well, and after hours wasted, I finally found a workaround. As long as you aren't using the --bonjour flag, edit node_modules/webpack-dev-server/bin/webpack-dev-server.js and change
const bonjour = require("bonjour")();
to
const bonjour = {};
Basically, WSL has NO support for mdns, which Bonjour is built upon, and appears to enable when imported.

@StalkAlex
Copy link
Author

Yeah, thanks for finding workaround! But it's not a solution unfortunately, it should be fixed in library globally imho.

@Plazmaz
Copy link

Plazmaz commented Jun 22, 2017

@StalkAlex absolutely! However, this is an issue with the Windows subsystem, not with bonjour. However, a better error and perhaps checking before enabling would be appropriate.

@StalkAlex
Copy link
Author

StalkAlex commented Jun 22, 2017

Agreed! that's correct, bonjour should be initialized only when option is enabled.

@calebmeyer
Copy link

This happened for me. I can confirm that the workaround mentioned works. (windows 10 creators update, ubuntu 16.04 via WSL, node 7.10)

@educcjr
Copy link

educcjr commented Jun 23, 2017

I ran into this too.

In the windows insider mdns support was already added, but I didn't test it yet: microsoft/WSL#2245 (comment).

@xthule
Copy link

xthule commented Jun 27, 2017

This issue also exists on Linux, depending on the configuration. In my case I get the following stack trace:

Error: addMembership ENOBUFS
    at exports._errnoException (util.js:1016:11)
    at Socket.addMembership (dgram.js:579:11)
    at Socket.<anonymous> (/usr/local/nvm/versions/node/v8.1.2/lib/node_modules/webpack-dev-server/node_modules/multicast-dns/index.js:53:16)
    at emitNone (events.js:110:20)
    at Socket.emit (events.js:207:7)
    at startListening (dgram.js:144:10)
    at _handle.lookup (dgram.js:249:7)
    at _combinedTickCallback (internal/process/next_tick.js:105:11)
    at process._tickCallback (internal/process/next_tick.js:161:9)
    at Function.Module.runMain (module.js:607:11)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3

This is fixed by the pull request above.

@drazisil
Copy link

@shellscape Sorry for the multi comments on the PR, I forgot there was an initial issue. Thank you for merging and have a great day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants