[GH-ISSUE #1566] librespot Invalid state { the provided context has no tracks } #710

Closed
opened 2026-02-27 19:32:05 +03:00 by kerem · 18 comments
Owner

Originally created by @pjchamberlain on GitHub (Sep 3, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1566

Description

librespot starts OK but when trying to connect to it from another device, the connection fails and librespot reports the error message:
librespot[2292]: [2025-09-03T12:54:43Z ERROR librespot_connect::spirc] failed to handle request: Invalid state { the provided context has no tracks }

Version

librespot 0.6.0-dev ba3d501 (Built on 2025-08-11, Build ID: tEs7vh4i, Profile: release)

How to reproduce

Steps to reproduce the behavior in librespot

  1. Launch librespot either from the the command line or automatically on boot, no errors at this point
  2. Try to connect with Android Spotify app
  3. The connection fails after a few seconds trying
  4. Librespot on the Raspberry Pi reports the error above

Log

$ librespot --verbose
[2025-09-03T13:16:01Z INFO  librespot] librespot 0.6.0-dev ba3d501 (Built on 2025-08-11, Build ID: tEs7vh4i, Profile: release)
[2025-09-03T13:16:01Z TRACE librespot] Command line argument(s):
[2025-09-03T13:16:01Z TRACE librespot] 		verbose
[2025-09-03T13:16:01Z DEBUG librespot_core::session] new Session
[2025-09-03T13:16:01Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:43833
[2025-09-03T13:16:01Z INFO  librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)
[2025-09-03T13:16:01Z DEBUG librespot_playback::player] new Player [0]
[2025-09-03T13:16:01Z INFO  librespot_playback::convert] Converting with ditherer: tpdf
[2025-09-03T13:16:01Z INFO  librespot_playback::audio_backend::alsa] Using AlsaSink with format: S16
[2025-09-03T13:16:01Z DEBUG librespot_discovery] Pinged Avahi: Available
[2025-09-03T13:16:01Z TRACE librespot_discovery] Connected to Avahi
[2025-09-03T13:16:01Z DEBUG librespot_discovery] Commited zeroconf service with name librespot
[2025-09-03T13:16:02Z INFO  librespot_discovery] Published zeroconf service
[2025-09-03T13:16:12Z DEBUG librespot_discovery::server] POST "/" {}
[2025-09-03T13:16:12Z DEBUG librespot_core::session] Shutdown: Invalidating session
[2025-09-03T13:16:12Z DEBUG librespot::component] new MercuryManager
[2025-09-03T13:16:12Z DEBUG librespot::component] new ChannelManager
[2025-09-03T13:16:12Z DEBUG librespot_core::session] new Session
[2025-09-03T13:16:12Z DEBUG librespot_connect::spirc] new Spirc[0]
[2025-09-03T13:16:12Z DEBUG librespot_playback::player] command=SetSession
[2025-09-03T13:16:12Z DEBUG librespot::component] new DealerManager
[2025-09-03T13:16:12Z DEBUG librespot_core::session] drop Session
[2025-09-03T13:16:12Z DEBUG librespot::component] drop ChannelManager
[2025-09-03T13:16:12Z DEBUG librespot::component] drop MercuryManager
[2025-09-03T13:16:12Z DEBUG librespot::component] new SpClient
[2025-09-03T13:16:12Z DEBUG librespot_core::spclient] Client token unavailable or expired, requesting new token.
[2025-09-03T13:16:12Z DEBUG librespot_core::http_client] Requesting https://clienttoken.spotify.com/v1/clienttoken
[2025-09-03T13:16:12Z DEBUG librespot_core::spclient] Received a granted token
[2025-09-03T13:16:12Z TRACE librespot_core::spclient] Got client token: GrantedTokenResponse { token: "AAAq6BJT63ObpDdHMJ6QwaWPCCSHM9tXZutfRWIalNU71ArtrHZ3yVSZQqBBt402Rl3pwy0kpGScNqfiFHx/VHOXhcTeX4FdAnw2kfh76v1s6fVKIE973gXt+e/dZ/erlu2Qc6DghYB0Snpavck0yPm9HX8gKA1BsYR7VqKcVtu7FqcVHciecXHS1w77qQ4Cu1p2XIvvBbfHOihjpKg02UzABPhup1NOeTWhKpvuw/lG2bpavGtnste/abWLEuSMEjZotE+ylKOjF+xDlM6mHKJ0iR/AcHlxfbPEyRld2A==", expires_after_seconds: 1216800, refresh_after_seconds: 1209600, domains: [TokenDomain { domain: "spotify.com", special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } }, TokenDomain { domain: "spotify.net", special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } }], special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } }
[2025-09-03T13:16:12Z DEBUG librespot::component] new ApResolver
[2025-09-03T13:16:12Z DEBUG librespot_core::http_client] Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient
[2025-09-03T13:16:12Z INFO  librespot_core::session] Connecting to AP "ap-gew1.spotify.com:4070"
[2025-09-03T13:16:12Z DEBUG librespot_core::connection] Connection to AP established.
[2025-09-03T13:16:12Z DEBUG librespot_core::connection] Authenticating with AP using AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS
[2025-09-03T13:16:12Z INFO  librespot_core::session] Authenticated as 'postman2' !
[2025-09-03T13:16:12Z DEBUG librespot::component] new Login5Manager
[2025-09-03T13:16:12Z DEBUG librespot_core::http_client] Requesting https://login5.spotify.com/v3/login
[2025-09-03T13:16:12Z TRACE librespot_core::session] Received Ping
[2025-09-03T13:16:12Z TRACE librespot_core::session] keep-alive state: PendingPong, timeout in 60.0
[2025-09-03T13:16:12Z DEBUG librespot_core::session] Session strong=5 weak=6
[2025-09-03T13:16:12Z INFO  librespot_core::session] Country: "GB"
[2025-09-03T13:16:12Z TRACE librespot_core::session] Received product info: {
        "image-url": "https://i.scdn.co/image/{file_id}",
        "public-toplist": "7",
        "name": "Spotify Premium",
        "ad-session-persistence": "1",
        "explicit-content": "1",
        "key-caching-max-count": "10000",
        "prefetch-keys": "1",
        "active-session-days": "16",
        "mobile": "1",
        "audiobook-onboarding-completed": "0",
        "user-profile-show-invitation-codes": "0",
        "prefetch-strategy": "18",
        "unrestricted": "1",
        "video-keyframe-url": "http://keyframes-fa.cdn.spotify.com/keyframes/v1/sources/{source_id}/keyframe/heights/{height}/timestamps/{timestamp_ms}.jpg",
        "ab-ad-player-targeting": "1",
        "audio-preview-url-template": "https://p.scdn.co/mp3-preview/{id}",
        "shuffle": "0",
        "payments-locked-state": "0",
        "nft-disabled": "1",
        "app-developer": "0",
        "employee-free-opt-in": "0",
        "streaming": "1",
        "metadata-link-lookup-modes": "0",
        "player-license-v2": "premium",
        "collection": "1",
        "payments-initial-campaign": "default",
        "publish-playlist": "1",
        "preferred-locale": "en",
        "ad-formats-preroll-video": "0",
        "head-file-caching": "1",
        "capping-bar-threshold": "3601",
        "is_email_verified": "1",
        "head-files-url": "http://heads-fa.spotify.com/head/{file_id}",
        "arsenal_country": "1",
        "widevine-license-url": "https://spclient.wg.spotify.com/widevine-license/v1/video/license",
        "music-videos": "1",
        "shows-collection": "0",
        "network-operator-premium-activation": "1",
        "incognito_mode_timeout": "21600",
        "ugc-abuse-report-url": "https://support.spotify.com/abuse/?uri={uri}",
        "sidebar-navigation-enabled": "0",
        "shows-collection-jam": "0",
        "video-manifest-url": "https://spclient.wg.spotify.com/manifests/v6/{type}/sources/{source_id}",
        "video-device-blacklisted": "0",
        "on-demand-trial-in-progress": "0",
        "libspotify": "1",
        "playlist-annotations-markup": "0",
        "financial-product": "pr:premium,tc:0,rt:v2_GB_default_individual-basic-1m-1m_10.99_GBP_default",
        "prefetch-window-max": "2",
        "send-email": "1",
        "enable-annotations-read": "0",
        "storage-size-config": "10240,90,500,3",
        "key-caching-max-offline-seconds": "1800",
        "restrict-playlist-collaboration": "0",
        "player-license": "premium",
        "ab-watch-now": "0",
        "publish-activity": "0",
        "ugc-abuse-report": "0",
        "catalogue": "premium",
        "ads": "0",
        "browse-overview-enabled": "1",
        "type": "premium",
        "on-demand": "1",
        "remote-control": "0",
        "license-acceptance-grace-days": "30",
        "ab_recently_played_feature_time_filter_threshold": "com.spotify.gaia=30,driving-mode=120,spotify%3Ainternal%3Astartpage=30",
        "high-bitrate": "1",
        "offline": "1",
        "enable-crossfade": "1",
        "filter-explicit-content": "0",
        "video-cdn-sampling": "100",
        "radio": "1",
        "mobile-payment": "0",
        "head-files": "1",
    }
