-
Notifications
You must be signed in to change notification settings - Fork 78
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
wait-on failure for localhost of react-app Node.js 18 #137
Comments
Due to GitHub setting Node.js default to 18 recently, this issue and related issues are becoming more visible. Possible resolutions
See https://nodejs.org/dist/latest-v18.x/docs/api/net.html#socketconnect autoSelectFamily : If set to true, it enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. The all option passed to lookup is set to true and the sockets attempts to connect to all obtained IPv6 and IPv4 addresses, in sequence, until a connection is established. The first returned AAAA address is tried first, then the first returned A address and so on. Each connection attempt is given the amount of time specified by the autoSelectFamilyAttemptTimeout option before timing out and trying the next address. Ignored if the family option is not 0 or if localAddress is set. Connection errors are not emitted if at least one connection succeeds. Default: false. |
Also worth it to mention that If looking to preserve support for older versions, a combination of both approaches can be done. |
This seems quite the showstopper for |
The 127.0.0.1 workaround does not work for me. Regarding this, it's possible to change the default DNS resolution order with |
Are you using the It depends on the server what the right workaround is. It could be using |
I finally found a workaround, had to use a mix of |
|
Ran into this same problem as well. Thankfully (I guess?) I know what port my app has to run on and have had no problems changing from |
I retested this issue and it is still reproducible on Node.js 18.16.0 which remains as the LTS version until Node.js 20.x takes over the LTS role on Oct 24, 2023 (see Node.js release schedule). The issue is however not reproducible on Node.js 20.2.0. See job 9155121075 which succeeds. Updating to Node.js 20.x may therefore be a workaround for some situations. I will leave this issue open, probably until Node.js 20.x gets LTS status. |
I started to have the same issue on my CRA app (react scripts 4) and NodeJS 18. After I switched from |
Status
Mitigations
So, now closing this issue, as there is nothing more to do here. |
Environment
ubuntu-22.04 on GitHub
Node.js 18.14.1
wait-on 7.0.1
Problem description
wait-on fails waiting for http://localhost:3000 of react-app on GitHub in an
ubuntu-22.04
runner using the current default Node.js 18.14.1. The problem does not happen using Node.js 16.19.1.Node.js 18 is the default version on GitHub runners since Feb 18, 2023.
verbose logs show:
netstat shows the following listener:
Steps to reproduce
GitHub
View workflow log https://github.com/MikeMcC399/react-app-test/actions/workflows/test-react-app-wait-on.yml or
fork https://github.com/MikeMcC399/react-app-test and run
.github/workflows/test-react-app-wait-on.yml
Workaround
wait for http://127.0.0.1:3000 instead of http://localhost:3000
Related issues
The text was updated successfully, but these errors were encountered: