question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR adm_helpers.cc Failed to query stereo recording

See original GitHub issue

Current 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:

Screenshot-2019-05-30-at-10-17-58

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?

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:open
  • Created 4 years ago
  • Reactions:2
  • Comments:27 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
avalletecommented, Nov 28, 2019

I’ve been able to reproduce the bug in a MWE here

I’ve tested some scenarios:

  1. cypress:open does not throw the error with Electron 73 on my local Ubuntu Linux machine.
  2. cypress:run does not throw the error with Electron 73 on my local Ubuntu Linux machine.
  3. 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:

  1. Using .asoundrc instead of /etc/asound.conf global system file. That way, we can do the change without being the root user and just add one line before the tests inside your CI.
  2. Instead of setting the soundcard to ‘null’, I’ve used default a configuration found here.

@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;

# Execute this command before running cypress:run
echo -e 'pcm.!default {\n type hw\n card 0\n}\n\nctl.!default {\n type hw\n card 0\n}' > ~/.asoundrc
3reactions
a8trejocommented, Apr 13, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

media/engine/adm_helpers.cc - external/webrtc - Git at Google
adm_helpers.cc ... RTC_LOG(LS_ERROR) << "Failed to query stereo playout.";. } ... RTC_LOG(LS_ERROR) << "Unable to set recording device.";. return;. }.
Read more >
Capturing Stereo Audio from Built-In Microphones
To determine whether a device supports stereo recording, query the audio ... setActive(true) } catch { fatalError("Failed to configure and activate session.
Read more >
WaveoutGetSelectControl() failed — CamStudio Support Forum
I get this message when I try to set the recorder to record the sound ... For Recording > Select Stereo Mix, Mono...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found