[2025-09-03T13:16:12Z DEBUG librespot::component] new MercuryManager
[2025-09-03T13:16:12Z TRACE librespot_core::mercury] mercury response <hm://pusher/v1/connections/N2MyOGFiOGE1Yzk1MTJlNDI2NmFjN2NiNzU2MzEyYzgyZWU0M2Q3ZStBUCt0Y3A6Ly8wYWNhNDA2Ni5pcC5nZXcxLnNwb3RpZnkubmV0OjUwMTMrMTRFRTcxMDczOEJBOUVCQjgxRDZEOEZCNjUyNjkzNzdENjFEMUM4M0UwQUMzNkEyNjNCOTgzNDQ4OUNEMTk0Nw%3D%3D> is handled by dealer
[2025-09-03T13:16:12Z TRACE librespot_core::login5] Got auth token: Token { access_token: "BQBMozJZEUXvEXPnVoPPMKpq1XuseKdTCsEjDCpxPC5nIPHOkEp8K6qwZ_TyqFgLtajFhnN4lIb-5Ph2Yt-KWBn87k76YNoC3tIhM19GDKc73o3Pg7funkpTZ8XkL95oWsp8scZWc9mIjTN-ef15aMFVMlaW23Qerur48IM4HK_851t77HepFVVLpQ2UmLL2FYxwrZ9z8Jj1bi6bpvLSEfp81bPkMNg2tpfl8gPhYZUkShSgg0GNPOxDeLfsaONKJ0SsEmWz8ZUVkxvFRqI5dzv8fb3zOd0jT1Kc4QAnrrcsC4xtvYpAMx4k2PvQKLjX_dwqMDPIt22ERkk5ai_FC9XgFZBi1vbTzRfYnMb2LLNa1_lVGoT9L0Icx1ppuWjeCfD_c09SX_k", expires_in: 3600s, token_type: "Bearer", scopes: [], timestamp: Instant { tv_sec: 15154, tv_nsec: 454289944 } }
[2025-09-03T13:16:12Z DEBUG librespot_connect::spirc] SpircTask::set_volume(0)
[2025-09-03T13:16:12Z DEBUG librespot_playback::player] command=AddEventSender
[2025-09-03T13:16:12Z DEBUG librespot_core::dealer::manager] Launching dealer
[2025-09-03T13:16:12Z TRACE librespot_core::dealer] Sent ping
[2025-09-03T13:16:12Z TRACE librespot_connect::spirc] Received connection ID update: "YjU1MmQ1YjMtNGM2My00OTcxLWE2ZDYtMTVmOGIwZDM5Y2RhK2RlYWxlcit0Y3A6Ly8wYWNhNDE3Mi5pcC5nZXcxLnNwb3RpZnkubmV0OjU3MDArODc4MUNGRDExOEY5OThCNzMwMjc0Mzc3OTc3MzA4MjNFRUY0NTI0QTUyRDkwQzNENTk5NzAyNzZBMTRCOUY1Rg=="
[2025-09-03T13:16:12Z INFO  librespot_core::spclient] Resolved "gew1-spclient.spotify.com:443" as spclient access point
[2025-09-03T13:16:12Z DEBUG librespot_core::http_client] Requesting https://gew1-spclient.spotify.com:443/connect-state/v1/devices/7c28ab8a5c9512e4266ac7cb756312c82ee43d7e?product=0&country=GB&salt=2829884176
[2025-09-03T13:16:12Z TRACE librespot_core::dealer] Received pong
[2025-09-03T13:16:12Z DEBUG librespot_connect::spirc] successfully put connect state for 7c28ab8a5c9512e4266ac7cb756312c82ee43d7e with connection-id YjU1MmQ1YjMtNGM2My00OTcxLWE2ZDYtMTVmOGIwZDM5Y2RhK2RlYWxlcit0Y3A6Ly8wYWNhNDE3Mi5pcC5nZXcxLnNwb3RpZnkubmV0OjU3MDArODc4MUNGRDExOEY5OThCNzMwMjc0Mzc3OTc3MzA4MjNFRUY0NTI0QTUyRDkwQzNENTk5NzAyNzZBMTRCOUY1Rg==
[2025-09-03T13:16:12Z INFO  librespot_connect::spirc] active device is <> with session <1PiJmgME1g2Tbnj7rOaCdt>
[2025-09-03T13:16:12Z TRACE librespot_core::dealer] dealer request hm://connect-state/v1/player/command
[2025-09-03T13:16:12Z TRACE librespot_core::dealer::protocol] message was sent with gzip encoding 
[2025-09-03T13:16:12Z TRACE librespot_core::dealer::protocol] websocket request: Object {
        "command": Object {
            "data": String("ChwIABAAGAAqCQoFbWVkaWESACoJCgVtZWRpYRIAEpQFCIroz/mQMxAAGQAAAAAAAAAAIAEq/QQKABIgMjUwMTY3ZTFkMjkwNDBmNjhmOGYzYmY3MjkyZGUxNjcaEAc8whYmj0GfohNhRNILsN8iMwoKYXJ0aXN0X3VyaRIlc3BvdGlmeTphcnRpc3Q6NHRad2ZnckhPYzNtdnFZbEVZU3ZWaSIgCgV0aXRsZRIXR2l2ZSBMaWZlIEJhY2sgdG8gTXVzaWMiSQoPaW1hZ2VfbGFyZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMGIyNzM5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciKgogYWN0aW9ucy5za2lwcGluZ19wcmV2X3Bhc3RfdHJhY2sSBnJlc3VtZSJKChBpbWFnZV94bGFyZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMGIyNzM5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciQwoJaW1hZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMDFlMDI5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciMQoJYWxidW1fdXJpEiRzcG90aWZ5OmFsYnVtOjRtMjg4MGppdlNiYnlFR0FLZklUQ2EiSQoPaW1hZ2Vfc21hbGxfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMDQ4NTE5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciJQoLYWxidW1fdGl0bGUSFlJhbmRvbSBBY2Nlc3MgTWVtb3JpZXMiFQoMdHJhY2tfcGxheWVyEgVhdWRpbyIqCiBhY3Rpb25zLnNraXBwaW5nX25leHRfcGFzdF90cmFjaxIGcmVzdW1lGvgDCnoKCHBsYXlsaXN0Eit3ZWItcGxheWVyXzIwMjUtMDktMDJfMTc1NjgwNDM0NzU5M181ZTZhZTQyGgAiACoIZGVlcGxpbmsyKDg4YjA5OWRjNTA5YmYxNDVjNDFlM2NhZWE4ODBmNmI1ODIwNTVjN2I6B2Nvbm5lY3RCABK5AgoBLRIKY29udGV4dDovLxoZChBlbmhhbmNlZF9jb250ZXh0EgVmYWxzZRogChtwbGF5bGlzdF9udW1iZXJfb2ZfZXBpc29kZXMSATAaHwoZcGxheWxpc3RfbnVtYmVyX29mX3RyYWNrcxICMTMaGQoNY29udGV4dF9vd25lchIIcG9zdG1hbjIaEgoObG9hZGluZy5mYWlsZWQSABo2ChxwbGF5bGlzdF92b2xhdGlsZV9jb250ZXh0X2lkEhYyVVQ5VVdwcmdNb09WZldWSkU2bDRBGhUKDmxvYWRpbmcuc3RhdHVzEgM0MDQaDQoJaW1hZ2VfdXJsEgAaOQoTY29udGV4dF9kZXNjcmlwdGlvbhIiRGFmdCBQdW5rIC0gUmFuZG9tIEFjY2VzcyBNZW1vcmllcyIAMAEaIDI1MDE2N2UxZDI5MDQwZjY4ZjhmM2JmNzI5MmRlMTY3IgAqADIAShY2ZktTUG96RFhySktrRm9tb3NvYTdLIgIQADoCCgA="),
            "endpoint": String("transfer"),
            "from_device_identifier": String("88b099dc509bf145c41e3caea880f6b582055c7b"),
            "logging_params": Object {
                "command_id": String("d9d99a4a1afd47b08f9868a74c03bf7d"),
                "interaction_ids": Array [
                    String("dea54008-f5b3-4730-9c98-72470823cdba"),
                ],
            },
            "options": Object {
                "license": String("premium"),
                "restore_paused": String("restore"),
                "restore_position": String("extrapolate"),
                "restore_track": String("always_play_something"),
                "retain_session": String("do_not_retain"),
            },
        },
        "message_id": Number(263749628),
        "play_on_secondary_stream": Null,
        "sent_by_device_id": String("88b099dc509bf145c41e3caea880f6b582055c7b"),
        "target_alias_id": Null,
    }
[2025-09-03T13:16:12Z DEBUG librespot_connect::spirc] handling: 'endpoint: transfer' from 88b099dc509bf145c41e3caea880f6b582055c7b
[2025-09-03T13:16:12Z DEBUG librespot_connect::state::context] context didn't change, no reset
[2025-09-03T13:16:12Z WARN  librespot_connect::state::context] couldn't load context info because: context is not available. type: Default
[2025-09-03T13:16:12Z DEBUG librespot_connect::spirc] found initial track <spotify:track:0dEIca2nhcxDUV8C5QkPYb>
[2025-09-03T13:16:12Z ERROR librespot_connect::state::context] context didn't have any tracks: Context {
        uri: None,
        url: None,
        metadata: {},
        restrictions: MessageField(
            None,
        ),
        pages: [
            ContextPage {
                page_url: None,
                next_page_url: None,
                metadata: {},
                tracks: [],
                loading: None,
                special_fields: SpecialFields {
                    unknown_fields: UnknownFields {
                        fields: None,
                    },
                    cached_size: CachedSize {
                        size: 0,
                    },
                },
            },
        ],
        loading: None,
        special_fields: SpecialFields {
            unknown_fields: UnknownFields {
                fields: None,
            },
            cached_size: CachedSize {
                size: 0,
            },
        },
    }
