testcafe: TestCafe fails with 500 "Failed to load resource" error when trying to load JS file

What is the Current behavior?

I have the same problem as mentioned here with testcafe in version 1.19.0, did the upgrade to the latest version 2.2.0 and the problem continues. The .js that can´t be loaded is this: <script src="https://test.frontier7.com/chunk/chunk-BZA67JWP.js"></script>

Put the script in a new React project and Testcafe also gave the same error.

image

What is the Expected behavior? The URL put in .page() should redirect to Login but instead I see the behavior describer here. Also tried to do Login first and then navigate to the project and the behavior is the same.

What is your web application and your TestCafe test code?

import { Selector } from "testcafe";
fixture('CreateProject')
  .page('https://test.frontier7.com/project/63adf96c785a40eb5d88a835/build')

test('log-in and do stuff', async t => {
  await t.wait(2000); 
  const email_input = Selector('input[type="text"]');
  const password_input = Selector('input[type="password"]');
  const submit = Selector('button[type=submit]');
  const email = "email_password";
  const password = "user_password";

  await t.typeText(email_input, email, { replace: true })
  .typeText(password_input, password, { replace: true })
  .click(submit);
});

Steps to Reproduce: To reproduce the bug just load the page with Testcafe

import { Selector } from "testcafe";
fixture('CreateProject')
  .page('https://test.frontier7.com/project/63adf96c785a40eb5d88a835/build')

test('log-in and do stuff', async t => {
  await t.wait(10000000); 
});

Environment details: testcafe version: >2.2.0 node.js version: v18.13.0 command-line arguments: testcafe chrome -e test.js browser name and version: Chrome 108 platform and version: Windows

_Originally posted by @Chramox in https://github.com/DevExpress/testcafe/issues/6458#issuecomment-1381994433_

For team:

http-playground-sample.zip Error on loading resource directly through http-playground: TypeError: ExprGen[itemType] is not a function

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (2 by maintainers)

Most upvoted comments

Hello, we are also suddenly seeing the same error as @davidcsmtui in our pipelines.

Error details: TypeError: ExprGen[itemType] is not a function Browser: Chrome 112.0.0.0 / macOS 10.15.7

Using --experimental-proxyless does not seem to help.

Currently running TestCafe 2.4.0

@aleks-pro Hello, I am also seeing it happen suddenly today, same as the people above. Switching to native automation is not an option as it’s still not fully functional for my company’s use case due to this outstanding issue https://github.com/DevExpress/testcafe/issues/7588

I am on TestCafe 2.5, this is the sample test

fixture `My First fixture`
    .page `https://www.easybib.com/`;

test('My first test', async t=> {
   console.log("Hello");
});

This is the error

Failed to load the page at "https://www.easybib.com/".
 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:
 TypeError: ExprGen[itemType] is not a function

 Browser: Chrome 112.0.0.0 / macOS 10.15.7

Please reopen this issue as not everyone can use native automation.

We are getting this all of a sudden as well with no changes to the Testcafe or Node version. We tried updating to Testcafe v2.5.0 & ran scripts with the --native-automation flag but there is still the same failure just after the first step in the script runs.

Hello @Chramox ,

We will close this issue since it is fixed in Native Automation mode. Feel free to reopen the issue if you cannot use Native Automation for some reason.

Native Automation is not supported by Browserstack, so cannot use it. I am also seeing this error crop up randomly out of nowhere.

Hi, I am having the same kind of issue My login button is frozen when I am opening via testcafe . I see an error in browser console log “Failed to load resource: the server responded with a status of 404 (Not Found)”

But , When I open the url manually , I am able to login and I don’t have any error. I have testcafe 2.3.0 version in my Gherkin-testcafe .

await t .typeText(‘#username’, username) .typeText(‘password’, ‘xxxxxxxx’) ; await t .setNativeDialogHandler(() => true) .click(‘#submit’); I am using this command to run the test gherkin-testcafe chrome tests/Adjuster.js features/Adjuster.feature --experimental-proxyless