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

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

Open
Christopher-C-Robinson opened this issue Feb 27, 2025 · 5 comments
Labels
STATE: Need response An issue that requires a response or attention from the team. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATE: Need response An issue that requires a response or attention from the team. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

2 participants