[2025-09-03T13:16:12Z ERROR librespot_connect::spirc] failed to handle request: Invalid state { the provided context has no tracks }
[2025-09-03T13:16:12Z DEBUG librespot_core::dealer::manager] replying to ws request: Failure
[2025-09-03T13:16:15Z TRACE librespot_core::dealer] dealer request hm://connect-state/v1/player/command
[2025-09-03T13:16:15Z TRACE librespot_core::dealer::protocol] message was sent with gzip encoding 
[2025-09-03T13:16:15Z TRACE librespot_core::dealer::protocol] websocket request: Object {
        "command": Object {
            "data": String("ChwIABAAGAAqCQoFbWVkaWESACoJCgVtZWRpYRIAEpQFCIroz/mQMxAAGQAAAAAAAAAAIAEq/QQKABIgMjUwMTY3ZTFkMjkwNDBmNjhmOGYzYmY3MjkyZGUxNjcaEAc8whYmj0GfohNhRNILsN8iMwoKYXJ0aXN0X3VyaRIlc3BvdGlmeTphcnRpc3Q6NHRad2ZnckhPYzNtdnFZbEVZU3ZWaSIgCgV0aXRsZRIXR2l2ZSBMaWZlIEJhY2sgdG8gTXVzaWMiSQoPaW1hZ2VfbGFyZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMGIyNzM5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciKgogYWN0aW9ucy5za2lwcGluZ19wcmV2X3Bhc3RfdHJhY2sSBnJlc3VtZSJKChBpbWFnZV94bGFyZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMGIyNzM5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciQwoJaW1hZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMDFlMDI5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciMQoJYWxidW1fdXJpEiRzcG90aWZ5OmFsYnVtOjRtMjg4MGppdlNiYnlFR0FLZklUQ2EiSQoPaW1hZ2Vfc21hbGxfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMDQ4NTE5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciJQoLYWxidW1fdGl0bGUSFlJhbmRvbSBBY2Nlc3MgTWVtb3JpZXMiFQoMdHJhY2tfcGxheWVyEgVhdWRpbyIqCiBhY3Rpb25zLnNraXBwaW5nX25leHRfcGFzdF90cmFjaxIGcmVzdW1lGvgDCnoKCHBsYXlsaXN0Eit3ZWItcGxheWVyXzIwMjUtMDktMDJfMTc1NjgwNDM0NzU5M181ZTZhZTQyGgAiACoIZGVlcGxpbmsyKDg4YjA5OWRjNTA5YmYxNDVjNDFlM2NhZWE4ODBmNmI1ODIwNTVjN2I6B2Nvbm5lY3RCABK5AgoBLRIKY29udGV4dDovLxoZChBlbmhhbmNlZF9jb250ZXh0EgVmYWxzZRogChtwbGF5bGlzdF9udW1iZXJfb2ZfZXBpc29kZXMSATAaHwoZcGxheWxpc3RfbnVtYmVyX29mX3RyYWNrcxICMTMaGQoNY29udGV4dF9vd25lchIIcG9zdG1hbjIaEgoObG9hZGluZy5mYWlsZWQSABo2ChxwbGF5bGlzdF92b2xhdGlsZV9jb250ZXh0X2lkEhYyVVQ5VVdwcmdNb09WZldWSkU2bDRBGhUKDmxvYWRpbmcuc3RhdHVzEgM0MDQaDQoJaW1hZ2VfdXJsEgAaOQoTY29udGV4dF9kZXNjcmlwdGlvbhIiRGFmdCBQdW5rIC0gUmFuZG9tIEFjY2VzcyBNZW1vcmllcyIAMAEaIDI1MDE2N2UxZDI5MDQwZjY4ZjhmM2JmNzI5MmRlMTY3IgAqADIAShY2ZktTUG96RFhySktrRm9tb3NvYTdLIgIQADoCCgA="),
            "endpoint": String("transfer"),
            "from_device_identifier": String("88b099dc509bf145c41e3caea880f6b582055c7b"),
            "logging_params": Object {
                "command_id": String("d9d99a4a1afd47b08f9868a74c03bf7d"),
                "interaction_ids": Array [
                    String("dea54008-f5b3-4730-9c98-72470823cdba"),
                ],
            },
            "options": Object {
                "license": String("premium"),
                "restore_paused": String("restore"),
                "restore_position": String("extrapolate"),
                "restore_track": String("always_play_something"),
                "retain_session": String("do_not_retain"),
            },
        },
        "message_id": Number(263752711),
        "play_on_secondary_stream": Null,
        "sent_by_device_id": String("88b099dc509bf145c41e3caea880f6b582055c7b"),
        "target_alias_id": Null,
    }
[2025-09-03T13:16:15Z DEBUG librespot_connect::spirc] handling: 'endpoint: transfer' from 88b099dc509bf145c41e3caea880f6b582055c7b
[2025-09-03T13:16:15Z DEBUG librespot_connect::state::context] context didn't change, no reset
[2025-09-03T13:16:15Z WARN  librespot_connect::state::context] couldn't load context info because: context is not available. type: Default
[2025-09-03T13:16:15Z DEBUG librespot_connect::spirc] found initial track <spotify:track:0dEIca2nhcxDUV8C5QkPYb>
[2025-09-03T13:16:15Z ERROR librespot_connect::state::context] context didn't have any tracks: Context {
        uri: None,
        url: None,
        metadata: {},
        restrictions: MessageField(
            None,
        ),
        pages: [
            ContextPage {
                page_url: None,
                next_page_url: None,
                metadata: {},
                tracks: [],
                loading: None,
                special_fields: SpecialFields {
                    unknown_fields: UnknownFields {
                        fields: None,
                    },
                    cached_size: CachedSize {
                        size: 0,
                    },
                },
            },
        ],
        loading: None,
        special_fields: SpecialFields {
            unknown_fields: UnknownFields {
                fields: None,
            },
            cached_size: CachedSize {
                size: 0,
            },
        },
    }
[2025-09-03T13:16:15Z ERROR librespot_connect::spirc] failed to handle request: Invalid state { the provided context has no tracks }
[2025-09-03T13:16:15Z DEBUG librespot_core::dealer::manager] replying to ws request: Failure
[2025-09-03T13:16:42Z TRACE librespot_core::dealer] Sent ping
[2025-09-03T13:16:42Z TRACE librespot_core::dealer] Received pong

Host (what you are running librespot on):

  • OS: Linux
  • Platform: RPi 5
  • Linux raspberrypi 6.12.34+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64

Additional context

I am seeing the same error on a Mycroft Mark 2 running NeonOS which includes librespot

