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

Failed to find a DNS-record for the resource at "http://localhost:8080" #8282

Closed
krushitagangani opened this issue Sep 18, 2024 · 3 comments
Closed
Labels
STATE: Need clarification An issue lacks information for further research. TYPE: bug The described behavior is considered as wrong (bug).

Comments

@krushitagangani
Copy link

What is your Scenario?

Node version: 18.12.1
testcafe version: 3.6.2

when I try to run testcafe it gives me following error:

Failed to load the page at "http://localhost:8080".
Increase the value of the "pageRequestTimeout" variable, enable the "retryTestPages" option, or use quarantine mode to perform additional attempts to execute this test.
You can find troubleshooting information for this issue at "https://go.devexpress.com/TestCafe_FAQ_ARequestHasFailed.aspx".

  Error details:
  Failed to find a DNS-record for the resource at "http://localhost:8080".

Windows 10

What is the Current behavior?

base url is "http://localhost:8080" but testcafe is returning DNS error

What is the Expected behavior?

testcafe should run the tests on "http://localhost:8080"

What is the public URL of the test page? (attach your complete example)

http://localhost:8080

What is your TestCafe test code?

import { Selector } from 'testcafe';
fixtureSetup test E2e;

test('Load the page', async t => {
const container = Selector('.test-div').addCustomDOMProperties({
outerHtml: el => el.outerHtml
});
await t.expect(container.exists).ok();

});

Your complete configuration file

{
baseUrl: 'http://localhost:8080',
src: ["tests/e2e/**/*.test.js"],
browsers: ['chrome'],
skipJsErrors: true
}

Your complete test report

  1. AssertionError: expected false to be truthy

Node version: 18.12.1
testcafe version: 3.6.2

when I try to run testcafe it gives me following error:

Failed to load the page at "http://localhost:8080".
Increase the value of the "pageRequestTimeout" variable, enable the "retryTestPages" option, or use quarantine mode to perform additional attempts to execute this test.
You can find troubleshooting information for this issue at "https://go.devexpress.com/TestCafe_FAQ_ARequestHasFailed.aspx".

  Error details:
  Failed to find a DNS-record for the resource at "http://localhost:8080".

Windows 10

Screenshots

No response

Steps to Reproduce

  1. npm install testcafe (version 3.6.2)
  2. npm testcafe

TestCafe version

3.6.2

Node.js version

18.12.1

Command-line arguments

testcafe

Browser name(s) and version(s)

chrome 129

Platform(s) and version(s)

No response

Other

No response

@krushitagangani krushitagangani added the TYPE: bug The described behavior is considered as wrong (bug). label Sep 18, 2024
@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Sep 18, 2024
@Bayheck
Copy link
Collaborator

Bayheck commented Oct 2, 2024

Hello,

I did not manage to reproduce the issue.

We need a simple and reliable example showing the issue from start to end. In your case, preferably, in the form of a repository.

The repository should contain all information and files necessary to reproduce the issue. Any user should be able to follow your instructions. Something like this:

image

Please refer to the following article:

https://testcafe.io/documentation/402636/faq/general-info#how-to-create-a-minimal-working-example-when-you-submit-an-issue

@Bayheck Bayheck added STATE: Need clarification An issue lacks information for further research. and removed STATE: Need response An issue that requires a response or attention from the team. labels Oct 2, 2024
@stefanlivens
Copy link

The issue is related to Node 18 and how it (in)correctly resolves 'localhost'.
if you try 127.0.0.1 instead of localhost, i'm pretty sure it will work.
Or switch to Node 20.

@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Oct 6, 2024
@PavelMor25 PavelMor25 removed the STATE: Need response An issue that requires a response or attention from the team. label Oct 8, 2024
Copy link

This issue was automatically closed because there was no response to our request for more information from the original author. Currently, we don't have enough information to take action. Please reach out to us if you find the necessary information and are able to share it. We are also eager to know if you resolved the issue on your own and can share your findings with everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATE: Need clarification An issue lacks information for further research. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

4 participants