[SOLVED] Spotify Connect Auto Start appears to be failing

Max2Play Home 2016 (en) Forums Max2Play Add-ons [SOLVED] Spotify Connect Auto Start appears to be failing

This topic contains 18 replies, has 4 voices, and was last updated by  Heiner Moderator 12 minutes ago.

Viewing 19 posts - 1 through 19 (of 19 total)
  • 25. September 2017 at 22:17 #31547

    MAX2PLAY 2.44, Raspberry PI 2, HifiBerry Digi+, LAN connected

    Spotify Connect plugin set to autostart, but after reboot is not running. Can be started manually.

    ===============================================================================================================================================
    DEBUG Information after reboot
    ———————————————————————————————————————————————–
    #### Librespot Output ####
    INFO:librespot: librespot cc9dba8 (2017-03-26). Built on 2017-07-17. Build ID: 8zQE3Bpb
    WARN:librespot::apresolve: Failed to resolve Access Point: HTTP error
    WARN:librespot::apresolve: Using fallback “ap.spotify.com:80”
    INFO:librespot::session: Connecting to AP “ap.spotify.com:80”
    thread ‘main’ panicked at ‘called Result::unwrap() on an Err value: Error { repr: Custom(Custom { kind: Other, error: StringError(“failed to lookup address information: Name or service not known”) }) }’, /checkout/src/libcore/result.rs:859
    note: Run with RUST_BACKTRACE=1 for a backtrace.

    #### Librespot Command Line Options ####
    error: Required option ‘name’ missing.
    Usage: /opt/spotifyconnect/librespot [options]

    Options:
    -c, –cache CACHE Path to a directory where files will be cached.
    –disable-audio-cache
    Disable caching of the audio data.
    -n, –name NAME Device name
    -b, –bitrate BITRATE
    Bitrate (96, 160 or 320). Defaults to 160
    –onstart PROGRAM
    Run PROGRAM when playback is about to begin.
    –onstop PROGRAM
    Run PROGRAM when playback has ended.
    ———————————————————————————————————————————————–

    ===============================================================================================================================================
    DEBUG Information after manual start
    ———————————————————————————————————————————————–
    #### Librespot Output ####
    INFO:librespot: librespot cc9dba8 (2017-03-26). Built on 2017-07-17. Build ID: 8zQE3Bpb
    INFO:librespot::session: Connecting to AP “gew1-accesspoint-b-b0dn.ap.spotify.com:4070”
    INFO:librespot::session: Authenticated as “theonlyfoz” !
    INFO:librespot::audio_backend::alsa: Using alsa sink
    INFO:librespot::session: Country: “GB”

    #### Librespot Command Line Options ####
    error: Required option ‘name’ missing.
    Usage: /opt/spotifyconnect/librespot [options]

    Options:
    -c, –cache CACHE Path to a directory where files will be cached.
    –disable-audio-cache
    Disable caching of the audio data.
    -n, –name NAME Device name
    -b, –bitrate BITRATE
    Bitrate (96, 160 or 320). Defaults to 160
    –onstart PROGRAM
    Run PROGRAM when playback is about to begin.
    –onstop PROGRAM
    Run PROGRAM when playback has ended.
    -v, –verbose Enable verbose output
    -u, –username USERNAME
    Username to sign in with
    -p, –password PASSWORD
    Password
    –disable-discovery
    Disable discovery mode
    –backend BACKEND
    Audio backend to use. Use ‘?’ to list options
    –device DEVICE Audio device to use. Use ‘?’ to list options
    –mixer MIXER Mixer to use
    ———————————————————————————————————————————————–

    26. September 2017 at 10:50 #31553

    Hi theonlyfoz,

    Please make sure you have Squeezelite and Shairport autostarts deactivated to rule them out as a source of error.

    26. September 2017 at 11:31 #31555

    OK done that, exactly same result. Shareport is not in use anyway at the moment but may be needed when box is deployed so I will test with Squeezelite and Shareport on Auto Start after we resolve the Spotify Connect alone. Any other info that would be helpful ?

    ===============================================================================================================================================
    DEBUG information after boot
    ———————————————————————————————————————————————–
    #### Librespot Output ####
    INFO:librespot: librespot cc9dba8 (2017-03-26). Built on 2017-07-17. Build ID: 8zQE3Bpb
    WARN:librespot::apresolve: Failed to resolve Access Point: HTTP error
    WARN:librespot::apresolve: Using fallback “ap.spotify.com:80”
    INFO:librespot::session: Connecting to AP “ap.spotify.com:80”
    thread ‘main’ panicked at ‘called Result::unwrap() on an Err value: Error { repr: Custom(Custom { kind: Other, error: StringError(“failed to lookup address information: Name or service not known”) }) }’, /checkout/src/libcore/result.rs:859
    note: Run with RUST_BACKTRACE=1 for a backtrace.

    #### Librespot Command Line Options ####
    error: Required option ‘name’ missing.
    Usage: /opt/spotifyconnect/librespot [options]
    ———————————————————————————————————————————————–

    FYI DEBUG Information when manually started, still not started Squeezelite at this point although there have been no problems manually starting Spotify Connect when Squeezelite running in the past
    ===============================================================================================================================================
    DEBUG Information
    ———————————————————————————————————————————————–
    #### Librespot Output ####
    INFO:librespot: librespot cc9dba8 (2017-03-26). Built on 2017-07-17. Build ID: 8zQE3Bpb
    INFO:librespot::session: Connecting to AP “lon6-accesspoint-a29.ap.spotify.com:4070”
    INFO:librespot::session: Authenticated as “theonlyfoz” !
    INFO:librespot::audio_backend::alsa: Using alsa sink
    INFO:librespot::session: Country: “GB”

    #### Librespot Command Line Options ####
    error: Required option ‘name’ missing.
    Usage: /opt/spotifyconnect/librespot [options]
    ———————————————————————————————————————————————–

    • This reply was modified 3 weeks, 6 days ago by  theonlyfoz. Reason: Add more info
    26. September 2017 at 14:39 #31561

    I just set up a fresh image and tried to recreate your error, unsuccessfully unfortunately.

    Please try reinstalling the Spotify Connect service as it automatically takes the newest version of librespot for a new installation and log in again.

    27. September 2017 at 0:48 #31565

    I did a complete rebuild from recently downloaded image from Max2Play. I think I need to do more testing. I had a scenario all tagged out, which I had detailed here, which has just been shown to be wrong when I rebooted again. Will post when I am more confident of repeatable results.

    Thanks

    • This reply was modified 3 weeks, 5 days ago by  theonlyfoz. Reason: Results of testing changed
    27. September 2017 at 10:15 #31568

    I am still having trouble getting repeatable results.

    I have 2 identical setups with Raspberry PI 2 with HiFiBerry Digi+. I reloaded one with a fresh image downloaded from Max2Play. The previous loads were sourced from HiFiBerry but I do not think that has any bearing.

    Last night I thought I had found that if the Player name/URL had a ‘-‘ in it, then that was causing an issue, especially as the result of setting Network Lookup displays the names truncated from that ‘-‘ eg using mx-middle as the name resulted in middle.home as the name in the Network Lookup list displayed top right on the web interface. It still appears to reduce the reliability of the autostart but that may be coincidence as removing the ‘-‘ has not guaranteed that the autostart will succeed every time.

    Both boxes are connected by LAN to a PowerLine network using TP-Link AV1200 adaptors and I am wondering if they are introducing instability. Equally I realised this morning that one of the boxes was set for Europe/Berlin whilst the other was correct as Europe/London. This was a bit of an oversight and may be Spotify didn’t always like Connect devices on the same Premium account in different timezones although again it had been working some times.

    Having corrected the timezone I will keep trying and see how stable the Autostart is. Moving to WiFi may be an issue as the 2.4GHz band for which I have dongles is very congested here which is why I put in the PowerLine.

    28. September 2017 at 12:24 #31586

    Thanks for the detailed update. Please keep me posted if there are any more errors.

    3. October 2017 at 21:11 #31668

    Hallo,
    erst mal sorry das ich auf Deutsch schreibe, mein englisch ist nicht so gut, ich hoffe das ist ok.

    Ich habe im Grunde dasselbe Problem wie „theonlyfoz“.

    Mal startet Spotify Connect automatisch, mal nicht. Dies scheint völlig willkürlich zu passieren.
    Alle anderen Player (Shairport, Squeezelite) habe ich inzwischen zu Testzwecken aus dem Autostart herausgenommen. Den Spotify Connect Service habe ich re-installiert, sollte also auf dem neuesten Stand sein.
    Von Hand kann ich Spotify immer problemlos starten.

    Max2Play 2.44
    Raspberry Pi B
    USB Soundkarte (Creative Sound Blaster Play)
    Angeschlossen via LAN Kabel
    Sprache/Zeitzone: Deutsch/Deutschland – Europe/Berlin

    Hier mal die DEBUG Infos von Spotify wenn der Autostart geklappt hat und wenn nicht. Vielleicht könnt ihr ja mehr damit anfangen als ich.

    —–AUTOSTART OK—–

    #### 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-a65.ap.spotify.com:4070”
    INFO:librespot::session: Authenticated as “XXXXXXXXXXXXXX” !
    INFO:librespot::session: Country: “DE”
    INFO:librespot::audio_backend::alsa: Using alsa sink

    #### Librespot Command Line Options ####
    error: Required option ‘name’ missing.
    Usage: /opt/spotifyconnect/librespot [options]

    Options:
    -c, –cache CACHE Path to a directory where files will be cached.
    –disable-audio-cache
    Disable caching of the audio data.
    -n, –name NAME Device name
    -b, –bitrate BITRATE
    Bitrate (96, 160 or 320). Defaults to 160
    –onstart PROGRAM
    Run PROGRAM when playback is about to begin.
    –onstop PROGRAM
    Run PROGRAM when playback has ended.
    -v, –verbose Enable verbose output
    -u, –username USERNAME
    Username to sign in with
    -p, –password PASSWORD
    Password
    –disable-discovery
    Disable discovery mode
    –backend BACKEND
    Audio backend to use. Use ‘?’ to list options
    –device DEVICE Audio device to use. Use ‘?’ to list options
    –mixer MIXER Mixer to use

    —-AUTOSTART NICHT OK—-

    #### Librespot Output ####
    INFO:librespot: librespot cc9dba8 (2017-03-26). Built on 2017-07-17. Build ID: 8zQE3Bpb
    WARN:librespot::apresolve: Failed to resolve Access Point: HTTP error
    WARN:librespot::apresolve: Using fallback “ap.spotify.com:80”
    INFO:librespot::session: Connecting to AP “ap.spotify.com:80”
    thread ‘main’ panicked at ‘called Result::unwrap() on an Err value: Error { repr: Custom(Custom { kind: Other, error: StringError(“failed to lookup address information: Name or service not known”) }) }’, /checkout/src/libcore/result.rs:859
    note: Run with RUST_BACKTRACE=1 for a backtrace.

    #### Librespot Command Line Options ####
    error: Required option ‘name’ missing.
    Usage: /opt/spotifyconnect/librespot [options]

    Options:
    -c, –cache CACHE Path to a directory where files will be cached.
    –disable-audio-cache
    Disable caching of the audio data.
    -n, –name NAME Device name
    -b, –bitrate BITRATE
    Bitrate (96, 160 or 320). Defaults to 160
    –onstart PROGRAM
    Run PROGRAM when playback is about to begin.
    –onstop PROGRAM
    Run PROGRAM when playback has ended.
    -v, –verbose Enable verbose output
    -u, –username USERNAME
    Username to sign in with
    -p, –password PASSWORD
    Password
    –disable-discovery
    Disable discovery mode
    –backend BACKEND
    Audio backend to use. Use ‘?’ to list options
    –device DEVICE Audio device to use. Use ‘?’ to list options
    –mixer MIXER Mixer to use

    5. October 2017 at 14:52 #31701

    Hi Aufschlagzuender,

    Falls du noch andere Player im Audioplayer-Menü am Laufen hast, entferne bei diesen bitte den Autostart und starte das System neu.

    Bitte check außerdem in WLAN/LAN, ob beim Access Point Autostart Mode noch ein Haken ist und entferne diesen auch ggf.

    Außerdem gibt es noch seit kurzem Spotify Connect im neuen Spotty Plugin für Squeezebox Server, falls du diesen nutzt. In unserer Anleitung steht nun auch, wie man dies nutzen kann: https://www.max2play.com/en/how-tos/howto-spotify/

    15. October 2017 at 3:04 #31899

    Hallo,
    erst Mal vielen Dank für die Antwort. Leider habe ich wenig Zeit und konnte erst jetzt wieder weiter probieren.

    Ich bin nun noch mal komplett von vorne angefangen und wie folgt vorgegangen.

    -Max2Play Image neu runtergeladen (Version 2.44) und auf SD-Karte kopiert
    -Mail Adresse zum aktivieren eingetragen
    -Sprache auf Deutsch/Deutschland geändert
    -Spotify Connect Plugin heruntergeladen und installiert
    -Haken bei Autostart gesetzt
    – Zugangsdaten für Spotify eingetragen
    -Im Menü Audioplayer die Autostart Haken bei Squeezelite und Shairport entfernt
    -Im Menü WLAN & LAN den Haken bei Aktiviere WPS beim Booten entfernt
    -Spotify Plugin gestartet (läuft)
    -Auf die USB- Soundkarte habe ich erst mal verzichtet um diese als Fehlerquelle aus zu schließen.

    -Neustart über Menü Einstellungen/Reboot
    -Spotify Connect Service läuft
    -Neustart über Menü Einstellungen/Reboot
    -Spotify Connect Service läuft
    -Neustart über Menü Einstellungen/Reboot
    -Spotify Connect Service läuft
    -Neustart über Menü Einstellungen/Reboot
    -Spotify Connect Service läuft
    -Neustart über Menü Einstellungen/Reboot
    -Spotify Connect Service läuft NICHT!!!
    -Neustart über Menü Einstellungen/Reboot
    -Spotify Connect Service läuft
    -Neustart über Menü Einstellungen/Reboot
    -Spotify Connect Service läuft
    -Neustart über Menü Einstellungen/Reboot
    -Spotify Connect Service läuft
    -Neustart über Menü Einstellungen/Reboot
    -Spotify Connect Service läuft
    -Neustart über Menü Einstellungen/Reboot
    -Spotify Connect Service läuft
    -Neustart durch Trennung der Stromversorgung
    -Spotify Connect Service läuft NICHT!!!
    -Neustart durch Trennung der Stromversorgung
    -Spotify Connect Service läuft NICHT!!!
    -Neustart durch Trennung der Stromversorgung
    -Spotify Connect Service läuft NICHT!!!
    -Neustart durch Trennung der Stromversorgung
    -Spotify Connect Service läuft NICHT!!!
    -Neustart durch Trennung der Stromversorgung
    -Spotify Connect Service läuft NICHT!!!
    -Neustart durch Trennung der Stromversorgung
    -Spotify Connect Service läuft NICHT!!!
    -Neustart über Menü Einstellungen/Reboot
    -Spotify Connect Service läuft
    -Neustart über Menü Einstellungen/Reboot
    -Spotify Connect Service läuft
    -Neustart durch Trennung der Stromversorgung
    -Spotify Connect Service läuft NICHT!!!

    Sieht also so aus als würde das Problem hauptsächlich auftreten, wenn man die Stromversorgung trennt. Allerdings meine ich das, bevor ich das Image neu aufgespielt habe, der Service hin und wieder auch gestartet ist obwohl der Raspberry vorher stromlos war.

    Hier noch mal die DEBUG Info:

    #### Librespot Output ####
    INFO:librespot: librespot cc9dba8 (2017-03-26). Built on 2017-07-17. Build ID: 8zQE3Bpb
    WARN:librespot::apresolve: Failed to resolve Access Point: HTTP error
    WARN:librespot::apresolve: Using fallback “ap.spotify.com:80”
    INFO:librespot::session: Connecting to AP “ap.spotify.com:80”
    thread ‘main’ panicked at ‘called Result::unwrap() on an Err value: Error { repr: Custom(Custom { kind: Other, error: StringError(“failed to lookup address information: Name or service not known”) }) }’, /checkout/src/libcore/result.rs:859
    note: Run with RUST_BACKTRACE=1 for a backtrace.

    #### Librespot Command Line Options ####
    error: Required option ‘name’ missing.
    Usage: /opt/spotifyconnect/librespot [options]

    Options:
    -c, –cache CACHE Path to a directory where files will be cached.
    –disable-audio-cache
    Disable caching of the audio data.
    -n, –name NAME Device name
    -b, –bitrate BITRATE
    Bitrate (96, 160 or 320). Defaults to 160
    –onstart PROGRAM
    Run PROGRAM when playback is about to begin.
    –onstop PROGRAM
    Run PROGRAM when playback has ended.
    -v, –verbose Enable verbose output
    -u, –username USERNAME
    Username to sign in with
    -p, –password PASSWORD
    Password
    –disable-discovery
    Disable discovery mode
    –backend BACKEND
    Audio backend to use. Use ‘?’ to list options
    –device DEVICE Audio device to use. Use ‘?’ to list options
    –mixer MIXER Mixer to use

    Das Spotty Plugin habe ich schon auf meinem Squeezebox Server laufen.
    Ich bekomme es allerdings nicht hin das dieses Plugin in der Spotify App als „verfügbares Gerät“ angezeigt wird.
    In dem link von dir steht ja:

    „you can set the checkmark for Spotify Connect in the Squeezebox Server settings under “Spotty Spotify for Squeezebox” in the “player” tab“

    Mit „Player Tab“ ist wohl eher „Plugin Tab“ gemeint, oder nicht?
    Dort kann ich aber nirgends einen Haken für Spotify Connect setzen. Ich habe Version 1.9.4 installiert. Ist das noch die aktuelle Version?

    Mein Ziel ist es in meiner Gartenhütte einen Raspberry zu installieren mit dem ich sowohl auf den Squeezebox Server als auch auf Spotify zugreifen kann. Spotify würde ich gerne via Spotify Connect über die original App bedienen.

    Gruß
    Aufschlagzuender

    16. October 2017 at 21:56 #31910

    Similar problem here!
    – Sometimes autostart seems to work, sometimes not.
    – I have 3 Raspberrys in 3 rooms running all the time and use only the Spotify Connect service (no other players running). After some time the Spotify Connect service seems to stop working but i can restart it manually (this occurs maybe once a day or so).

    Any ideas? Is it possible that there is kind of a forced disconnect from Spotify?

    17. October 2017 at 0:06 #31914

    Hmmmm, I’ve not been aware of the service falling over once running except as per my posting re if another device already has control of the sound card when you start to send from spotify (Spotify Connect service crashes if used when Squeezelite player not paused), but then I have not been using it heavily. Out of interest, and not wishing to interfere with the process of the guys here, does the Spotify Connect page say the service has stopped running when you say it stops working and if so does the DEBUG information on the Spotify Connect page tell you anything AFTER the service has crashed ?

    I have not been massively pushing the Auto Start testing but have had no failures since disabling Activate WPS on Boot on the WiFi/LAN page, even on a Pi 2 which has no wifi dongle attached.

    • This reply was modified 6 days, 16 hours ago by  theonlyfoz.
    17. October 2017 at 12:37 #31936

    Hi guys,

    @aufschlagzuender: Spotty’s Spotify Connect beta feature had been added since version 1.9, so you should definitely have it.

    @wmrch: Which output device do you use and which version of librespot is active in your plugin? Please also try deactivating WPS, as Foz mentioned.

    17. October 2017 at 13:31 #31939

    I was as confused as some others about this Spotify Connect option in Spotty plugin, until now.

    I just reloaded Squeezebox server from scratch, using nightly build. Re-added Spotty plugin. Authorised through my phone.

    Go back in to server settings, Players page, set the pi as the player, drop down list from Basic settings for that player, Spotty Spotify for Sqeezebox is now an option in that dropdown menu. Take the option and tick the Spotify Connect (EXPRIMENTAL) option. Success !

    pi squeezelite player now appears as a Spotify Connect point from Spotify app. For single room is now a possible option.

    Testing now. Many thanks, will see how it goes.

    Foz

    18. October 2017 at 10:13 #31962

    Hi Foz,

    Please keep in mind that this is still at the beta stage. Here is the announcement:
    http://forums.slimdevices.com/showthread.php?108030-Announce-Spotty-v1-9-0-now-with-experimental-Spotify-Connect-support!

    20. October 2017 at 13:37 #32021

    Hi Heiner,

    Yeah it is flagged as experimental but seems to working OK, currently v1.9.5.

    As an update, when I have had the Max2Play Spotify Connect extension on Auto start for the past week at least I have had no problems with it starting whether Activate WPS on Boot ticked or unticked, so I think from my point of view this thread is closed for now.

    Time for me to move on.

    Thanks

    Foz

    20. October 2017 at 14:13 #32022

    Sounds good, thanks for the update.

    20. October 2017 at 21:11 #32026

    Hi Heiner,

    i use sysdefault – snd_rpi_hifiberry_dacplus as output device.

    This is the log from the Spotify connect option page:

    #### 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-a53.ap.spotify.com:4070”
    INFO:librespot::session: Authenticated as “wmrch” !
    INFO:librespot::audio_backend::alsa: Using alsa sink
    INFO:librespot::session: Country: “DE”

    thread ‘main’ panicked at ‘Box<Any>’, src/session.rs:129
    note: Run with RUST_BACKTRACE=1 for a backtrace.

    Main problem is that Spotify connect service stops working after some time (same problem on three different pi devices) and has to be restarted manually.

    Any ideas?

    23. October 2017 at 16:47 #32052

    Hi wmrch,

    Please try adding hw volume control and check to make sure the other audio players do not have active autostarts and do not have the same output device selected in the advanced options.

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

You must be logged in to reply to this topic.

Register here