Originally created by @pjchamberlain on GitHub (Sep 3, 2025). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1566 ### Description librespot starts OK but when trying to connect to it from another device, the connection fails and librespot reports the error message: librespot[2292]: [2025-09-03T12:54:43Z ERROR librespot_connect::spirc] failed to handle request: Invalid state { the provided context has no tracks } ### Version librespot 0.6.0-dev ba3d501 (Built on 2025-08-11, Build ID: tEs7vh4i, Profile: release) ### How to reproduce Steps to reproduce the behavior in *librespot* 1. Launch `librespot` either from the the command line or automatically on boot, no errors at this point 2. Try to connect with Android Spotify app 3. The connection fails after a few seconds trying 4. Librespot on the Raspberry Pi reports the error above ### Log ``` $ librespot --verbose [2025-09-03T13:16:01Z INFO librespot] librespot 0.6.0-dev ba3d501 (Built on 2025-08-11, Build ID: tEs7vh4i, Profile: release) [2025-09-03T13:16:01Z TRACE librespot] Command line argument(s): [2025-09-03T13:16:01Z TRACE librespot] verbose [2025-09-03T13:16:01Z DEBUG librespot_core::session] new Session [2025-09-03T13:16:01Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:43833 [2025-09-03T13:16:01Z INFO librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0) [2025-09-03T13:16:01Z DEBUG librespot_playback::player] new Player [0] [2025-09-03T13:16:01Z INFO librespot_playback::convert] Converting with ditherer: tpdf [2025-09-03T13:16:01Z INFO librespot_playback::audio_backend::alsa] Using AlsaSink with format: S16 [2025-09-03T13:16:01Z DEBUG librespot_discovery] Pinged Avahi: Available [2025-09-03T13:16:01Z TRACE librespot_discovery] Connected to Avahi [2025-09-03T13:16:01Z DEBUG librespot_discovery] Commited zeroconf service with name librespot [2025-09-03T13:16:02Z INFO librespot_discovery] Published zeroconf service [2025-09-03T13:16:12Z DEBUG librespot_discovery::server] POST "/" {} [2025-09-03T13:16:12Z DEBUG librespot_core::session] Shutdown: Invalidating session [2025-09-03T13:16:12Z DEBUG librespot::component] new MercuryManager [2025-09-03T13:16:12Z DEBUG librespot::component] new ChannelManager [2025-09-03T13:16:12Z DEBUG librespot_core::session] new Session [2025-09-03T13:16:12Z DEBUG librespot_connect::spirc] new Spirc[0] [2025-09-03T13:16:12Z DEBUG librespot_playback::player] command=SetSession [2025-09-03T13:16:12Z DEBUG librespot::component] new DealerManager [2025-09-03T13:16:12Z DEBUG librespot_core::session] drop Session [2025-09-03T13:16:12Z DEBUG librespot::component] drop ChannelManager [2025-09-03T13:16:12Z DEBUG librespot::component] drop MercuryManager [2025-09-03T13:16:12Z DEBUG librespot::component] new SpClient [2025-09-03T13:16:12Z DEBUG librespot_core::spclient] Client token unavailable or expired, requesting new token. [2025-09-03T13:16:12Z DEBUG librespot_core::http_client] Requesting https://clienttoken.spotify.com/v1/clienttoken [2025-09-03T13:16:12Z DEBUG librespot_core::spclient] Received a granted token [2025-09-03T13:16:12Z TRACE librespot_core::spclient] Got client token: GrantedTokenResponse { token: "AAAq6BJT63ObpDdHMJ6QwaWPCCSHM9tXZutfRWIalNU71ArtrHZ3yVSZQqBBt402Rl3pwy0kpGScNqfiFHx/VHOXhcTeX4FdAnw2kfh76v1s6fVKIE973gXt+e/dZ/erlu2Qc6DghYB0Snpavck0yPm9HX8gKA1BsYR7VqKcVtu7FqcVHciecXHS1w77qQ4Cu1p2XIvvBbfHOihjpKg02UzABPhup1NOeTWhKpvuw/lG2bpavGtnste/abWLEuSMEjZotE+ylKOjF+xDlM6mHKJ0iR/AcHlxfbPEyRld2A==", expires_after_seconds: 1216800, refresh_after_seconds: 1209600, domains: [TokenDomain { domain: "spotify.com", special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } }, TokenDomain { domain: "spotify.net", special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } }], special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None }, cached_size: CachedSize { size: 0 } } } [2025-09-03T13:16:12Z DEBUG librespot::component] new ApResolver [2025-09-03T13:16:12Z DEBUG librespot_core::http_client] Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient [2025-09-03T13:16:12Z INFO librespot_core::session] Connecting to AP "ap-gew1.spotify.com:4070" [2025-09-03T13:16:12Z DEBUG librespot_core::connection] Connection to AP established. [2025-09-03T13:16:12Z DEBUG librespot_core::connection] Authenticating with AP using AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS [2025-09-03T13:16:12Z INFO librespot_core::session] Authenticated as 'postman2' ! [2025-09-03T13:16:12Z DEBUG librespot::component] new Login5Manager [2025-09-03T13:16:12Z DEBUG librespot_core::http_client] Requesting https://login5.spotify.com/v3/login [2025-09-03T13:16:12Z TRACE librespot_core::session] Received Ping [2025-09-03T13:16:12Z TRACE librespot_core::session] keep-alive state: PendingPong, timeout in 60.0 [2025-09-03T13:16:12Z DEBUG librespot_core::session] Session strong=5 weak=6 [2025-09-03T13:16:12Z INFO librespot_core::session] Country: "GB" [2025-09-03T13:16:12Z TRACE librespot_core::session] Received product info: { "image-url": "https://i.scdn.co/image/{file_id}", "public-toplist": "7", "name": "Spotify Premium", "ad-session-persistence": "1", "explicit-content": "1", "key-caching-max-count": "10000", "prefetch-keys": "1", "active-session-days": "16", "mobile": "1", "audiobook-onboarding-completed": "0", "user-profile-show-invitation-codes": "0", "prefetch-strategy": "18", "unrestricted": "1", "video-keyframe-url": "http://keyframes-fa.cdn.spotify.com/keyframes/v1/sources/{source_id}/keyframe/heights/{height}/timestamps/{timestamp_ms}.jpg", "ab-ad-player-targeting": "1", "audio-preview-url-template": "https://p.scdn.co/mp3-preview/{id}", "shuffle": "0", "payments-locked-state": "0", "nft-disabled": "1", "app-developer": "0", "employee-free-opt-in": "0", "streaming": "1", "metadata-link-lookup-modes": "0", "player-license-v2": "premium", "collection": "1", "payments-initial-campaign": "default", "publish-playlist": "1", "preferred-locale": "en", "ad-formats-preroll-video": "0", "head-file-caching": "1", "capping-bar-threshold": "3601", "is_email_verified": "1", "head-files-url": "http://heads-fa.spotify.com/head/{file_id}", "arsenal_country": "1", "widevine-license-url": "https://spclient.wg.spotify.com/widevine-license/v1/video/license", "music-videos": "1", "shows-collection": "0", "network-operator-premium-activation": "1", "incognito_mode_timeout": "21600", "ugc-abuse-report-url": "https://support.spotify.com/abuse/?uri={uri}", "sidebar-navigation-enabled": "0", "shows-collection-jam": "0", "video-manifest-url": "https://spclient.wg.spotify.com/manifests/v6/{type}/sources/{source_id}", "video-device-blacklisted": "0", "on-demand-trial-in-progress": "0", "libspotify": "1", "playlist-annotations-markup": "0", "financial-product": "pr:premium,tc:0,rt:v2_GB_default_individual-basic-1m-1m_10.99_GBP_default", "prefetch-window-max": "2", "send-email": "1", "enable-annotations-read": "0", "storage-size-config": "10240,90,500,3", "key-caching-max-offline-seconds": "1800", "restrict-playlist-collaboration": "0", "player-license": "premium", "ab-watch-now": "0", "publish-activity": "0", "ugc-abuse-report": "0", "catalogue": "premium", "ads": "0", "browse-overview-enabled": "1", "type": "premium", "on-demand": "1", "remote-control": "0", "license-acceptance-grace-days": "30", "ab_recently_played_feature_time_filter_threshold": "com.spotify.gaia=30,driving-mode=120,spotify%3Ainternal%3Astartpage=30", "high-bitrate": "1", "offline": "1", "enable-crossfade": "1", "filter-explicit-content": "0", "video-cdn-sampling": "100", "radio": "1", "mobile-payment": "0", "head-files": "1", } [2025-09-03T13:16:12Z DEBUG librespot::component] new MercuryManager [2025-09-03T13:16:12Z TRACE librespot_core::mercury] mercury response <hm://pusher/v1/connections/N2MyOGFiOGE1Yzk1MTJlNDI2NmFjN2NiNzU2MzEyYzgyZWU0M2Q3ZStBUCt0Y3A6Ly8wYWNhNDA2Ni5pcC5nZXcxLnNwb3RpZnkubmV0OjUwMTMrMTRFRTcxMDczOEJBOUVCQjgxRDZEOEZCNjUyNjkzNzdENjFEMUM4M0UwQUMzNkEyNjNCOTgzNDQ4OUNEMTk0Nw%3D%3D> is handled by dealer [2025-09-03T13:16:12Z TRACE librespot_core::login5] Got auth token: Token { access_token: "BQBMozJZEUXvEXPnVoPPMKpq1XuseKdTCsEjDCpxPC5nIPHOkEp8K6qwZ_TyqFgLtajFhnN4lIb-5Ph2Yt-KWBn87k76YNoC3tIhM19GDKc73o3Pg7funkpTZ8XkL95oWsp8scZWc9mIjTN-ef15aMFVMlaW23Qerur48IM4HK_851t77HepFVVLpQ2UmLL2FYxwrZ9z8Jj1bi6bpvLSEfp81bPkMNg2tpfl8gPhYZUkShSgg0GNPOxDeLfsaONKJ0SsEmWz8ZUVkxvFRqI5dzv8fb3zOd0jT1Kc4QAnrrcsC4xtvYpAMx4k2PvQKLjX_dwqMDPIt22ERkk5ai_FC9XgFZBi1vbTzRfYnMb2LLNa1_lVGoT9L0Icx1ppuWjeCfD_c09SX_k", expires_in: 3600s, token_type: "Bearer", scopes: [], timestamp: Instant { tv_sec: 15154, tv_nsec: 454289944 } } [2025-09-03T13:16:12Z DEBUG librespot_connect::spirc] SpircTask::set_volume(0) [2025-09-03T13:16:12Z DEBUG librespot_playback::player] command=AddEventSender [2025-09-03T13:16:12Z DEBUG librespot_core::dealer::manager] Launching dealer [2025-09-03T13:16:12Z TRACE librespot_core::dealer] Sent ping [2025-09-03T13:16:12Z TRACE librespot_connect::spirc] Received connection ID update: "YjU1MmQ1YjMtNGM2My00OTcxLWE2ZDYtMTVmOGIwZDM5Y2RhK2RlYWxlcit0Y3A6Ly8wYWNhNDE3Mi5pcC5nZXcxLnNwb3RpZnkubmV0OjU3MDArODc4MUNGRDExOEY5OThCNzMwMjc0Mzc3OTc3MzA4MjNFRUY0NTI0QTUyRDkwQzNENTk5NzAyNzZBMTRCOUY1Rg==" [2025-09-03T13:16:12Z INFO librespot_core::spclient] Resolved "gew1-spclient.spotify.com:443" as spclient access point [2025-09-03T13:16:12Z DEBUG librespot_core::http_client] Requesting https://gew1-spclient.spotify.com:443/connect-state/v1/devices/7c28ab8a5c9512e4266ac7cb756312c82ee43d7e?product=0&country=GB&salt=2829884176 [2025-09-03T13:16:12Z TRACE librespot_core::dealer] Received pong [2025-09-03T13:16:12Z DEBUG librespot_connect::spirc] successfully put connect state for 7c28ab8a5c9512e4266ac7cb756312c82ee43d7e with connection-id YjU1MmQ1YjMtNGM2My00OTcxLWE2ZDYtMTVmOGIwZDM5Y2RhK2RlYWxlcit0Y3A6Ly8wYWNhNDE3Mi5pcC5nZXcxLnNwb3RpZnkubmV0OjU3MDArODc4MUNGRDExOEY5OThCNzMwMjc0Mzc3OTc3MzA4MjNFRUY0NTI0QTUyRDkwQzNENTk5NzAyNzZBMTRCOUY1Rg== [2025-09-03T13:16:12Z INFO librespot_connect::spirc] active device is <> with session <1PiJmgME1g2Tbnj7rOaCdt> [2025-09-03T13:16:12Z TRACE librespot_core::dealer] dealer request hm://connect-state/v1/player/command [2025-09-03T13:16:12Z TRACE librespot_core::dealer::protocol] message was sent with gzip encoding [2025-09-03T13:16:12Z TRACE librespot_core::dealer::protocol] websocket request: Object { "command": Object { "data": String("ChwIABAAGAAqCQoFbWVkaWESACoJCgVtZWRpYRIAEpQFCIroz/mQMxAAGQAAAAAAAAAAIAEq/QQKABIgMjUwMTY3ZTFkMjkwNDBmNjhmOGYzYmY3MjkyZGUxNjcaEAc8whYmj0GfohNhRNILsN8iMwoKYXJ0aXN0X3VyaRIlc3BvdGlmeTphcnRpc3Q6NHRad2ZnckhPYzNtdnFZbEVZU3ZWaSIgCgV0aXRsZRIXR2l2ZSBMaWZlIEJhY2sgdG8gTXVzaWMiSQoPaW1hZ2VfbGFyZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMGIyNzM5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciKgogYWN0aW9ucy5za2lwcGluZ19wcmV2X3Bhc3RfdHJhY2sSBnJlc3VtZSJKChBpbWFnZV94bGFyZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMGIyNzM5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciQwoJaW1hZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMDFlMDI5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciMQoJYWxidW1fdXJpEiRzcG90aWZ5OmFsYnVtOjRtMjg4MGppdlNiYnlFR0FLZklUQ2EiSQoPaW1hZ2Vfc21hbGxfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMDQ4NTE5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciJQoLYWxidW1fdGl0bGUSFlJhbmRvbSBBY2Nlc3MgTWVtb3JpZXMiFQoMdHJhY2tfcGxheWVyEgVhdWRpbyIqCiBhY3Rpb25zLnNraXBwaW5nX25leHRfcGFzdF90cmFjaxIGcmVzdW1lGvgDCnoKCHBsYXlsaXN0Eit3ZWItcGxheWVyXzIwMjUtMDktMDJfMTc1NjgwNDM0NzU5M181ZTZhZTQyGgAiACoIZGVlcGxpbmsyKDg4YjA5OWRjNTA5YmYxNDVjNDFlM2NhZWE4ODBmNmI1ODIwNTVjN2I6B2Nvbm5lY3RCABK5AgoBLRIKY29udGV4dDovLxoZChBlbmhhbmNlZF9jb250ZXh0EgVmYWxzZRogChtwbGF5bGlzdF9udW1iZXJfb2ZfZXBpc29kZXMSATAaHwoZcGxheWxpc3RfbnVtYmVyX29mX3RyYWNrcxICMTMaGQoNY29udGV4dF9vd25lchIIcG9zdG1hbjIaEgoObG9hZGluZy5mYWlsZWQSABo2ChxwbGF5bGlzdF92b2xhdGlsZV9jb250ZXh0X2lkEhYyVVQ5VVdwcmdNb09WZldWSkU2bDRBGhUKDmxvYWRpbmcuc3RhdHVzEgM0MDQaDQoJaW1hZ2VfdXJsEgAaOQoTY29udGV4dF9kZXNjcmlwdGlvbhIiRGFmdCBQdW5rIC0gUmFuZG9tIEFjY2VzcyBNZW1vcmllcyIAMAEaIDI1MDE2N2UxZDI5MDQwZjY4ZjhmM2JmNzI5MmRlMTY3IgAqADIAShY2ZktTUG96RFhySktrRm9tb3NvYTdLIgIQADoCCgA="), "endpoint": String("transfer"), "from_device_identifier": String("88b099dc509bf145c41e3caea880f6b582055c7b"), "logging_params": Object { "command_id": String("d9d99a4a1afd47b08f9868a74c03bf7d"), "interaction_ids": Array [ String("dea54008-f5b3-4730-9c98-72470823cdba"), ], }, "options": Object { "license": String("premium"), "restore_paused": String("restore"), "restore_position": String("extrapolate"), "restore_track": String("always_play_something"), "retain_session": String("do_not_retain"), }, }, "message_id": Number(263749628), "play_on_secondary_stream": Null, "sent_by_device_id": String("88b099dc509bf145c41e3caea880f6b582055c7b"), "target_alias_id": Null, } [2025-09-03T13:16:12Z DEBUG librespot_connect::spirc] handling: 'endpoint: transfer' from 88b099dc509bf145c41e3caea880f6b582055c7b [2025-09-03T13:16:12Z DEBUG librespot_connect::state::context] context didn't change, no reset [2025-09-03T13:16:12Z WARN librespot_connect::state::context] couldn't load context info because: context is not available. type: Default [2025-09-03T13:16:12Z DEBUG librespot_connect::spirc] found initial track <spotify:track:0dEIca2nhcxDUV8C5QkPYb> [2025-09-03T13:16:12Z ERROR librespot_connect::state::context] context didn't have any tracks: Context { uri: None, url: None, metadata: {}, restrictions: MessageField( None, ), pages: [ ContextPage { page_url: None, next_page_url: None, metadata: {}, tracks: [], loading: None, special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None, }, cached_size: CachedSize { size: 0, }, }, }, ], loading: None, special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None, }, cached_size: CachedSize { size: 0, }, }, } [2025-09-03T13:16:12Z ERROR librespot_connect::spirc] failed to handle request: Invalid state { the provided context has no tracks } [2025-09-03T13:16:12Z DEBUG librespot_core::dealer::manager] replying to ws request: Failure [2025-09-03T13:16:15Z TRACE librespot_core::dealer] dealer request hm://connect-state/v1/player/command [2025-09-03T13:16:15Z TRACE librespot_core::dealer::protocol] message was sent with gzip encoding [2025-09-03T13:16:15Z TRACE librespot_core::dealer::protocol] websocket request: Object { "command": Object { "data": String("ChwIABAAGAAqCQoFbWVkaWESACoJCgVtZWRpYRIAEpQFCIroz/mQMxAAGQAAAAAAAAAAIAEq/QQKABIgMjUwMTY3ZTFkMjkwNDBmNjhmOGYzYmY3MjkyZGUxNjcaEAc8whYmj0GfohNhRNILsN8iMwoKYXJ0aXN0X3VyaRIlc3BvdGlmeTphcnRpc3Q6NHRad2ZnckhPYzNtdnFZbEVZU3ZWaSIgCgV0aXRsZRIXR2l2ZSBMaWZlIEJhY2sgdG8gTXVzaWMiSQoPaW1hZ2VfbGFyZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMGIyNzM5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciKgogYWN0aW9ucy5za2lwcGluZ19wcmV2X3Bhc3RfdHJhY2sSBnJlc3VtZSJKChBpbWFnZV94bGFyZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMGIyNzM5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciQwoJaW1hZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMDFlMDI5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciMQoJYWxidW1fdXJpEiRzcG90aWZ5OmFsYnVtOjRtMjg4MGppdlNiYnlFR0FLZklUQ2EiSQoPaW1hZ2Vfc21hbGxfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMDQ4NTE5YjliMzZiMGUyMjg3MGI5ZjU0MmQ5MzciJQoLYWxidW1fdGl0bGUSFlJhbmRvbSBBY2Nlc3MgTWVtb3JpZXMiFQoMdHJhY2tfcGxheWVyEgVhdWRpbyIqCiBhY3Rpb25zLnNraXBwaW5nX25leHRfcGFzdF90cmFjaxIGcmVzdW1lGvgDCnoKCHBsYXlsaXN0Eit3ZWItcGxheWVyXzIwMjUtMDktMDJfMTc1NjgwNDM0NzU5M181ZTZhZTQyGgAiACoIZGVlcGxpbmsyKDg4YjA5OWRjNTA5YmYxNDVjNDFlM2NhZWE4ODBmNmI1ODIwNTVjN2I6B2Nvbm5lY3RCABK5AgoBLRIKY29udGV4dDovLxoZChBlbmhhbmNlZF9jb250ZXh0EgVmYWxzZRogChtwbGF5bGlzdF9udW1iZXJfb2ZfZXBpc29kZXMSATAaHwoZcGxheWxpc3RfbnVtYmVyX29mX3RyYWNrcxICMTMaGQoNY29udGV4dF9vd25lchIIcG9zdG1hbjIaEgoObG9hZGluZy5mYWlsZWQSABo2ChxwbGF5bGlzdF92b2xhdGlsZV9jb250ZXh0X2lkEhYyVVQ5VVdwcmdNb09WZldWSkU2bDRBGhUKDmxvYWRpbmcuc3RhdHVzEgM0MDQaDQoJaW1hZ2VfdXJsEgAaOQoTY29udGV4dF9kZXNjcmlwdGlvbhIiRGFmdCBQdW5rIC0gUmFuZG9tIEFjY2VzcyBNZW1vcmllcyIAMAEaIDI1MDE2N2UxZDI5MDQwZjY4ZjhmM2JmNzI5MmRlMTY3IgAqADIAShY2ZktTUG96RFhySktrRm9tb3NvYTdLIgIQADoCCgA="), "endpoint": String("transfer"), "from_device_identifier": String("88b099dc509bf145c41e3caea880f6b582055c7b"), "logging_params": Object { "command_id": String("d9d99a4a1afd47b08f9868a74c03bf7d"), "interaction_ids": Array [ String("dea54008-f5b3-4730-9c98-72470823cdba"), ], }, "options": Object { "license": String("premium"), "restore_paused": String("restore"), "restore_position": String("extrapolate"), "restore_track": String("always_play_something"), "retain_session": String("do_not_retain"), }, }, "message_id": Number(263752711), "play_on_secondary_stream": Null, "sent_by_device_id": String("88b099dc509bf145c41e3caea880f6b582055c7b"), "target_alias_id": Null, } [2025-09-03T13:16:15Z DEBUG librespot_connect::spirc] handling: 'endpoint: transfer' from 88b099dc509bf145c41e3caea880f6b582055c7b [2025-09-03T13:16:15Z DEBUG librespot_connect::state::context] context didn't change, no reset [2025-09-03T13:16:15Z WARN librespot_connect::state::context] couldn't load context info because: context is not available. type: Default [2025-09-03T13:16:15Z DEBUG librespot_connect::spirc] found initial track <spotify:track:0dEIca2nhcxDUV8C5QkPYb> [2025-09-03T13:16:15Z ERROR librespot_connect::state::context] context didn't have any tracks: Context { uri: None, url: None, metadata: {}, restrictions: MessageField( None, ), pages: [ ContextPage { page_url: None, next_page_url: None, metadata: {}, tracks: [], loading: None, special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None, }, cached_size: CachedSize { size: 0, }, }, }, ], loading: None, special_fields: SpecialFields { unknown_fields: UnknownFields { fields: None, }, cached_size: CachedSize { size: 0, }, }, } [2025-09-03T13:16:15Z ERROR librespot_connect::spirc] failed to handle request: Invalid state { the provided context has no tracks } [2025-09-03T13:16:15Z DEBUG librespot_core::dealer::manager] replying to ws request: Failure [2025-09-03T13:16:42Z TRACE librespot_core::dealer] Sent ping [2025-09-03T13:16:42Z TRACE librespot_core::dealer] Received pong ``` ### Host (what you are running `librespot` on): - OS: Linux - Platform: RPi 5 - Linux raspberrypi 6.12.34+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 ### Additional context I am seeing the same error on a Mycroft Mark 2 running NeonOS which includes librespot
kerem 2026-02-27 19:32:05 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@kingosticks commented on GitHub (Sep 3, 2025):

