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

test/parallel/test-dgram-connect.js fails locally #27341

Open
joyeecheung opened this issue Apr 22, 2019 · 5 comments

Comments

Projects
None yet
4 participants
@joyeecheung
Copy link
Member

commented Apr 22, 2019

/Users/joyee/projects/node/test/parallel/test-dgram-connect.js:40
    assert.ok(err.code === 'ENOTFOUND' || err.code === 'EAI_AGAIN');
                  ^

TypeError: Cannot read property 'code' of undefined
    at Socket.<anonymous> (/Users/joyee/projects/node/test/parallel/test-dgram-connect.js:40:19)
    at Socket.<anonymous> (/Users/joyee/projects/node/test/common/index.js:373:15)
    at Object.onceWrapper (events.js:284:20)
    at Socket.emit (events.js:196:13)
    at dgram.js:418:31
    at processTicksAndRejections (internal/process/task_queues.js:81:9)

Does not reproduce if I turn my Wifi off (it's probably hijacking DNS requests to invalid domains), so I guess either this should be moved to internet instead, or we should mock the lookup.

@Trott

This comment was marked as outdated.

Copy link
Member

commented Apr 24, 2019

Does it start working if you replace addresses.INVALID_HOST with invalid.test?

@Trott

This comment was marked as outdated.

Copy link
Member

commented Apr 24, 2019

Does it start working if you replace addresses.INVALID_HOST with invalid.test?

Oops, never mind. It's already using a IETF-reserved invalid name.

@joyeecheung

This comment has been minimized.

Copy link
Member Author

commented May 2, 2019

@Trott yeah, the issue is that the ISP may not be doing what it's supposed to do and it could e.g. hijack the invalid DNS request so that when you visit it in the browser it redirects you to a page full of their ads :/

@joyeecheung

This comment has been minimized.

Copy link
Member Author

commented May 2, 2019

I guess the easiest solution is to move this test to test/internet because it sends out actual DNS requests.

@santigimeno

This comment has been minimized.

Copy link
Member

commented May 2, 2019

I guess the easiest solution is to move this test to test/internet because it sends out actual DNS requests.

I think this is fine, but I would just move that specific test not the whole file.

benrki added a commit to benrki/node that referenced this issue May 4, 2019

test: move dgram invalid host test to internet tests
This moves a dgram test from `parallel` to `internet` because it relies
on a DNS request.
In certain cases, ISPs hijack invalid IETF-reserved invalid names which
causes a false negative failure.

Fixes: nodejs#27341

benrki added a commit to benrki/node that referenced this issue May 4, 2019

test: move dgram invalid host test to internet tests
This moves a dgram test from `parallel` to `internet` because it relies
on a DNS request.
In certain cases, ISPs hijack invalid IETF-reserved invalid names which
causes a false negative failure.

Fixes: nodejs#27341
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.