Skip to content

Getting a 'BrowserAuthError: crypto_nonexistent: The crypto object or function is not available' error when using testcafe with firefox #8391

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

Open
Christopher-C-Robinson opened this issue Feb 27, 2025 · 10 comments
Labels
TYPE: bug The described behavior is considered as wrong (bug).

Comments

@Christopher-C-Robinson
Copy link

What is your Scenario?

When navigating to https://formspro.omnibyte.com/automation/nightly with firefox through testcafe I’m getting the error:

Image

I know this says going to localhost:4200 but I get the same error when navigating to the site mentioned. Works in Edge and Chrome fine.

What is the Current behavior?

BrowserAuthError: crypto_nonexistent: Thy crypto object or function is not available

What is the Expected behavior?

Should be able to get to the site just like the other browsers can.

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

https://formspro.omnibyte.com/automation/nightly

What is your TestCafe test code?

test('Test Case: ##### - NEW', async t => {
await t.useRole(TestCafe);
});

// the role just goes to https://formspro.omnibyte.com/automation/nightly and tries to login. so just need to nav to.

Your complete configuration file

{
"browsers": ["chrome:headless:emulation:width=1920;height=1080 --start-fullscreen;"],
"reporter": [
{
"name": "spec"
},
{
"name": "nunit3",
"output": "results/reports/report.xml"
}
],
"screenshots": {
"takeOnFails": true,
"path": "results/",
"pathPattern": "${TIME}/${TEST_INDEX}/${FILE_INDEX}.png"
},
"disablePageCaching": true,
"stopOnFirstFail": false,
"skipJsErrors": true,
"skipUncaughtErrors": true,
"selectorTimeout": 5000,
"assertionTimeout": 5000,
"pageLoadTimeout": 120000,
"speed": 1,
"cache": false
}

Your complete test report

1887 | throw new Error('Login process timed out'); ⠀ 1888 | } ⠀ 1889 | ⠀ 1890 | /** ⠀ 1891 | * Scans the form and performs validation checks. ⠀ 1892 | */ ⠀ at Admin. (C:\Code\FP\Test-Automation\FormsPro\admin-variables.ts:1887:15) at fulfilled (C:\Code\FP\Test-Automation\FormsPro\admin-variables.ts:5:58)]]> C:\Code\FP\Test-Automation\results\11-42-38\1\errors\1.png

Screenshots

Image

Image

Steps to Reproduce

  1. use firefox to go to the site listed.

TestCafe version

3.7.2

Node.js version

v20.18.2

Command-line arguments

-L

Browser name(s) and version(s)

Firefox 135.0

Platform(s) and version(s)

Windows 11

Other

No response

@Christopher-C-Robinson Christopher-C-Robinson added the TYPE: bug The described behavior is considered as wrong (bug). label Feb 27, 2025
@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 Feb 27, 2025
@Christopher-C-Robinson
Copy link
Author

Not sure if related to #8368 or not. That was also a Firefox only issue that was recently fixed.

@Christopher-C-Robinson
Copy link
Author

When navigating to the URL in a regular Firefox browser without testcafe, there are no issues.

@Christopher-C-Robinson
Copy link
Author

Updated Context:

This issue started occurring after a recent security update was merged that introduced MFA enforcement, password expiration handling, and Microsoft account login integration to the site with the provided URL.

Since the error (crypto_nonexistent: The crypto object or function is not available) only occurs in Firefox when running through TestCafe, but not when navigating manually, it suggests a compatibility issue between TestCafe and Firefox’s handling of authentication-related security functions.

This has been tested on TestCafe 3.7.2 with Firefox 135.0 on Windows 11. Other browsers (Chrome, Edge) are unaffected.

Would appreciate insights on whether TestCafe's Firefox runner might be missing necessary Web Crypto API support or if there are known issues with recent Firefox updates affecting automated test execution.

Let me know if any additional logs or debugging details would help.

@Bayheck
Copy link
Collaborator

Bayheck commented Mar 3, 2025

Hello, I navigated to your page with Firefox and did not manage to reproduce the issue.

Please create a reproducible minimal example so that our team can help you investigate this 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 Mar 3, 2025
@Christopher-C-Robinson
Copy link
Author

Okay! I'll try to creat that next week!

@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 Mar 7, 2025
@github-actions github-actions bot removed the STATE: Need clarification An issue lacks information for further research. label Mar 7, 2025
@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 Mar 10, 2025
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.

@Christopher-C-Robinson
Copy link
Author

Here is a reproducible minimal example. I have a file with a fixture, a test of just navigating to a couple sites and making sure an element is there. This seems to not be just a firefox issue as I've recently tried in edge as well. Works as soon as I take off --disable-native-automation flag:

DevExpresstestcafe-issue-8391.zip

In there has the exact command in the text file, the file with the test, and the testcafe.rc file in the project. Let me know if there is anything else you need @Bayheck

@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 May 2, 2025
@github-actions github-actions bot removed the STATE: Need clarification An issue lacks information for further research. label May 2, 2025
@github-actions github-actions bot reopened this May 2, 2025
@Bayheck
Copy link
Collaborator

Bayheck commented May 5, 2025

Hello, thank you for providing the example.

I tried running the code using the command you suggested, but I encountered the following error:

Image

Could you please provide a simplified version of the test file which is as short as possible, without any unnecessary code?

@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 May 5, 2025
@Christopher-C-Robinson
Copy link
Author

Sorry about that. I think this is better!

DevExpresstestcafe-issue-8391 (2).zip

@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 May 5, 2025
@github-actions github-actions bot removed the STATE: Need clarification An issue lacks information for further research. label May 5, 2025
@aleks-pro aleks-pro added the STATE: Issue accepted An issue has been reproduced. label May 9, 2025
Copy link

github-actions bot commented May 9, 2025

We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We'll update this thread once we have news.

@github-actions github-actions bot removed STATE: Need response An issue that requires a response or attention from the team. STATE: Issue accepted An issue has been reproduced. labels May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

3 participants