Can you reproduce on the latest version i.e. v0.7.1?

<!-- gh-comment-id:3249332580 --> @kingosticks commented on GitHub (Sep 3, 2025): Can you reproduce on the [latest version](https://github.com/librespot-org/librespot/releases/latest) i.e. v0.7.1?
Author
Owner

@pjchamberlain commented on GitHub (Sep 3, 2025):

Thanks for the reply.

I'm finding this a bit of a rabbit hole of trying to get v0.7.1 built and working on my RPi 5.

<!-- gh-comment-id:3249913997 --> @pjchamberlain commented on GitHub (Sep 3, 2025): Thanks for the reply. I'm finding this a bit of a rabbit hole of trying to get v0.7.1 built and working on my RPi 5.
Author
Owner

@pjchamberlain commented on GitHub (Sep 3, 2025):

Thanks for the reply.

I'm finding this a bit of a rabbit hole of trying to get v0.7.1 built and working on my RPi 5.

UPDATED - same issue with the latest version v0.7.1

<!-- gh-comment-id:3250426671 --> @pjchamberlain commented on GitHub (Sep 3, 2025): > Thanks for the reply. > > I'm finding this a bit of a rabbit hole of trying to get v0.7.1 built and working on my RPi 5. UPDATED - same issue with the latest version v0.7.1
Author
Owner

@photovoltex commented on GitHub (Sep 4, 2025):

Can you workaround that state by playing something first and switching to librespot afterwards?

<!-- gh-comment-id:3253794647 --> @photovoltex commented on GitHub (Sep 4, 2025): Can you workaround that state by playing something first and switching to librespot afterwards?
Author
Owner

@pjchamberlain commented on GitHub (Sep 4, 2025):

No, that's what I'm doing - playing something in my Android app or desktop Spotify and then trying to connect to my RPi 5 and if I look at the latest log I see the error
Sep 04 16:12:34 raspberrypi librespot[912]: [2025-09-04T15:12:34Z ERROR librespot_connect::spirc] failed to handle request: Invalid state { the provided context has no tracks }
it's followed by a read out of a message that is empty (as in above log)

<!-- gh-comment-id:3254206804 --> @pjchamberlain commented on GitHub (Sep 4, 2025): No, that's what I'm doing - playing something in my Android app or desktop Spotify and then trying to connect to my RPi 5 and if I look at the latest log I see the error `Sep 04 16:12:34 raspberrypi librespot[912]: [2025-09-04T15:12:34Z ERROR librespot_connect::spirc] failed to handle request: Invalid state { the provided context has no tracks } ` it's followed by a read out of a message that is empty (as in above log)
Author
Owner

@photovoltex commented on GitHub (Sep 4, 2025):

Oh, interesting but that's already a good clue we can follow. I will try to reproduce it with that information.

<!-- gh-comment-id:3254635792 --> @photovoltex commented on GitHub (Sep 4, 2025): Oh, interesting but that's already a good clue we can follow. I will try to reproduce it with that information.
Author
Owner

@photovoltex commented on GitHub (Sep 4, 2025):

Hmm, that seems to just work with a playlist and a single album. Could you give use more information on what your context on the android phone is when you try to transfer to librespot? By context I mean something like "playlist", "liked songs", "autoplay", "recommendation" or something similar.

<!-- gh-comment-id:3254653567 --> @photovoltex commented on GitHub (Sep 4, 2025): Hmm, that seems to just work with a playlist and a single album. Could you give use more information on what your context on the android phone is when you try to transfer to librespot? By context I mean something like "playlist", "liked songs", "autoplay", "recommendation" or something similar.
Author
Owner

@pjchamberlain commented on GitHub (Sep 5, 2025):

There's been a slight change - the raspotify logs look the same but what I see in the Android app now is "connecting" but it never connects and reverts to the current device. (Previously it was showing connected but trying to play anything resulted in the play button going back to pause/stop after a second or so.)

The context is a playlist.

My Mycroft MK2 with an RPi 4 is behaving the same.

I can connect successfully to and play music on a Chromecast and a WiiM on my same network.

I'm sure it's a coincidence but I had an email last night from Spotify about updated terms of service.

<!-- gh-comment-id:3257305662 --> @pjchamberlain commented on GitHub (Sep 5, 2025): There's been a slight change - the raspotify logs look the same but what I see in the Android app now is "connecting" but it never connects and reverts to the current device. (Previously it was showing connected but trying to play anything resulted in the play button going back to pause/stop after a second or so.) The context is a playlist. My Mycroft MK2 with an RPi 4 is behaving the same. I can connect successfully to and play music on a Chromecast and a WiiM on my same network. I'm sure it's a coincidence but I had an email last night from Spotify about updated terms of service.
Author
Owner

@Krutsch commented on GitHub (Sep 5, 2025):

Ohh had this issue yesterday too and thought I was messing up with my CamillaDSP setting too much. Also Pi5 and a playlist

<!-- gh-comment-id:3257879359 --> @Krutsch commented on GitHub (Sep 5, 2025): Ohh had this issue yesterday too and thought I was messing up with my CamillaDSP setting too much. Also Pi5 and a playlist
Author
Owner

@pjchamberlain commented on GitHub (Sep 6, 2025):

I tried with a podcast to see if it made any difference - looks like the same issue

Sep 06 02:44:41 neon librespot[3717]: [2025-09-06T09:44:41Z WARN  librespot_connect::state::context] couldn't load context info because: context is not available. type: Default
Sep 06 02:45:15 neon librespot[3717]: [2025-09-06T09:45:15Z WARN  librespot_connect::state::context] couldn't load context info because: context is not available. type: Default
Sep 06 02:45:15 neon librespot[3717]: [2025-09-06T09:45:15Z WARN  librespot_connect::spirc] failed filling up next_track during stopping: Invalid state { context is not available. type: Def>
lines 886-933/933 (END)
<!-- gh-comment-id:3261718160 --> @pjchamberlain commented on GitHub (Sep 6, 2025): I tried with a podcast to see if it made any difference - looks like the same issue ``` Sep 06 02:44:41 neon librespot[3717]: [2025-09-06T09:44:41Z WARN librespot_connect::state::context] couldn't load context info because: context is not available. type: Default Sep 06 02:45:15 neon librespot[3717]: [2025-09-06T09:45:15Z WARN librespot_connect::state::context] couldn't load context info because: context is not available. type: Default Sep 06 02:45:15 neon librespot[3717]: [2025-09-06T09:45:15Z WARN librespot_connect::spirc] failed filling up next_track during stopping: Invalid state { context is not available. type: Def> lines 886-933/933 (END) ```
Author
Owner

@photovoltex commented on GitHub (Sep 7, 2025):

So @pjchamberlain you have this issue constantly and can't use librespot at all because of that, right? And @Krutsch you only had it for a short period or does it still persist?

<!-- gh-comment-id:3264012898 --> @photovoltex commented on GitHub (Sep 7, 2025): So @pjchamberlain you have this issue constantly and can't use librespot at all because of that, right? And @Krutsch you only had it for a short period or does it still persist?
Author
Owner

@pjchamberlain commented on GitHub (Sep 8, 2025):

So @pjchamberlain you have this issue constantly and can't use librespot at all because of that, right? And @Krutsch you only had it for a short period or does it still persist?

That's right. The Pi5 appears in the list of available devices to connect to, but connecting fails after a few seconds and the logs show the same issue - empty context followed by some variation depending on what was playing.

(I see the same issue on my Pi4 inside a Mycroft 2 running NeonAI. Spotify web player works fine on the Pi5, so that's my workaround)

<!-- gh-comment-id:3264874980 --> @pjchamberlain commented on GitHub (Sep 8, 2025): > So [@pjchamberlain](https://github.com/pjchamberlain) you have this issue constantly and can't use librespot at all because of that, right? And [@Krutsch](https://github.com/Krutsch) you only had it for a short period or does it still persist? That's right. The Pi5 appears in the list of available devices to connect to, but connecting fails after a few seconds and the logs show the same issue - empty context followed by some variation depending on what was playing. (I see the same issue on my Pi4 inside a Mycroft 2 running NeonAI. Spotify web player works fine on the Pi5, so that's my workaround)
Author
Owner

@bai-yi-bai commented on GitHub (Sep 8, 2025):

I am now also receiving this message, but I have additional debug information which might help.
I am using snapcast to stream to multiple devices and was using the librespot 6.1 dev branch.

However, I noticed the day before yesterday that tracks were only playing until about 50% of the way through, with a (AsioStream) No data since 130 ms, switching to idle before advancing to the next track. It would error out with a Symphonia Decoder Error. I built from 7.1 to see if that would help, but now no audio comes through at all.

h3. Sep 07 - Behavior: Playback stops at ~50%, skips to the next track

Sep 07 04:34:36 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <Kumbaya - Austin Millz Remix> 
Sep 07 04:35:04 snapcastserver snapserver[612241]: (librespot_audio::fetch) Error caching file af957fe38ebfebe189235c214176a0ef1e0db664 to "/var/lib/snapserver/files/af/957fe38ebfebe189235c214176a0ef1e0db664": Invalid state { audio cache location is not configured } 
Sep 07 04:37:42 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <Phonky Tribu - FUNK TRIBU SPECIAL MIX> with Spotify URI <spotify:track:6p2sh70Zowkw47cG0TkXg0> 
Sep 07 04:37:58 snapcastserver snapserver[612241]: (librespot_playback::player) Unable to get normalisation data, continuing with defaults. 
Sep 07 04:37:58 snapcastserver snapserver[612241]: (librespot_playback::player) Unable to read audio file: Symphonia Decoder Error: Deadline expired before operation could complete { wait timeout exceeded } 
Sep 07 04:37:58 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <Grounded> with Spotify URI <spotify:track:7tyEwLPZEU0EgWQlOVtQIC> 
Sep 07 04:38:12 snapcastserver snapserver[612241]: (AsioStream) No data since 130 ms, switching to idle 
Sep 07 04:38:12 snapcastserver snapserver[612241]: (PcmStream) State changed: Spotify, state: playing => idle 
Sep 07 04:38:12 snapcastserver snapserver[612241]: (Server) onStateChanged (Spotify): idle 
Sep 07 04:38:14 snapcastserver snapserver[612241]: (librespot_playback::player) Unable to get normalisation data, continuing with defaults. 
Sep 07 04:38:14 snapcastserver snapserver[612241]: (librespot_playback::player) Unable to read audio file: Symphonia Decoder Error: Deadline expired before operation could complete { wait timeout exceeded } 
Sep 07 04:38:14 snapcastserver snapserver[612241]: (librespot_playback::player) Skipping to next track, unable to load track <SpotifyId("spotify:track:7tyEwLPZEU0EgWQlOVtQIC")>: () 
Sep 07 04:38:14 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <OK> with Spotify URI <spotify:track:442lxJfyUbsOWAYFBxNDdL> 
Sep 07 04:38:14 snapcastserver snapserver[612241]: (librespot_playback::player) <OK> (143326 ms) loaded 
Sep 07 04:38:14 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <OK> 
Sep 07 04:38:14 snapcastserver snapserver[612241]: (PcmStream) State changed: Spotify, state: idle => playing 
Sep 07 04:38:14 snapcastserver snapserver[612241]: (Server) onStateChanged (Spotify): playing 
Sep 07 04:38:18 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <Don't Look Back> with Spotify URI <spotify:track:30syAydJTLa18aDRPIwS4k> 
Sep 07 04:38:18 snapcastserver snapserver[612241]: (librespot_playback::player) <Don't Look Back> (184827 ms) loaded 
Sep 07 04:38:18 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <Don't Look Back> 
Sep 07 04:38:21 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <INSONAMIA> with Spotify URI <spotify:track:5jRR9de75gD6zCzoRZkyKB> 
Sep 07 04:38:21 snapcastserver snapserver[612241]: (librespot_playback::player) <INSONAMIA> (181254 ms) loaded 
Sep 07 04:38:21 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <INSONAMIA> 
Sep 07 04:39:55 snapcastserver snapserver[612241]: (AsioStream) No data since 130 ms, switching to idle 
Sep 07 04:39:55 snapcastserver snapserver[612241]: (PcmStream) State changed: Spotify, state: playing => idle 
Sep 07 04:39:55 snapcastserver snapserver[612241]: (Server) onStateChanged (Spotify): idle 
Sep 07 04:40:03 snapcastserver snapserver[612241]: (librespot_playback::player) Skipping to next track, unable to get next packet for track <SpotifyId("spotify:track:5jRR9de75gD6zCzoRZkyKB")>: SymphoniaDecoder("Deadline expired before operation could complete { wait timeout exceeded }") 
Sep 07 04:40:11 snapcastserver snapserver[612241]: (librespot_playback::player) Skipping to next track, unable to get next packet for track <SpotifyId("spotify:track:5jRR9de75gD6zCzoRZkyKB")>: SymphoniaDecoder("Deadline expired before operation could complete { wait timeout exceeded }") 
Sep 07 04:40:11 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <GO!> with Spotify URI <spotify:track:6mwrQ7UyriEE3P2DVUZzke> 
Sep 07 04:40:11 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <ALICE.> with Spotify URI <spotify:track:2dVmZ5FPuBsZY8XwK7CRSc> 
Sep 07 04:40:11 snapcastserver snapserver[612241]: (librespot_playback::player) <GO!> (141517 ms) loaded 
Sep 07 04:40:11 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <GO!> 
Sep 07 04:40:11 snapcastserver snapserver[612241]: (PcmStream) State changed: Spotify, state: idle => playing 
Sep 07 04:40:11 snapcastserver snapserver[612241]: (Server) onStateChanged (Spotify): playing 
Sep 07 04:40:11 snapcastserver snapserver[612241]: (Server) onResync (Spotify): 15700.7 ms 
Sep 07 04:40:11 snapcastserver snapserver[612241]: (ControlSessionWS) Wrote 1784 bytes to web socket 
Sep 07 04:40:11 snapcastserver snapserver[612241]: (librespot_playback::player) <ALICE.> (179366 ms) loaded 
Sep 07 04:40:11 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <ALICE.> 
Sep 07 04:42:02 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <Sea Gets Hotter> with Spotify URI <spotify:track:5ZK62nSchTamBy8F6HIZov> 
Sep 07 04:42:02 snapcastserver snapserver[612241]: (librespot_playback::player) <Sea Gets Hotter> (197226 ms) loaded 
Sep 07 04:42:02 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <Sea Gets Hotter> 
Sep 07 04:44:12 snapcastserver snapserver[612241]: (AsioStream) No data since 130 ms, switching to idle 
Sep 07 04:44:12 snapcastserver snapserver[612241]: (PcmStream) State changed: Spotify, state: playing => idle 
Sep 07 04:44:12 snapcastserver snapserver[612241]: (Server) onStateChanged (Spotify): idle 
Sep 07 04:44:19 snapcastserver snapserver[612241]: (librespot_playback::player) Skipping to next track, unable to get next packet for track <SpotifyId("spotify:track:5ZK62nSchTamBy8F6HIZov")>: SymphoniaDecoder("Deadline expired before operation could complete { wait timeout exceeded }") 

Sep 08 - No playback at all

Sep 08 07:52:39 snapcastserver snapserver[618226]: (librespot_playback::player) Skipping to next track, unable to load track <SpotifyId("spotify:track:5lT73kFy624ns90M1foaSc")>: ()
Sep 08 07:52:39 snapcastserver snapserver[618226]: (librespot_playback::player) Loading <City of Sound - Analog Sessions> with Spotify URI <spotify:track:4OskHm2Le50GskM8lQDVhz>
Sep 08 07:52:55 snapcastserver snapserver[618226]: (librespot_playback::player) Unable to get normalisation data, continuing with defaults.
Sep 08 07:52:55 snapcastserver snapserver[618226]: (librespot_playback::player) Unable to read audio file: Symphonia Decoder Error: Deadline expired before operation could complete { wait timeout exceeded }
<!-- gh-comment-id:3265090055 --> @bai-yi-bai commented on GitHub (Sep 8, 2025): I am now also receiving this message, but I have additional debug information which might help. I am using snapcast to stream to multiple devices and was using the librespot 6.1 dev branch. However, I noticed the day before yesterday that tracks were only playing until about 50% of the way through, with a `(AsioStream) No data since 130 ms, switching to idle` before advancing to the next track. It would error out with a `Symphonia Decoder Error`. I built from 7.1 to see if that would help, but now no audio comes through at all. h3. Sep 07 - Behavior: Playback stops at ~50%, skips to the next track ``` Sep 07 04:34:36 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <Kumbaya - Austin Millz Remix> Sep 07 04:35:04 snapcastserver snapserver[612241]: (librespot_audio::fetch) Error caching file af957fe38ebfebe189235c214176a0ef1e0db664 to "/var/lib/snapserver/files/af/957fe38ebfebe189235c214176a0ef1e0db664": Invalid state { audio cache location is not configured } Sep 07 04:37:42 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <Phonky Tribu - FUNK TRIBU SPECIAL MIX> with Spotify URI <spotify:track:6p2sh70Zowkw47cG0TkXg0> Sep 07 04:37:58 snapcastserver snapserver[612241]: (librespot_playback::player) Unable to get normalisation data, continuing with defaults. Sep 07 04:37:58 snapcastserver snapserver[612241]: (librespot_playback::player) Unable to read audio file: Symphonia Decoder Error: Deadline expired before operation could complete { wait timeout exceeded } Sep 07 04:37:58 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <Grounded> with Spotify URI <spotify:track:7tyEwLPZEU0EgWQlOVtQIC> Sep 07 04:38:12 snapcastserver snapserver[612241]: (AsioStream) No data since 130 ms, switching to idle Sep 07 04:38:12 snapcastserver snapserver[612241]: (PcmStream) State changed: Spotify, state: playing => idle Sep 07 04:38:12 snapcastserver snapserver[612241]: (Server) onStateChanged (Spotify): idle Sep 07 04:38:14 snapcastserver snapserver[612241]: (librespot_playback::player) Unable to get normalisation data, continuing with defaults. Sep 07 04:38:14 snapcastserver snapserver[612241]: (librespot_playback::player) Unable to read audio file: Symphonia Decoder Error: Deadline expired before operation could complete { wait timeout exceeded } Sep 07 04:38:14 snapcastserver snapserver[612241]: (librespot_playback::player) Skipping to next track, unable to load track <SpotifyId("spotify:track:7tyEwLPZEU0EgWQlOVtQIC")>: () Sep 07 04:38:14 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <OK> with Spotify URI <spotify:track:442lxJfyUbsOWAYFBxNDdL> Sep 07 04:38:14 snapcastserver snapserver[612241]: (librespot_playback::player) <OK> (143326 ms) loaded Sep 07 04:38:14 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <OK> Sep 07 04:38:14 snapcastserver snapserver[612241]: (PcmStream) State changed: Spotify, state: idle => playing Sep 07 04:38:14 snapcastserver snapserver[612241]: (Server) onStateChanged (Spotify): playing Sep 07 04:38:18 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <Don't Look Back> with Spotify URI <spotify:track:30syAydJTLa18aDRPIwS4k> Sep 07 04:38:18 snapcastserver snapserver[612241]: (librespot_playback::player) <Don't Look Back> (184827 ms) loaded Sep 07 04:38:18 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <Don't Look Back> Sep 07 04:38:21 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <INSONAMIA> with Spotify URI <spotify:track:5jRR9de75gD6zCzoRZkyKB> Sep 07 04:38:21 snapcastserver snapserver[612241]: (librespot_playback::player) <INSONAMIA> (181254 ms) loaded Sep 07 04:38:21 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <INSONAMIA> Sep 07 04:39:55 snapcastserver snapserver[612241]: (AsioStream) No data since 130 ms, switching to idle Sep 07 04:39:55 snapcastserver snapserver[612241]: (PcmStream) State changed: Spotify, state: playing => idle Sep 07 04:39:55 snapcastserver snapserver[612241]: (Server) onStateChanged (Spotify): idle Sep 07 04:40:03 snapcastserver snapserver[612241]: (librespot_playback::player) Skipping to next track, unable to get next packet for track <SpotifyId("spotify:track:5jRR9de75gD6zCzoRZkyKB")>: SymphoniaDecoder("Deadline expired before operation could complete { wait timeout exceeded }") Sep 07 04:40:11 snapcastserver snapserver[612241]: (librespot_playback::player) Skipping to next track, unable to get next packet for track <SpotifyId("spotify:track:5jRR9de75gD6zCzoRZkyKB")>: SymphoniaDecoder("Deadline expired before operation could complete { wait timeout exceeded }") Sep 07 04:40:11 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <GO!> with Spotify URI <spotify:track:6mwrQ7UyriEE3P2DVUZzke> Sep 07 04:40:11 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <ALICE.> with Spotify URI <spotify:track:2dVmZ5FPuBsZY8XwK7CRSc> Sep 07 04:40:11 snapcastserver snapserver[612241]: (librespot_playback::player) <GO!> (141517 ms) loaded Sep 07 04:40:11 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <GO!> Sep 07 04:40:11 snapcastserver snapserver[612241]: (PcmStream) State changed: Spotify, state: idle => playing Sep 07 04:40:11 snapcastserver snapserver[612241]: (Server) onStateChanged (Spotify): playing Sep 07 04:40:11 snapcastserver snapserver[612241]: (Server) onResync (Spotify): 15700.7 ms Sep 07 04:40:11 snapcastserver snapserver[612241]: (ControlSessionWS) Wrote 1784 bytes to web socket Sep 07 04:40:11 snapcastserver snapserver[612241]: (librespot_playback::player) <ALICE.> (179366 ms) loaded Sep 07 04:40:11 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <ALICE.> Sep 07 04:42:02 snapcastserver snapserver[612241]: (librespot_playback::player) Loading <Sea Gets Hotter> with Spotify URI <spotify:track:5ZK62nSchTamBy8F6HIZov> Sep 07 04:42:02 snapcastserver snapserver[612241]: (librespot_playback::player) <Sea Gets Hotter> (197226 ms) loaded Sep 07 04:42:02 snapcastserver snapserver[612241]: (LibrespotStream) metadata: <Sea Gets Hotter> Sep 07 04:44:12 snapcastserver snapserver[612241]: (AsioStream) No data since 130 ms, switching to idle Sep 07 04:44:12 snapcastserver snapserver[612241]: (PcmStream) State changed: Spotify, state: playing => idle Sep 07 04:44:12 snapcastserver snapserver[612241]: (Server) onStateChanged (Spotify): idle Sep 07 04:44:19 snapcastserver snapserver[612241]: (librespot_playback::player) Skipping to next track, unable to get next packet for track <SpotifyId("spotify:track:5ZK62nSchTamBy8F6HIZov")>: SymphoniaDecoder("Deadline expired before operation could complete { wait timeout exceeded }") ``` Sep 08 - No playback at all ``` Sep 08 07:52:39 snapcastserver snapserver[618226]: (librespot_playback::player) Skipping to next track, unable to load track <SpotifyId("spotify:track:5lT73kFy624ns90M1foaSc")>: () Sep 08 07:52:39 snapcastserver snapserver[618226]: (librespot_playback::player) Loading <City of Sound - Analog Sessions> with Spotify URI <spotify:track:4OskHm2Le50GskM8lQDVhz> Sep 08 07:52:55 snapcastserver snapserver[618226]: (librespot_playback::player) Unable to get normalisation data, continuing with defaults. Sep 08 07:52:55 snapcastserver snapserver[618226]: (librespot_playback::player) Unable to read audio file: Symphonia Decoder Error: Deadline expired before operation could complete { wait timeout exceeded } ```
Author
Owner

@photovoltex commented on GitHub (Sep 9, 2025):

@bai-yi-bai I think you are encountering a different issue. The issue here seems to fully prevent playback currently, so if you do not find any similar issue, please open a new issue for your problem.

<!-- gh-comment-id:3271656738 --> @photovoltex commented on GitHub (Sep 9, 2025): @bai-yi-bai I think you are encountering a different issue. The issue here seems to fully prevent playback currently, so if you do not find any similar issue, please open a new issue for your problem.
Author
Owner

@photovoltex commented on GitHub (Sep 9, 2025):

@pjchamberlain can you give https://github.com/photovoltex/librespot/tree/fix/harden-transfer-flow a shot? I had to simulate my transfer state because I didn't ran into your issue, but I hope this should solve the issue. I also fixed another behavior where the play/pause button was disabled on transfer, that should also behave better now :D.

You can use cargo to install it directly from source. Alternatively would be to clone the repo or add another remote to an existing repo and switch to the correct branch.

cargo install --git https://github.com/photovoltex/librespot --branch fix/harden-transfer-flow
<!-- gh-comment-id:3271940615 --> @photovoltex commented on GitHub (Sep 9, 2025): @pjchamberlain can you give https://github.com/photovoltex/librespot/tree/fix/harden-transfer-flow a shot? I had to simulate my transfer state because I didn't ran into your issue, but I hope this should solve the issue. I also fixed another behavior where the play/pause button was disabled on transfer, that should also behave better now :D. > You can use cargo to install it directly from source. Alternatively would be to clone the repo or add another remote to an existing repo and switch to the correct branch. > ``` > cargo install --git https://github.com/photovoltex/librespot --branch fix/harden-transfer-flow > ```
Author
Owner

@HirbodBehnam commented on GitHub (Sep 13, 2025):

@photovoltex Just a heads up that your fix, fixed my issue! Thank you very much.

<!-- gh-comment-id:3288717210 --> @HirbodBehnam commented on GitHub (Sep 13, 2025): @photovoltex Just a heads up that your fix, fixed my issue! Thank you very much.
Author
Owner

@photovoltex commented on GitHub (Sep 13, 2025):

Thanks for the info! That's what I wanted to hear. Then I can create a PR for it :)

<!-- gh-comment-id:3288727549 --> @photovoltex commented on GitHub (Sep 13, 2025): Thanks for the info! That's what I wanted to hear. Then I can create a PR for it :)
Author
Owner

@mattrigg9 commented on GitHub (Sep 24, 2025):

@pjchamberlain can you give https://github.com/photovoltex/librespot/tree/fix/harden-transfer-flow a shot? I had to simulate my transfer state because I didn't ran into your issue, but I hope this should solve the issue. I also fixed another behavior where the play/pause button was disabled on transfer, that should also behave better now :D.

You can use cargo to install it directly from source. Alternatively would be to clone the repo or add another remote to an existing repo and switch to the correct branch.

cargo install --git https://github.com/photovoltex/librespot --branch fix/harden-transfer-flow

Confirming this also fixed the issue for me too, thanks!

<!-- gh-comment-id:3330874284 --> @mattrigg9 commented on GitHub (Sep 24, 2025): > [@pjchamberlain](https://github.com/pjchamberlain) can you give https://github.com/photovoltex/librespot/tree/fix/harden-transfer-flow a shot? I had to simulate my transfer state because I didn't ran into your issue, but I hope this should solve the issue. I also fixed another behavior where the play/pause button was disabled on transfer, that should also behave better now :D. > > > You can use cargo to install it directly from source. Alternatively would be to clone the repo or add another remote to an existing repo and switch to the correct branch. > > ``` > > cargo install --git https://github.com/photovoltex/librespot --branch fix/harden-transfer-flow > > ``` Confirming this also fixed the issue for me too, thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#710
No description provided.