mopidy / mopidy-spotify

Mopidy extension for playing music from Spotify
https://mopidy.com/ext/spotify/
Apache License 2.0
934 stars 108 forks source link

RecvError panic during spotifyaudiosrc playback #352

Closed kingosticks closed 5 days ago

kingosticks commented 1 year ago
Mar 27 15:53:58 raspberrypi mopidy[30917]: thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', audio/spotify/src/spotifyaudiosrc/imp.rs:341:37
Mar 27 15:53:58 raspberrypi mopidy[30917]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Mar 27 15:53:58 raspberrypi mopidy[30917]: ERROR    [MainThread] mopidy.audio.gst GStreamer error: Panicked: called `Result::unwrap()` on an `Err` value: RecvError
Mar 27 15:53:58 raspberrypi mopidy[30917]: DEBUG    [MainThread] mopidy.audio.gst Got ERROR bus message: error=GLib.Error('Panicked: called `Result::unwrap()` on an `Err` value: RecvError', 'gst-library-error-quark', 1) debug=None
Mar 27 15:53:58 raspberrypi mopidy[30917]: DEBUG    [MainThread] mopidy.audio.gst Changing state to GST_STATE_NULL: result=GST_STATE_CHANGE_SUCCESS

It's also not very obvious what version of spotifyaudiosrc is being used. Logging/debug needs improvements.

beaverking1212 commented 1 year ago

Does this crash mopidy or playback of next song works? Can we reproduce this error?

kingosticks commented 1 year ago

I think I had to restart Mopidy but that might have been because my USB soundcard was emitting a horrible loud noise following this.

I've not been able to reproduce it since.

simmel commented 7 months ago
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', audio/spotify/src/spotifyaudiosrc/imp.rs:250:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
ERROR    2024-02-05 14:55:35,983 [25858:MainThread] mopidy.audio.gst
  GStreamer error: Panicked: called `Result::unwrap()` on an `Err` value: RecvError

I had a similar (the same?) panic with this code https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/blob/9556abb162aee996296ce893238e2c1bb5842704/audio/spotify/src/spotifyaudiosrc/imp.rs#L250

I did a local patch to see if that fixed it but I can't reproduce the error. For me it comes after a long time and usually while (or close to) switching between songs. I can wait it out but it takes a long time for the gst plugin to recover. I suspect setting some timeouts somewhere will make it recover faster.

kingosticks commented 5 days ago

I've never reproduced this so I'm going to close it.

but it takes a long time for the gst plugin to recover. I suspect setting some timeouts somewhere will make it recover faster.

I think this is an issue in its own right so I've created https://github.com/mopidy/mopidy-spotify/issues/398