testcafe
testcafe copied to clipboard
Hammerhead fails to load main javascript files, throws TypeError: ExprGen[itemType] is not a function
What is your Scenario?
While starting new tests the main javascript file is not loaded and the following error occurs in the console:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
The file url without the proxy or !s!utf-8 param in the url works just fine.
What is the Current behavior?
Testcafe throws the Failed to load resource: the server responded with a status of 500 (Internal Server Error). When trying to open the file in a new tab the TypeError: ExprGen[itemType] is not a function error is displayed.
What is the Expected behavior?
Tests used to access javascript files just fine.
What is your public website URL? (or attach your complete example)
What is your TestCafe test code?
await t .click('#selectLanguage') .click(Selector('option').filter('[value="0"]')) .typeText('#username', username) .typeText('#password', password || username) .click(Selector('button').withText('Log in')) .expect(Selector('.brand-name').textContent).contains('xx');
Your complete configuration file
Just running testcafe chrome testcafe/test.js
Your complete test report
No response
Screenshots
Steps to Reproduce
- Npm install
- testcafe chrome testcafe/test.js
TestCafe version
2.0.0
Node.js version
16.17.0
Command-line arguments
testcafe chrome testcafe/test.js
Browser name(s) and version(s)
Chrome Version 105.0.5195.53 (Official Build) (64-bit)
Platform(s) and version(s)
Windows 10 Enterprise
Other
No response
Hi @wbrzosko, I could not reproduce this behavior. However, I managed to reproduce the hanging of TestCafe with the example you shared. It occurs due to the incorrect URL of the tested page.
fixture `Getting Started`
.page `https://`;
Could you please check the example and update it to reproduce the original issue?
Hi @miherlosev, thanks for looking into this issue. I have sent URL and authentication details to [email protected] as instructed in the issue creating steps. If you are able to get them and fill out in the example it should work.
Thank you for the shared information. I've reproduced the issue.
Hi @miherlosev, any updates on this issue?
Experiencing a similar case. The page couldn't be opened and the following error was thrown:
vendor.js:36 Uncaught TypeError: ExprGen[itemType] is not a function
at Object.generateClassBody [as ClassBody] (hammerhead.js:5861:31)
at Object.generateClassExpression [as ClassExpression] (hammerhead.js:5427:29)
at exprToJs (hammerhead.js:6435:25)
at Object.generateNewExpression [as NewExpression] (hammerhead.js:5233:29)
at run (hammerhead.js:6462:29)
at generate (hammerhead.js:6561:13)
at getCode (hammerhead.js:13969:17)
at applyChanges (hammerhead.js:14020:22)
at processScript (hammerhead.js:14040:39)
at value (hammerhead.js:21228:29)
The error is reproduced from [email protected] but ok in 1.18.5 node v14.19.1
Hi @getahead,
We don't have any updates. Once we have any news, we'll write about it here.
Any updates on this? We are also suddenly experiencing a similar issue.
Hi @Aleksey28 , @miherlosev We start hitting the same error TypeError: ExprGen[itemType] is not a function all of a sudden. As @getahead mentioned it happens with all versions starting from [email protected] & up.
Downgrading to an old Version 1.18.5 makes it working.
@tgrisley @Eng-raghad Thank you for reaching out to us. It looks like the recent issues are not related to the original one. We will investigate the issue and get back to you with a fix or workaround.
Any updates on this? We are also suddenly experiencing this similar issue.
applying yarn or npm patch works: https://github.com/DevExpress/testcafe/issues/7632#issuecomment-1510974419
Hello,
Thank you for the feedback. We are working on the problem. Please follow this issue to track our progress. I will close the current issue as duplicate.