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

Fix defer with router tests #5096

Merged
merged 1 commit into from
Jul 13, 2023
Merged

Fix defer with router tests #5096

merged 1 commit into from
Jul 13, 2023

Conversation

BoD
Copy link
Contributor

@BoD BoD commented Jul 13, 2023

Sometimes, but not always, localhost can't be resolved by node - I don't know why.
This only happens with a recent version of node (recently changed by this change), and I could only reproduce with the defer with router tests, but not with the other tests which also use localhost from MockServer.url() - but I changed it there too just in case, and to please the nodejs gods.

@BoD BoD requested a review from martinbonnin as a code owner July 13, 2023 14:49
@netlify
Copy link

netlify bot commented Jul 13, 2023

Deploy Preview for apollo-android-docs canceled.

Name Link
🔨 Latest commit e26936a
🔍 Latest deploy log https://app.netlify.com/sites/apollo-android-docs/deploys/64b00ee793425b0008588399

@martinbonnin
Copy link
Contributor

This is peculiar 🤔 . Does not give any extra reason why localhost does not work? DNS, route, timeout, anything else?

If needed we can re-introduce the old nodejs version.

@BoD
Copy link
Contributor Author

BoD commented Jul 13, 2023

Yeah it is very odd. I see this in node's logs:

NET 99031: connect: find host localhost
NET 99031: connect: dns options { family: undefined, hints: 1024 }
HTTP 99031: sockets localhost:4002: 1 1
HTTP 99031: write ret = true
HTTP 99031: outgoing message end.
(node:99031) Warning: Setting the NODE_DEBUG environment variable to 'http' can expose sensitive data (such as passwords, tokens and authentication headers) in the resulting log.
(Use `node --trace-warnings ...` to show where the warning was created)
NET 99031: _read
NET 99031: _read wait for connection
NET 99031: afterConnect
NET 99031: destroy
NET 99031: close
NET 99031: close handle
HTTP 99031: SOCKET ERROR: connect ECONNREFUSED ::1:4002 Error: connect ECONNREFUSED ::1:4002
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)

Actually maybe I misinterpreted it, could it be a IPv6 issue instead?

@martinbonnin
Copy link
Contributor

Actually maybe I misinterpreted it, could it be a IPv6 issue instead?

Looks like it. In that case forcing IPv4 is the good fix 👍

@BoD BoD merged commit d1013a4 into main Jul 13, 2023
8 checks passed
@BoD BoD deleted the fix-defer-tests-js branch July 13, 2023 16:39
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 this pull request may close these issues.

2 participants