xou816/spot

No playback on pipewire

k1gen opened this issue · 11 comments

k1gen commented

Describe the bug
There is no sound when the GStreamer audio backend is used.

To Reproduce
Steps to reproduce the behavior:

  1. Try to play any track
  2. See the error in terminal

Expected behavior
The music starts playing after I press the Play button.

General information:

  • Distribution: Arch Linux
  • Installation method: yay -S spot-client-git --removemake --mflags='--nocheck'
  • Version: aa1c578
  • Device used: laptop

Stack trace:

$ RUST_BACKTRACE=full spot

(process:156358): Adwaita-CRITICAL **: 19:18:55.004: adw_leaflet_set_visible_child: assertion 'contains_child' failed
thread '<unnamed>' panicked at /home/olk/.cache/yay/spot-client-git/src/spot-client-git/cargo/registry/src/index.crates.io-6f17d22bba15001f/librespot-playback-0.4.2/src/audio_backend/gstreamer.rs:69:18:
Failed to create custom GStreamer sink: Error { domain: gst_parse_error, code: 1, message: "no element \"pipewiresink\"" }
stack backtrace:
   0:      0x7cf15d3e82c - <unknown>
   1:      0x7cf15d6cf8c - <unknown>
   2:      0x7cf15d3a84e - <unknown>
   3:      0x7cf15d3e614 - <unknown>
   4:      0x7cf15d3fec3 - <unknown>
   5:      0x7cf15d3fbe4 - <unknown>
   6:      0x7cf15d40445 - <unknown>
   7:      0x7cf15d40341 - <unknown>
   8:      0x7cf15d3ed56 - <unknown>
   9:      0x7cf15d40092 - <unknown>
  10:      0x7cf152aa1d5 - <unknown>
  11:      0x7cf152aa6b3 - <unknown>
  12:      0x7cf158baa49 - <unknown>
  13:      0x7cf158d5895 - <unknown>
  14:      0x7cf154657a7 - <unknown>
  15:      0x7cf15467272 - <unknown>
  16:      0x7cf15d45105 - <unknown>
  17:     0x6d68511bd9eb - <unknown>
  18:     0x6d68512417cc - <unknown>
  19:                0x0 - <unknown>
[2023-11-19T18:18:58Z ERROR librespot_playback::player] Player Commands Error: channel closed
[that error couple more times]
[2023-11-19T18:19:08Z ERROR librespot_playback::player] Player Commands Error: channel closed
k1gen commented

Anyone? :)

Using the Flatpak with the Pipewire backend. I don't get the above, but I do get very crackly output.

Using the Flatpak version on Arch, even though I'm using Pipewire, there's no "Pipewire" backend on the app. The default backend was on "PulseAudio" which didn't have any sound. Changing it to ALSA made it work.

k1gen commented

Using the Flatpak version on Arch, even though I'm using Pipewire, there's no "Pipewire" backend on the app. The default backend was on "PulseAudio" which didn't have any sound. Changing it to ALSA made it work.

that's because you're using latest release, it doesn't include pipewire support. try building latest commit

Using 0.4.0 from the AUR (spot-client), and with the pulseaudio backend, basically everything works here. I can even use EasyEffects.

Update: The audio is crackly while using gstreamer, similar to @tristantarrant

I'm affected too, there is no sound when using the Pipewire backend.

Error from Some("/GstPipeline:pipeline0/GstBin:bin0/GstPipeWireSink:pipewiresink0"): Failed to connect (Some("../src/gst/gstpipewiresink.c(846): gst_pipewire_sink_open (): /GstPipeline:pipeline0/GstBin:bin0/GstPipeWireSink:pipewiresink0"))
thread '<unnamed>' panicked at /run/build/spot/cargo/vendor/librespot-playback-0.4.2/src/audio_backend/gstreamer.rs:126:14:
unable to set the pipeline to the `Ready` state: StateChangeError
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2024-04-28T12:20:15Z ERROR librespot_playback::player] Player Commands Error: channel closed
[2024-04-28T12:20:15Z ERROR librespot_playback::player] Player thread Error: Any { .. }
Error from Some("/GstPipeline:pipeline1/GstBin:bin1/GstPipeWireSink:pipewiresink1"): Failed to connect (Some("../src/gst/gstpipewiresink.c(846): gst_pipewire_sink_open (): /GstPipeline:pipeline1/GstBin:bin1/GstPipeWireSink:pipewiresink1"))
thread '<unnamed>' panicked at /run/build/spot/cargo/vendor/librespot-playback-0.4.2/src/audio_backend/gstreamer.rs:126:14:
unable to set the pipeline to the `Ready` state: StateChangeError
[2024-04-28T12:20:17Z ERROR librespot_playback::player] Player Commands Error: channel closed

With PulseAudio, everything works perfectly, thanks for this great quality app!

Bug is currently present on flatpak version. I thought it could be a misconfiguration of flatpak permissions but after reading through these I am not so sure anymore.

I'm experiencing the same issue on Fedora 40, no matter the audio backend I select. Player shows the song progressing but no audio is being played.