Spotify Connect service crashes if used when Squeezelite player not paused

Max2Play Home Forums Max2Play Add-ons Spotify Connect service crashes if used when Squeezelite player not paused

Viewing 15 posts - 1 through 15 (of 15 total)
  • 12. Oktober 2017 at 21:46 #31881

    Raspberry PI running Max2Play v2.44, Squeezelite Max2Play v1.0.3 with HiFiBerry Digi+ OR IQaudIO DACZero.

    Start playing music through Squeezelite player.
    Start playing music through Spotify Connect service without pausing Squeezelite Player first.

    Squeezelite Player continues playing, OK, but the Spotify Connect service goes in to a crash with DEBUG information as listed here.

    I know the Squeezelite Player should ideally be paused first to release the sound card and switching usually does work fine in that case but sometimes people forget and then the Spotify Connect kills itself requiring restart. I have also had occurrences of this when Squeezelite Player has been paused, but not enough time elapsed before starting Spotify playing ? By contrast if Spotify Connect service is active and Squeezelite Player is started Spotify continues playing but Squeezelite Player DOES NOT CRASH allowing Spotify to be paused and Squeezelite Player take control.

    -C 10 option is in place on Squeezelite Player (actually -C 2)

    #### Librespot Output ####
    INFO:librespot: librespot cc9dba8 (2017-03-26). Built on 2017-07-17. Build ID: 8zQE3Bpb
    INFO:librespot::session: Connecting to AP „lon3-accesspoint-a60.ap.spotify.com:4070“
    INFO:librespot::session: Authenticated as „theonlyfoz“ !
    INFO:librespot::audio_backend::alsa: Using alsa sink
    INFO:librespot::session: Country: „GB“
    INFO:librespot::player: Loading track „Overture Ruy Blas, Op. 95“
    INFO:librespot::player: Track „Overture Ruy Blas, Op. 95“ loaded
    thread ‚<unnamed>‘ panicked at ‚called Option::unwrap() on a None value‘, /checkout/src/libcore/option.rs:329
    note: Run with RUST_BACKTRACE=1 for a backtrace.
    thread ‚main‘ panicked at ‚called Result::unwrap() on an Err value: „SendError(..)“‚, /checkout/src/libcore/result.rs:859

    16. Oktober 2017 at 17:20 #31906

    Hi theonlyfoz,

    Thanks for the feedback.

    Please do try to „reinstall“ with the button on Spotify Connect to get the latest version of librespot in order make sure the issue is not connected to this version.

    16. Oktober 2017 at 18:57 #31907

    I will try that, but unless there has been a very new build of librespot I suspect there will be no change.

    I refer you to Issue #165 on librespot github, raised 17 March and apparently still open (https://github.com/plietar/librespot/issues/165). It was also recently announced (https://github.com/plietar/librespot/commit/171be66fd959b956a8aab58e886cdc986ab4b4a4) that plietar can no longer support librespot.

    Having said that, I do have a Pi Zero running Volumio 2 with their Volumio Spotify Connect 2 which is also based on librespot and I find that does work OK. Start playing through Spotify connect while currently playing via say AirPlay and it will allow the Spotify control if the Airplay is paused after the Spotify has started. I do wonder if they are simply relaunching the librespot or using it in a different way. Whatever, it is more elegant than the Max2Play implementation crashing and needing restarting.

    With regards to librespot, what happens now ? Everybody seems to have switched to it including yourselves, Volumio, I believe the Spotty LMS plugin is built around librespot, as are some hardware products. Will someone pick it up and run with it ? Will we ever get gapless Spotify Connect ? Am I going to have to buy a Yamaha WXAD-10, I hope not.

    Thanks for the time you spend on this project and your help

    Foz

    • This reply was modified 6 years, 5 months ago by theonlyfoz.
    • This reply was modified 6 years, 5 months ago by theonlyfoz. Reason: rephrasing
    16. Oktober 2017 at 22:22 #31913

    I did try reinstalling but made no difference.

    I think the actual sequence is:

    Let’s say we’re active via Squeezelite player. Start playing via Spotify Connect. Squeezelite keeps playing, which is fine. Spotify appears to be playing in that the progress bar and timers are changing in Spotify Now Playing panel. Pause Squeezelite player via LMS web control. Spotify still playing, Spotify Connect service still running, but no sound being output from Pi box. Pause Spotify player and I think it is at that point that the Connect service crashes with the usual debug info. That’s what appears to happen, although there may be some timing synchronicity which makes it appear it’s hitting pause that kills it.

    #### Librespot Output ####
    INFO:librespot: librespot cc9dba8 (2017-03-26). Built on 2017-07-17. Build ID: 8zQE3Bpb
    INFO:librespot::session: Connecting to AP „lon2-accesspoint-a12.ap.spotify.com:4070“
    INFO:librespot::session: Authenticated as „theonlyfoz“ !
    INFO:librespot::audio_backend::alsa: Using alsa sink
    INFO:librespot::session: Country: „GB“
    INFO:librespot::player: Loading track „Symphony No. 1 in C Minor, Op. 11: I. Allegro di molto“
    INFO:librespot::player: Track „Symphony No. 1 in C Minor, Op. 11: I. Allegro di molto“ loaded
    thread ‚<unnamed>‘ panicked at ‚called Option::unwrap() on a None value‘, /checkout/src/libcore/option.rs:329
    note: Run with RUST_BACKTRACE=1 for a backtrace.
    thread ‚main‘ panicked at ‚called Result::unwrap() on an Err value: „SendError(..)“‚, /checkout/src/libcore/result.rs:859

    17. Oktober 2017 at 12:31 #31935

    Hi foz,

    The automatic switch between these players is still being worked on and will probably be available in the next update. Until then, the direct change of output can always cause issues.

    17. Oktober 2017 at 15:48 #31943

    Thanks for your time Heiner.

    I am currently trying to get a Pi Zero providing just Spotify Connect and AirPlay for a friend. As I am now testing Max2Play using Spotify Connect via Spotty on the Squeezebox server having got that working, using ShareTunes for the AirPlay support, I will not be looking at the Spotify Connect service for a short while. The Spotty Connect via the server has a big advantage in that it plays gapless. This makes a huge difference to the listening experience and was another reason why I was beginning to wonder if I would need to look at the Yamaha WXAD-10 as a more expensive alternative. I was wanting to let my friend use the Spotify app to control rather than the interface to Spotty through a Squeezebox control app such as Squeeze Ctrl to preserve the user interface for him and keep things familiar and simple.

    Thanks again for now

    Foz

    18. Oktober 2017 at 11:24 #31969

    Hi Foz,

    Thanks for the follow-up.

    I checked the Spotify Connect plugin today and have not been able to recreate an issue thus far. So you can still use it if you want.

    However, if you already use the Squeezebox system, the Spotty plugin does make more sense for the whole environment.

    18. Oktober 2017 at 16:59 #31985

    Hi Heiner,

    Thanks for the info and more of your time.

    I just refreshed the Connect extension and did some testing regarding gapless which has become my major focus now that Spotty is providing Connect services. I don’t want to distract from the issue in this thread so would prefer to either start a new thread, post to you direct, or just let you get on with life, whichever you prefer.

    Thanks again

    Foz

    19. Oktober 2017 at 11:53 #31990

    Hi Foz,

    You can gladly start a new thread and this sort of is my life 😀

    19. Oktober 2017 at 14:22 #31993

    Cheers Heiner,

    Accepting that switching is still being worked on and other factors I will stop posting to this thread and have another look when the next release is available or is it worth looking at the beta at some point ? Do you have any schedule for the next release ?

    Thanks

    Foz

    19. Oktober 2017 at 15:59 #31995

    Hi Foz,

    No schedule for new releases, but you can already check out the beta as a premium user. You can either manually install the newest beta of a plugin by changing the part of the plugin url „currentversion“ to „beta“ or just click beta update in the Settings/Reboot to get all plugins‘ newest beta. Newest beta of Spotify Connect already includes the automatic switch, check it out 😉

    19. Oktober 2017 at 19:35 #31997

    Hi Heiner,

    Will give it a go ! What’s best for Spotify Connect Output device, ALSA or HiFiBerry card ?

    20. Oktober 2017 at 10:39 #32003

    If you are using a hifiberry sound card, you should select the hifiberry output 😉

    20. Oktober 2017 at 13:09 #32020

    Thanks, yeah was rather a dumb question.

    Will try to get some proper testing done over next few days.

    20. Oktober 2017 at 14:21 #32024

    Not at all, making sure is what this forum is all about 😉

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.

Register here