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

PortFinder crashes with unused adapter #2769

Closed
JasonGoemaat opened this issue Oct 18, 2016 · 6 comments · Fixed by #2831
Closed

PortFinder crashes with unused adapter #2769

JasonGoemaat opened this issue Oct 18, 2016 · 6 comments · Fixed by #2831

Comments

@JasonGoemaat
Copy link

Please provide us with the following information:

OS?

Windows 10

Versions.

angular-cli: 1.0.0-beta.17
node: 6.6.0
os: win32 x64

Repro steps.

ng new cli
cd cli
npm install
npm start

The log given by the failure.

Error: connect EACCES fe80::dbb0:2b25:9e86:26cd:49152
at Object.exports._errnoException (util.js:1036:11)
at exports._exceptionWithHostPort (util.js:1059:20)
at TCPConnectWrap.afterConnect as oncomplete

Mention any other details that might be useful.

The fe80::xxxxx is a currently disabled or unavailable adapter. PortFinder.getPort doesn't appear to use the host specified and checks for the port on all adapters, and throws an uncaught exception. To be able to start my app I had to edit node_modules/angular-cli/commands/serve.js and change _checkExpressPort and _ autoFindLiveReloadPort to not use getPort:

  return new Promise((resolve, reject) => {
    resolve(commandOptions);
  });

Thanks! We'll be in touch soon.

@JasonGoemaat
Copy link
Author

Should have mentioned, it fails when specifying the host and port too, I've tried combinations of ports and different hosts like 127.0.0.1, localhost, and my local network ip:

ng serve --host 127.0.0.1 --port 4444 --live-reload-port 4445

@JasonGoemaat
Copy link
Author

JasonGoemaat commented Oct 18, 2016

I see there is an issue on ember-cli for what seems to be the same problem. I don't know the best place to mention it, but I don't think portfinder should be used if you specify the ports, and if it does throw an error then a warning should probably be displayed and the specified or default port should be attempted...

@JasonGoemaat
Copy link
Author

Per a comment, pinning PortFinder at 1.0.7 seems to work around the issue. Totally understand if someone wants to close this issue, keep the same strategy of using portfinder even if ports are specified, and wait for upstream fixes...

 "portfinder": "1.0.7",

@eriktrom
Copy link

eriktrom commented Oct 18, 2016

Portfinder 1.0.9 has been published to npm. It simply reverts 1.0.8, so the issue is fixed now.

Sorry about that folks

filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 22, 2016
This PR explicitely adds portfinder as a dependency.

We're using portfinder in the serve command but getting it transitively as a ember-cli dependency.

Fix angular#2769
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 22, 2016
This PR explicitely adds portfinder as a dependency.

We're using portfinder in the serve command but getting it transitively as a ember-cli dependency.

Fix angular#2755
Fix angular#2769
@filipesilva
Copy link
Contributor

Heya @eriktrom, thanks for the quick fix! I added 1.0.9 explicitely in #2831 now.

hansl pushed a commit that referenced this issue Nov 9, 2016
This PR explicitely adds portfinder as a dependency.

We're using portfinder in the serve command but getting it transitively as a ember-cli dependency.

Fix #2755
Fix #2769
MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this issue Feb 9, 2017
This PR explicitely adds portfinder as a dependency.

We're using portfinder in the serve command but getting it transitively as a ember-cli dependency.

Fix angular#2755
Fix angular#2769
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants