ncspot icon indicating copy to clipboard operation
ncspot copied to clipboard

Instant crash on playback (NixOS 22.11.20220811.964d60f)

Open dustinlyons opened this issue 2 years ago • 3 comments

Describe the bug Playing any song results in a crash without any error message using NixOS default audio configuration.

To Reproduce Steps to reproduce the behavior:

  1. Open ncspot and login
  2. Select any song and hit Enter (play)
  3. User is returned to the command line

Expected behavior The song plays.

System (please complete the following information):

  • OS: NixOS 22.11.20220811.964d60f, kernel is 5.19.0
  • Terminal: Alacritty
  • Version: 0.9.8
  • Installed from: nixpkgs

Backtrace/Debug log [2022-08-12][10:08:58] [ureq::stream] [DEBUG] connecting to api.spotify.com:443 at 35.186.224.25:443 [2022-08-12][10:08:58] [librespot_playback::player] [ERROR] Audio Sink Error Connection Refused: <AlsaSink> Device default May be Invalid, Busy, or Already in Use, ALSA function 'snd_pcm_open' failed with error 'ENOENT: No such file or directory'

dustinlyons avatar Aug 12 '22 14:08 dustinlyons

It looks like your build is trying to playback via ALSA which is not set up correctly?

hrkfdn avatar Aug 16 '22 15:08 hrkfdn

I have the same behavior in Ubuntu 22.04, how can I fix the ALSA issue, I miss my ncspot...

gromeron avatar Aug 30 '22 14:08 gromeron

I've got a similar alsa-related issue installing ncspot using home-manager, as a workaround, if I set ALSA_PLUGIN_DIR env variable pointing to $[pkgs.alsa-plugins}/lib/alsa-lib it works, but I wonder whether is possible to force ncspot to use pulse instead of alsa.

I'm using v0.12.0 and --help shows it has support for Audio backends: alsa, pulseaudio, pipe, subprocess

Building the same version from sources works as expected using pulse: Audio backends: pulseaudio, pipe, subprocess

szaffarano avatar Feb 05 '23 14:02 szaffarano