ERROR adm_helpers.cc Failed to query stereo recording
See original GitHub issueCurrent behavior:
A few of our users have encountered this message while running Cypress, yet none of them have opened an issue concerning it, so here it is!
Sep 25 2018 21:13
Anybody ever see this error [426:0925/144153.978531:ERROR:adm_helpers.cc(62)] Failed to query stereo recording. ALSA lib confmisc.c:768:(parse_card) cannot find card ‘0’ ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default ALSA lib confmisc.c:768:(parse_card) cannot find card ‘0’ ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default
https://gitter.im/cypress-io/cypress?at=5baa499c01fb5f4ae11e547d
Feb 13 22:19
Hello. I’m seeing error Failed to query stereo recording - any idea how to fix this?
https://gitter.im/cypress-io/cypress?at=5c643c6f8328315decea88f9
May 21 19:25
Hello. My test run stopped prematurely right after this log message: [4861:0521/124346.631077:ERROR:adm_helpers.cc(62)] Failed to query stereo recording. Can anyone tell me what this is and how to fix it? Tx
https://gitter.im/cypress-io/cypress?at=5ce3f5520ac9852a95168552
May 30
Errors while running in CI (ECS) and does not issue exit code
I’ve gone to have a look around in the logs and it seems to have blown up here:
Desired behavior:
To issue the proper exit code while running Cypress.
Steps to reproduce: (app code and test code)
Well, this is the question that requires investigating. I don’t have more information than this error occurs sometimes.
Versions
Cypress 3.1.0+
Some relevant existing issues?
- The Chromium file/line where this is throwing: https://chromium.googlesource.com/external/webrtc/+/master/media/engine/adm_helpers.cc#74
- Electron, but in 1.7/1.8 version, so shouldn’t affect 3.3.0+ https://github.com/electron/electron/issues/10455
HELP NEEDED
If you are seeing this error, please help us fix it 😄
- What OS/environment are you running this in? Is it only during
cypress run
? Is it only in CI? - Can you provide more information on what test code you ran exactly when this happened? Does it happen in the same spot each time?
- Can you run your tests with
cypress open
, choose the Electron browser, open DevTools where this error occurs? What is logged here? Please provide. - Could you run Cypress in debug mode mode and print the logs here?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:27 (3 by maintainers)
Top GitHub Comments
I’ve been able to reproduce the bug in a MWE here
I’ve tested some scenarios:
cypress:open
does not throw the error with Electron 73 on my local Ubuntu Linux machine.cypress:run
does not throw the error with Electron 73 on my local Ubuntu Linux machine.cypress:run
does throw the error inside the Travis CI build with the Ubuntu image.So it seem that the issue come from an machine misconfiguration error as mentioned by @iegik and I’m really skeptical about if we can really fix it inside cypress project itself. Look more like we need to set some variables inside the CI build configuration before running the tests or maybe just silence the error.
EDIT
I’ve lightly changed the solution suggested by @amcooper inside my MWE to integrate it in a single line inside my CI build here.
Changes I’ve made are:
.asoundrc
instead of/etc/asound.conf
global system file. That way, we can do the change without being theroot
user and just add one line before the tests inside your CI.@amcooper into my test inside MWE I do play the video (and so the sound), and still don’t see this issue appear. Could you try my fix and tell you still see the error on your last test ? If so, could you please provide some information about the player you use so I’ll be able to reproduce your error inside the MWE ?
TLDR;
For GitHub Actions the workaround in the mentioned comment sort of works… but still gave a couple warnings (fewer though) such as:
[5136:0411/210532.071893:ERROR:alsa_util.cc(204)] PcmOpen: default,No such file or directory
[5136:0411/210532.071944:ERROR:alsa_util.cc(204)] PcmOpen: plug:default,No such file or directory
So instead of using the default configuration from here, I do use the null values suggested in here
So basically just running
echo -e 'pcm.!default {\n type plug\n slave.pcm "null"\n}' > ~/.asoundrc
Before the cypress github action