testcafe: Uncaught TypeError: Cannot read properties of undefined (reading 'childNodes')

What is your Scenario?

When running running an Elm application using the testcafe browser it causes an elm runtime error: Uncaught TypeError: Cannot read properties of undefined (reading 'childNodes') This is due to testcafe somehow manipulating the DOM that makes Elm chrash.

What is the Current behavior?

The Elm application chrashes

What is the Expected behavior?

The Elm application should not chrash

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

Unable to provide due to company restrictions

What is your TestCafe test code?

fixture("Elm Fixture").page("url-to-elm-application");

test("Should render elm page", async (t) => {
  await elmPage.isRendered()
});

Your complete configuration file

No response

Your complete test report

No response

Screenshots

SCR-20230202-ddn

Steps to Reproduce

  1. Go to page of elm application.
  2. The page is not rendered
  3. The console is spammed with errors

TestCafe version

v1.20.1

Node.js version

v1.20.1

Command-line arguments

./node_modules/.bin/testcafe --skip-js-errors Chrome <./path-to-fixture>

Browser name(s) and version(s)

Chrome

Platform(s) and version(s)

MacOS 12.16.1

Other

We only see this issue on some elm pages. However the elm application runs perfectly outside TestCafe in Chrome, Firefox and Safari. I have tried using many different versions of testcafe but this seems to be an issue in all versions.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 30 (6 by maintainers)

Most upvoted comments

Ran into a situation like this today this did the trick:

--experimental-proxyless

Hi @moniquelive,

Thank you for sharing this information. We will follow-up with you once we have specific information to share.