'Unable to run testcafe tests on CI/CD gitlab but works fine locally on the runner
I am seeing an issue running testcafe tests on the gitlab runner. The tests runs fine locally on the gitlab runner, but when run off the CI/CD pipeline it fails. Below is my .yaml code -
test-e2e-windows:
stage: test
cache:
<<: *global_cache
policy: pull
#needs: ['yarn-install']
tags:
- win32
script:
- yarn install
- yarn run test:e2e
Below is the error I see -
$ yarn run test:e2e Running tests in:
- Chrome 99.0.4844.82 / Windows 10
Audio Configuration Combination
× Inbuilt_Mic_Recording_1Ch_48 khz_16 bit_64 kbps_opus_webm
- A JavaScript error occurred on "https://dolby-web-sdk-dev.net/sandbox/index.html". Repeat test actions in the browser and check the console for errors. To ignore client-side JavaScript errors, enable the "--skip-js-errors" CLI option, or set the "skipJsErrors" configuration file property to "true". If the website only throws this error when you test it with TestCafe, please create a new issue at: "https://github.com/DevExpress/testcafe/issues/new?template=bug-report.md". JavaScript error details: NotFoundError: Requested device not found No stack trace available
Am I missing something here?
Solution 1:[1]
According to the "Requested device not found" error message, this issue is related to your application implementation:
- DOMException: Requested device not found GetUserMedia.
- Requested device not found - Unable to access Camera and Microphone
I can assume that it tries to access some device on a virtual machine but fails due to the fact that this device does not exist. In my opinion, the best way to resolve this issue is to manually handle this error in your application. If my assumptions are wrong, please create a new GitHub issue using this template and share a minimal working example illustrating the issue.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Artem B |