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

Testcafe fails on macOS against webpack development server #6844

Closed
dvaldivia opened this issue Jan 29, 2022 · 16 comments
Closed

Testcafe fails on macOS against webpack development server #6844

dvaldivia opened this issue Jan 29, 2022 · 16 comments
Labels
FREQUENCY: level 1 STATE: Need clarification An issue lacks information for further research. SYSTEM: hammerhead TYPE: bug The described behavior is considered as wrong (bug).

Comments

@dvaldivia
Copy link

What is your Scenario?

Trying to run tests on a Mac with Apple Silicon (darwin-arm64) against a webpack dev server running on port 3000

What is the Current behavior?

the test fails with a DNS error for localhost:3000 which doesn't happen for servers hosting only assets on localhost i.e: localhost:8080

the run fails with a DNS error

➜ yarn run testcafe chrome:headless tests                 
yarn run v1.22.17
$ /Users/dvaldivia/go/src/github.com/dvaldivia/testcafe-mac/node_modules/.bin/testcafe chrome:headless tests
 Running tests in:
 - Chrome 97.0.4692.71 / macOS 10.15.7

 Getting Started
 ✖ My first test

   1) AssertionError: expected false to be truthy

      Browser: Chrome 97.0.4692.71 / macOS 10.15.7

          5 |
          6 |test('My first test', async t => {
          7 |    // Test code
          8 |await t
          9 |        .expect(Selector('.App').exists)
       > 10 |        .ok();
         11 |});
         12 |

         at <anonymous> (/Users/dvaldivia/go/src/github.com/dvaldivia/testcafe-mac/tests/basic.ts:10:10)
         at <anonymous> (/Users/dvaldivia/go/src/github.com/dvaldivia/testcafe-mac/tests/basic.ts:8:71)
         at __awaiter (/Users/dvaldivia/go/src/github.com/dvaldivia/testcafe-mac/tests/basic.ts:4:12)
         at <anonymous> (/Users/dvaldivia/go/src/github.com/dvaldivia/testcafe-mac/tests/basic.ts:6:33)


   2) undefinedFailed to load the page at "http://localhost:3000/".
      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:3000/".

      Browser: Chrome 97.0.4692.71 / macOS 10.15.7



 1/1 failed (4s)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What is the Expected behavior?

the tests should run, this works on linux (testd with ubuntu)

What is your public website URL? (or attach your complete example)

https://github.com/dvaldivia/testcafe-mac

What is your TestCafe test code?

import { Selector } from 'testcafe';

fixture`Getting Started`
    .page`http://localhost:3000`;

test('My first test', async t => {
    // Test code
await t
        .expect(Selector('.App').exists)
        .ok();
});

Your complete configuration file

No response

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

  1. get a mac with apple silicon
  2. clone https://github.com/dvaldivia/testcafe-mac and cd into the folder
  3. yarn install and yarn start
  4. run tests via yarn run testcafe chrome:headless tests

TestCafe version

1.18.3

Node.js version

v17.3.0

Command-line arguments

yarn run testcafe chrome:headless tests

Browser name(s) and version(s)

chrome and firefox

Platform(s) and version(s)

macOS 12.2

Other

No response

@dvaldivia dvaldivia added the TYPE: bug The described behavior is considered as wrong (bug). label Jan 29, 2022
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jan 29, 2022
@AlexanderMoiseev
Copy link
Contributor

Hi,

Thank you for your input. We reproduced the issue; please stay tuned.

Note for the team - works with node version 16.13.0.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Jan 31, 2022
@scheidm
Copy link

scheidm commented Mar 10, 2022

I do not believe this is M1 specific. I've had this problem on BOTH my M1 and previous generation MacBook Pro. My comparable test and problem:
https://stackoverflow.com/questions/71022754/testcafe-fails-to-connect-to-localhost-on-osx

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Mar 10, 2022
@VasilyStrelyaev
Copy link
Collaborator

Thank you, @scheidm! I have reproduced this error on an x86 Mac as well. I will update the issue title.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Mar 11, 2022
@VasilyStrelyaev VasilyStrelyaev changed the title Testcafe fails on Apple Silicon against webpack development server Testcafe fails on macOS against webpack development server Mar 11, 2022
@leekkww
Copy link

leekkww commented Jun 14, 2022

Hey there, do we have any updates on this issue? This is also happening to me :)

@scheidm
Copy link

scheidm commented Jun 14, 2022

I was able to get around the issue by reverting to a previous version of NodeJS. Maybe that will help people find work-arounds and solutions

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jun 14, 2022
@VasilyStrelyaev
Copy link
Collaborator

@leekkww, we have no updates at the moment. We will post in this thread once we have any news.

@scheidm, thank you for sharing the workaround.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Jun 16, 2022
@janwirth
Copy link

janwirth commented Jul 3, 2022

Going back to node16 also solves it for me. I recommend tj/n as version manager.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jul 3, 2022
@AlexSkorkin AlexSkorkin removed the STATE: Need response An issue that requires a response or attention from the team. label Jul 5, 2022
@srbagg
Copy link

srbagg commented Aug 3, 2022

not working v16 also. Any updates on possible workaround / fixes?

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Aug 3, 2022
@miherlosev miherlosev added the STATE: No updates No updates are available at this point. label Aug 9, 2022
@github-actions
Copy link

github-actions bot commented Aug 9, 2022

No updates yet. Once we get any results, we will post them in this thread.

@github-actions github-actions bot removed STATE: Need response An issue that requires a response or attention from the team. STATE: No updates No updates are available at this point. labels Aug 9, 2022
@srbagg
Copy link

srbagg commented Aug 11, 2022

Getting same issue on linux (almalinux:8.6-20220512) as well.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Aug 11, 2022
@VasilyStrelyaev
Copy link
Collaborator

Thank you for the additional information!

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Aug 15, 2022
@Artem-Babich
Copy link
Contributor

Hello everyone, 

I've just tried to reproduce this issue with TestCafe v2.3.0, and it looks like it is not reproducible anymore. Would you please check this on your side and let me know your results?

@Artem-Babich Artem-Babich added the STATE: Need clarification An issue lacks information for further research. label Feb 6, 2023
@James-h143
Copy link

Hello everyone,

I've just tried to reproduce this issue with TestCafe v2.3.0, and it looks like it is not reproducible anymore. Would you please check this on your side and let me know your results?

This seems to have resolved it for me

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Feb 14, 2023
@Artem-Babich Artem-Babich removed the STATE: Need response An issue that requires a response or attention from the team. label Feb 15, 2023
@github-actions
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.

@MattMcFarland
Copy link

I'm currently having this problem using node v18 and testcafe 3.3.0 on osx

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Nov 7, 2023
@aleks-pro
Copy link
Contributor

Hello,

I've tried to reproduce the issue by using the example from the original post in this thread and everything works fine for me.
My environment details:

  • TestCafe 3.3.0
  • macOS 13.5.2,
  • Chrome 119.0.6045.123,
  • Firefox 119.0,
  • Safari 16.6,
  • NodeJS v18.4.0.

Possibly, the issue you are facing differs from the issue in the original post. Please, create a new issue and share with us a reproducible simple sample. Also, please specify your environment details.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FREQUENCY: level 1 STATE: Need clarification An issue lacks information for further research. SYSTEM: hammerhead TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests