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

Upgrade detect-port #2126

Closed
wants to merge 1 commit into from
Closed

Conversation

Timer
Copy link
Contributor

@Timer Timer commented May 11, 2017

Upgrades detect port to resolve #2112.

Test plan: start two servers and expect the duplicate message, do the same with a different HOST.
It works.

I'm not sure about edge cases (like binding to a hostname instead of address, e.g. boop.local).

Unverified

This user has not yet uploaded their public signing key.
@gaearon
Copy link
Contributor

gaearon commented May 11, 2017

Not working for me.

screen shot 2017-05-11 at 5 25 00 pm

screen shot 2017-05-11 at 5 25 09 pm

@Timer
Copy link
Contributor Author

Timer commented May 11, 2017

Weird.. I wonder what differs between our macs.
I'll look at this again in a few.

@gaearon
Copy link
Contributor

gaearon commented May 11, 2017

The stack is weird, isn't it? Doesn't seem to be inside the initial promise code.

@gaearon
Copy link
Contributor

gaearon commented May 11, 2017

This doesn't work for me:

  // 1. check 0.0.0.0
  listen(port, null, (err, realPort) => {

This does:

  // 1. check 0.0.0.0
  listen(port, '0.0.0.0', (err, realPort) => {

@Timer
Copy link
Contributor Author

Timer commented May 11, 2017

Ooo. Maybe the latest release introduced a regression.
I'll be able to check it out in a bit.

To be fair, I ran the first application using an older CRA.

@Timer
Copy link
Contributor Author

Timer commented May 11, 2017

Yeah, that's because null binds to :: by default (IPv6), which also binds to 0.0.0.0 in a fallback-ish-way.

I asked again for the original request, which is to let us explicitly pass which host we'd like to check.

The testing was my bad, it was because the old CRA version bound to a different address (which let detect-port work with its patch).

@gaearon
Copy link
Contributor

gaearon commented May 11, 2017

What's the conclusion? How do we fix?

@Timer
Copy link
Contributor Author

Timer commented May 11, 2017

We can either revert this behavior entirely (breaking HOST), we can add logic to bind to IPv6 by default (when available, still doesn't fix the underlying issue but most cases), or wait for another release of detect-port.

@Timer
Copy link
Contributor Author

Timer commented May 11, 2017

We could also just fork detect-port for our own use.

@gaearon
Copy link
Contributor

gaearon commented May 12, 2017

I'm okay with temporarily forking.

@Timer Timer closed this May 14, 2017
@Timer Timer deleted the detect-port-upgrade branch May 14, 2017 18:51
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Master crashes when opening two apps (and port conflicts)
3 participants