[GH-ISSUE #1438] Transfer playback fails to find track #651

Closed
opened 2026-02-27 19:31:46 +03:00 by kerem · 3 comments
Owner

Originally created by @FabioGNR on GitHub (Jan 11, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1438

Description

When I use the Spotify desktop application (Linux) to transfer playback to the librespot device, librespot fails to find a track
"ERROR librespot_connect::spirc] ContextError: Invalid state { track uri contains invalid characters }" and does not resume playback.

Version

v0.6.0-15-g7003e98

How to reproduce

  1. Launch librespot (without args)
  2. Start playing a song on Spotify desktop app
  3. Using the desktop app, transfer playback to the 'librespot' device

Log

[2025-01-11T19:28:49Z INFO  librespot] librespot 0.6.0-dev 7003e98 (Built on 2025-01-11, Build ID: 0lU6IYBT, Profile: debug)
[2025-01-11T19:28:49Z TRACE librespot] Command line argument(s):
[2025-01-11T19:28:49Z TRACE librespot]          R "100"
[2025-01-11T19:28:49Z TRACE librespot]          verbose
[2025-01-11T19:28:49Z DEBUG librespot_core::session] new Session
[2025-01-11T19:28:49Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:43803
[2025-01-11T19:28:49Z INFO  librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)
[2025-01-11T19:28:49Z DEBUG librespot_playback::player] new Player [0]
[2025-01-11T19:28:49Z INFO  librespot_playback::convert] Converting with ditherer: tpdf
[2025-01-11T19:28:49Z INFO  librespot_playback::audio_backend::rodio] Using Rodio sink with format S16 and cpal host: ALSA
[2025-01-11T19:28:49Z INFO  librespot_playback::audio_backend::rodio] Using audio device: default
[2025-01-11T19:28:49Z DEBUG librespot_playback::audio_backend::rodio] Rodio sink was created
[2025-01-11T19:28:53Z DEBUG librespot_discovery::server] POST "/" {}
[2025-01-11T19:28:53Z DEBUG librespot_core::session] Shutdown: Invalidating session
[2025-01-11T19:28:53Z DEBUG librespot::component] new MercuryManager
[2025-01-11T19:28:53Z DEBUG librespot::component] new ChannelManager
[2025-01-11T19:28:53Z DEBUG librespot_core::session] new Session
[2025-01-11T19:28:53Z DEBUG librespot_playback::player] command=SetSession
[2025-01-11T19:28:53Z DEBUG librespot_core::session] drop Session
[2025-01-11T19:28:53Z DEBUG librespot_connect::spirc] new Spirc[0]
[2025-01-11T19:28:53Z DEBUG librespot::component] drop ChannelManager
[2025-01-11T19:28:53Z DEBUG librespot::component] drop MercuryManager
[2025-01-11T19:28:53Z DEBUG librespot::component] new DealerManager
[2025-01-11T19:28:53Z DEBUG librespot::component] new SpClient
[2025-01-11T19:28:53Z DEBUG librespot_core::spclient] Client token unavailable or expired, requesting new token.
[2025-01-11T19:28:53Z DEBUG librespot_core::http_client] Requesting https://clienttoken.spotify.com/v1/clienttoken
[2025-01-11T19:28:53Z DEBUG librespot_core::spclient] Received a granted token
[2025-01-11T19:28:53Z TRACE librespot_core::spclient] Got client token: GrantedTokenResponse { redacted }
[2025-01-11T19:28:53Z DEBUG librespot::component] new ApResolver
[2025-01-11T19:28:53Z DEBUG librespot_core::http_client] Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient
[2025-01-11T19:28:53Z INFO  librespot_core::session] Connecting to AP "ap-gew4.spotify.com:4070"
[2025-01-11T19:28:53Z DEBUG librespot_core::connection] Authenticating with AP using AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS
[2025-01-11T19:28:53Z INFO  librespot_core::session] Authenticated as 'fabiognr' !
[2025-01-11T19:28:53Z DEBUG librespot::component] new Login5Manager
[2025-01-11T19:28:53Z DEBUG librespot_core::http_client] Requesting https://login5.spotify.com/v3/login
[2025-01-11T19:28:53Z TRACE librespot_core::session] Received Ping
[2025-01-11T19:28:53Z TRACE librespot_core::session] keep-alive state: PendingPong, timeout in 60.0
[2025-01-11T19:28:53Z DEBUG librespot_core::session] Session strong=5 weak=6
[2025-01-11T19:28:53Z INFO  librespot_core::session] Country: "NL"
[2025-01-11T19:28:53Z TRACE librespot_core::session] Received product info: {
        "ab-android-push-notifications": "1",
        "ad-formats-video-takeover": "1",
        "dma-mode-enabled": "0",
        "on-demand": "1",
        "apply-child-content-restrictions": "0",
        "autoplay": "1",
        "high-bitrate": "1",
        "shuffle-algorithm": "1",
        "explicit-content": "1",
        "publish-activity": "1",
        "ab_recently_played_feature_time_filter_threshold": "com.spotify.gaia=30,driving-mode=120,spotify%3Ainternal%3Astartpage=30",
        "is-cheetara": "0",
        "video-keyframe-url": "http://keyframes-fa.cdn.spotify.com/keyframes/v1/sources/{source_id}/keyframe/heights/{height}/timestamps/{timestamp_ms}.jpg",
        "arsenal_country": "1",
        "has-audiobooks-subscription": "0",
        "ab-test-group": "483",
        "ab-watch-now": "0",
        "key-memory-cache-mode": "1:15,300",
        "ab-mobile-social-feed": "1",
        "ab-collection-union": "1",
        "ab-mobile-running-tempo-detection": "Control",
        "payments-locked-state": "0",
        "fb-grant-permission-local-render": "0",
        "mobile-payment": "0",
        "playlist-annotations-markup": "0",
        "unrestricted": "1",
        "backend-advised-bitrate": "1",
        "social-session": "1",
        "dsa-mode-available": "1",
        "use-fb-publish-backend": "2",
        "pause-after": "0",
        "app-developer": "0",
        "video-cdn-sampling": "100",
        "dsa-mode-enabled": "0",
        "ad-persist-reward-time": "0",
        "ab-moments-experience": "0",
        "capping-bar-threshold": "3601",
        "dma-mode-available": "1",
        "enable-autostart": "1",
        "prefetch-window-max": "2",
        "ab-mobile-discover": "0",
        "ab-mobile-startpage": "0",
        "audiobook-onboarding-dismissed": "0",
        "enable-crossfade": "1",
        "buffering-strategy-parameters": "0.8:0.2:0.0:0.0:0.0:0.0:1.0:10:10:2000:10000:10485760",
        "is_maybe_in_social_session": "0",
        "jam": "1",
        "prefetch-strategy": "18",
        "send-email": "0",
        "shows-collection": "1",
        "employee-free-opt-in": "0",
        "ads": "0",
        "financial-product": "pr:premium,tc:0,rt:v2_NL_default_new-family-sub-1m_0_EUR_default",
        "is_email_verified": "1",
        "track-cap": "0",
        "profile-image-upload": "1",
        "use-playlist-app": "0",
        "use-pl3": "0",
        "ab-playlist-extender": "5",
        "preferred-locale": "en",
        "ab-collection-offline-mode": "0",
        "key-caching-max-count": "10000",
        "audiobook-onboarding-completed": "0",
        "fb-info-confirmation": "control",
        "ab-new-share-flow": "0",
        "social-session-free-tier": "0",
        "ugc-abuse-report": "1",
        "restrict-playlist-collaboration": "0",
        "expiry": "1",
        "enable-gapless": "1",
        "mobile-browse": "0",
        "player-license": "premium",
        "ab-play-history": "0",
        "key-caching-auto-offline": "0",
        "allow-override-internal-prefs": "0",
        "head-files-url": "https://heads-fa-tls13.spotifycdn.com/head/{file_id}",
        "image-url": "https://i.scdn.co/image/{file_id}",
        "instant-search-expand-sidebar": "0",
        "libspotify": "1",
        "ap-resolve-pods": "1",
        "ab-collection-followed-artists-only": "0",
        "loudness-levels": "1:-5.0,0.0,3.0:-2.0",
        "use-playlist-uris": "0",
        "video-manifest-url": "https://spclient.wg.spotify.com/manifests/v6/{type}/sources/{source_id}/options/supports_drm",
        "audio-quality": "1",
        "incognito_mode_timeout": "21600",
        "mobile": "1",
        "license-acceptance-grace-days": "30",
        "head-file-caching": "1",
        "storage-size-config": "10240,90,500,3",
        "payments-initial-campaign": "default",
        "ab-desktop-playlist-annotation-edit": "1",
        "video-wifi-initial-bitrate": "800000",
        "prefetch-keys": "1",
        "ab-mobile-running-onlymanualmode": "only-manual",
        "ad-formats-preroll-video": "0",
        "india-experience": "0",
        "video-device-blacklisted": "0",
        "buffering-strategy": "0",
        "type": "premium",
        "enable-annotations": "2",
        "instant-search": "0",
        "offline": "1",
        "widevine-license-url": "https://spclient.wg.spotify.com/widevine-license/v1/video/license",
        "video-initial-bitrate": "200000",
        "ab-browse-music-tuesday": "1",
        "name": "Spotify Premium",
        "remote-control": "6",
        "filter-explicit-content": "0",
        "ab-ad-player-targeting": "1",
        "network-operator-premium-activation": "1",
        "sidebar-navigation-enabled": "0",
        "streaming": "1",
        "rating-access": "1",
        "audio-preview-url-template": "https://p.scdn.co/mp3-preview/{id}",
        "ugc-abuse-report-url": "https://support.spotify.com/abuse/?uri={uri}",
        "enable-annotations-read": "0",
        "ab-collection-hide-unavailable-albums": "0",
        "ad-session-persistence": "1",
        "catalogue": "premium",
        "playlist-folders": "1",
        "public-toplist": "1",
        "ab-desktop-hide-follow": "0",
        "publish-playlist": "1",
        "browse-overview-enabled": "1",
        "collection": "1",
        "key-caching-max-offline-seconds": "1800",
        "nft-disabled": "1",
        "ab-ad-requester": "1",
        "shows-collection-jam": "0",
        "is-puffin": "0",
        "mobile-login": "1",
        "is-standalone-audiobooks": "0",
        "is-pigeon": "0",
        "local-files-import": "0",
        "radio": "1",
        "setup-headphones-changes": "0",
        "ab-collection-bookmark-model": "1",
        "shuffle": "0",
        "streaming-only-premium": "0",
        "is-tuna": "0",
        "user-profile-show-invitation-codes": "0",
        "yl-kids-restricted-content": "0",
        "metadata-link-lookup-modes": "0",
        "obfuscate-restricted-tracks": "0",
    }
[2025-01-11T19:28:53Z DEBUG librespot::component] new MercuryManager
[2025-01-11T19:28:53Z TRACE librespot_core::mercury] mercury response <hm://pusher/v1/connections/N2MyOGFiOGE1Yzk1MTJlNDI2NmFjN2NiNzU2MzEyYzgyZWU0M2Q3ZStBUCt0Y3A6Ly8wYWNhNTkyMi5pcC5nZXc0LnNwb3RpZnkubmV0OjUwMTkrRUVERTU4Njg2MzlBNDBGNDlCOEY3OTNCMjg1NDk0MDc2MTIyQUUwRDJENzI0Mjg2RDQ3ODcwMUZBQTk2OTQ4OA%3D%3D> is handled by dealer
[2025-01-11T19:28:53Z TRACE librespot_core::login5] Got auth token: Token { redacted }
[2025-01-11T19:28:53Z DEBUG librespot_playback::player] command=AddEventSender
[2025-01-11T19:28:53Z DEBUG librespot_core::dealer::manager] Launching dealer
[2025-01-11T19:28:53Z TRACE librespot_core::dealer] Sent ping
[2025-01-11T19:28:53Z TRACE librespot_connect::spirc] Received connection ID update: "MmJkYmUxMjEtM2RmMy00Mjk5LTk2NTctNDJkYTc2Y2EwZmU2K2RlYWxlcit0Y3A6Ly8wYWNhNTkyMy5pcC5nZXc0LnNwb3RpZnkubmV0OjU3MDArQkNFMTM2RTY3RjdCRTY2MkJFRUEyM0VDMzM1MkFDQ0I5NkIxRDdGNjkxRENDOTMzRDQyNzhCQThDMEEzMURENw=="
[2025-01-11T19:28:53Z INFO  librespot_core::spclient] Resolved "gew4-spclient.spotify.com:443" as spclient access point
[2025-01-11T19:28:53Z DEBUG librespot_core::http_client] Requesting https://gew4-spclient.spotify.com:443/connect-state/v1/devices/7c28ab8a5c9512e4266ac7cb756312c82ee43d7e?product=0&country=NL&salt=859094185
[2025-01-11T19:28:53Z TRACE librespot_core::dealer] Received pong
[2025-01-11T19:28:53Z DEBUG librespot_connect::spirc] successfully put connect state for 7c28ab8a5c9512e4266ac7cb756312c82ee43d7e with connection-id MmJkYmUxMjEtM2RmMy00Mjk5LTk2NTctNDJkYTc2Y2EwZmU2K2RlYWxlcit0Y3A6Ly8wYWNhNTkyMy5pcC5nZXc0LnNwb3RpZnkubmV0OjU3MDArQkNFMTM2RTY3RjdCRTY2MkJFRUEyM0VDMzM1MkFDQ0I5NkIxRDdGNjkxRENDOTMzRDQyNzhCQThDMEEzMURENw==
[2025-01-11T19:28:53Z INFO  librespot_connect::spirc] active device is <cbd883cd9391339a6759a0f2ec6d2d6993dcd6d0> with session <4GjCyehb9xRsPWGU2IGF93>
[2025-01-11T19:28:53Z TRACE librespot_core::dealer] dealer request hm://connect-state/v1/player/command
[2025-01-11T19:28:53Z TRACE librespot_core::dealer::protocol] message was send with gzip encoding 
[2025-01-11T19:28:53Z TRACE librespot_core::dealer::protocol] websocket request: Object {
        "command": Object {
            "data": String("ChwIARAAGAAqCQoFbWVkaWESACoJCgVtZWRpYRIAEvMGCP3X3LbFMhBbGQAAAAAAAPA/IAAq3AYKABIUZGRlNDU3MWU1ZTEwNDU5MjAzODUaELEmCJ6QqEVVgRgg6P5JzQ4iLgoKZW50aXR5X3VyaRIgc3BvdGlmeTp1c2VyOmZhYmlvZ25yOmNvbGxlY3Rpb24iSgoQaW1hZ2VfeGxhcmdlX3VybBI2c3BvdGlmeTppbWFnZTphYjY3NjE2ZDAwMDBiMjczZDdiNDUzOTExMGY1YThiNzExNWJiOWJmIhUKDHRyYWNrX3BsYXllchIFYXVkaW8iGwoFdGl0bGUSElBlZWwgQmFjayB0aGUgU2tpbiIWCghhZGRlZF9hdBIKMTczNjQwNzg3MSI2Cg5pbnRlcmFjdGlvbl9pZBIkNzU5YzhiZGQtODVjOC00Y2FkLWEzZjctYmI5YTJiYjlhODRjIkkKD2ltYWdlX2xhcmdlX3VybBI2c3BvdGlmeTppbWFnZTphYjY3NjE2ZDAwMDBiMjczZDdiNDUzOTExMGY1YThiNzExNWJiOWJmIkkKD2ltYWdlX3NtYWxsX3VybBI2c3BvdGlmeTppbWFnZTphYjY3NjE2ZDAwMDA0ODUxZDdiNDUzOTExMGY1YThiNzExNWJiOWJmIi8KC2NvbnRleHRfdXJpEiBzcG90aWZ5OnVzZXI6ZmFiaW9nbnI6Y29sbGVjdGlvbiIOCglpdGVyYXRpb24SATAiGgoLYWxidW1fdGl0bGUSC0hhcmQgMiBLaWxsIioKIGFjdGlvbnMuc2tpcHBpbmdfcHJldl9wYXN0X3RyYWNrEgZyZXN1bWUiQwoJaW1hZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMDFlMDJkN2I0NTM5MTEwZjVhOGI3MTE1YmI5YmYiOAoQcGFnZV9pbnN0YW5jZV9pZBIkZTA3OTFjMjItNzk4YS00ZDRkLWIyNDAtYzBlMjA0MTA5Nzg1IioKIGFjdGlvbnMuc2tpcHBpbmdfbmV4dF9wYXN0X3RyYWNrEgZyZXN1bWUiMwoKYXJ0aXN0X3VyaRIlc3BvdGlmeTphcnRpc3Q6N2RRTlBka3E5OVFHaVVJTW1SanF1ciIxCglhbGJ1bV91cmkSJHNwb3RpZnk6YWxidW06M1BESnJMZmtrQTR5b3dNclhIUzVGaBrPAgpLCgx5b3VyX2xpYnJhcnkSJXhwdWlfMjAyNC0xMS0wN18xNzMwOTg1Njg1MTg0XzBiZDVjMmEaACIAKgx5b3VyX2xpYnJhcnkyAEIAElIKIHNwb3RpZnk6dXNlcjpmYWJpb2ducjpjb2xsZWN0aW9uEipjb250ZXh0Oi8vc3BvdGlmeTp1c2VyOmZhYmlvZ25yOmNvbGxlY3Rpb24iADABGhRkZGU0NTcxZTVlMTA0NTkyMDM4NSICCAEqADJMMiQ3NTljOGJkZC04NWM4LTRjYWQtYTNmNy1iYjlhMmJiOWE4NGM6JGUwNzkxYzIyLTc5OGEtNGQ0ZC1iMjQwLWMwZTIwNDEwOTc4NToqc3RhYmxlOjFhMWI3Y2YwKGRiYjIwOTJkNDZmZTYyY2YuMDAwMDAwMDApShY0R2pDeWVoYjl4UnNQV0dVMklHRjkzIgIQACoA"),
            "endpoint": String("transfer"),
            "from_device_identifier": String("cbd883cd9391339a6759a0f2ec6d2d6993dcd6d0"),
            "logging_params": Object {
                "command_id": String("174251d236265cd5d240677f51b3157d"),
                "interaction_ids": Array [
                    String("bdfcd085-5930-4679-b2dd-9ee02d711c35"),
                ],
            },
            "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(1456946977),
        "play_on_secondary_stream": Null,
        "sent_by_device_id": String("cbd883cd9391339a6759a0f2ec6d2d6993dcd6d0"),
        "target_alias_id": Null,
    }
[2025-01-11T19:28:53Z DEBUG librespot_connect::spirc] handling: 'endpoint: transfer' from cbd883cd9391339a6759a0f2ec6d2d6993dcd6d0
[2025-01-11T19:28:53Z DEBUG librespot_connect::state::context] couldn't load context info because: context is not available. type: Default
[2025-01-11T19:28:53Z WARN  librespot_connect::spirc] didn't find initial track: Invalid state { track uri <None> contains invalid characters }
[2025-01-11T19:28:53Z DEBUG librespot_connect::spirc] add resolve request: resolve_uri: <Some("spotify:user:fabiognr:collection")>, context_uri: <Some("spotify:user:fabiognr:collection")>, autoplay: <false>, update: <true>
[2025-01-11T19:28:53Z DEBUG librespot_connect::spirc] current track is none, stopping playback
[2025-01-11T19:28:53Z WARN  librespot_connect::spirc] failed filling up next_track during stopping: context is not available. type: Default
[2025-01-11T19:28:53Z DEBUG librespot_connect::state] updated connect play status playing: true, paused: true, buffering: true
[2025-01-11T19:28:53Z DEBUG librespot_playback::player] command=Stop
[2025-01-11T19:28:53Z DEBUG librespot_core::http_client] Requesting https://gew4-spclient.spotify.com:443/connect-state/v1/devices/7c28ab8a5c9512e4266ac7cb756312c82ee43d7e?product=0&country=NL&salt=3570203966
[2025-01-11T19:28:53Z DEBUG librespot_core::dealer::manager] replying to ws request: Success
[2025-01-11T19:28:53Z WARN  librespot_core::dealer] No subscriber for msg.uri: social-connect/v2/broadcast_status_update
[2025-01-11T19:28:53Z DEBUG librespot_core::mercury] unknown subscription uri=social-connect/v2/broadcast_status_update
[2025-01-11T19:28:53Z TRACE librespot_core::mercury] response pushed over Mercury: MercuryResponse { uri: "social-connect/v2/broadcast_status_update", status_code: 200, payload: [[123, 34, 100, 101, 118, 105, 99, 101, 66, 114, 111, 97, 100, 99, 97, 115, 116, 83, 116, 97, 116, 117, 115, 34, 58, 123, 34, 116, 105, 109, 101, 115, 116, 97, 109, 112, 34, 58, 34, 49, 55, 51, 54, 54, 50, 51, 55, 51, 51, 56, 50, 51, 34, 44, 34, 98, 114, 111, 97, 100, 99, 97, 115, 116, 95, 115, 116, 97, 116, 117, 115, 34, 58, 34, 66, 82, 79, 65, 68, 67, 65, 83, 84, 95, 79, 78, 34, 44, 34, 100, 101, 118, 105, 99, 101, 95, 105, 100, 34, 58, 34, 55, 99, 50, 56, 97, 98, 56, 97, 53, 99, 57, 53, 49, 50, 101, 52, 50, 54, 54, 97, 99, 55, 99, 98, 55, 53, 54, 51, 49, 50, 99, 56, 50, 101, 101, 52, 51, 100, 55, 101, 34, 125, 125]] }
[2025-01-11T19:28:53Z DEBUG librespot_core::session] could not dispatch command: Service unavailable { error handling Mercury response: MercuryResponse { uri: "social-connect/v2/broadcast_status_update", status_code: 200, payload: [[123, 34, 100, 101, 118, 105, 99, 101, 66, 114, 111, 97, 100, 99, 97, 115, 116, 83, 116, 97, 116, 117, 115, 34, 58, 123, 34, 116, 105, 109, 101, 115, 116, 97, 109, 112, 34, 58, 34, 49, 55, 51, 54, 54, 50, 51, 55, 51, 51, 56, 50, 51, 34, 44, 34, 98, 114, 111, 97, 100, 99, 97, 115, 116, 95, 115, 116, 97, 116, 117, 115, 34, 58, 34, 66, 82, 79, 65, 68, 67, 65, 83, 84, 95, 79, 78, 34, 44, 34, 100, 101, 118, 105, 99, 101, 95, 105, 100, 34, 58, 34, 55, 99, 50, 56, 97, 98, 56, 97, 53, 99, 57, 53, 49, 50, 101, 52, 50, 54, 54, 97, 99, 55, 99, 98, 55, 53, 54, 51, 49, 50, 99, 56, 50, 101, 101, 52, 51, 100, 55, 101, 34, 125, 125]] } }
[2025-01-11T19:28:53Z INFO  librespot_connect::spirc] session update: <Ok(NEW_SESSION)> for self, current session_id 8bd19ab6f57544819b923ee705c22875, new session_id d8b9ae094270984fc13ec87e40737a44
[2025-01-11T19:28:53Z TRACE librespot_core::mercury] mercury response <social-connect/v2/session_update> is handled by dealer
[2025-01-11T19:28:54Z ERROR librespot_connect::spirc] could not parse session_update: Invalid state { Unknown enum variant name: `WIFI_BROADCAST_CHANGED` at 1:11 }
[2025-01-11T19:28:54Z TRACE librespot_core::mercury] mercury response <social-connect/v2/session_update> is handled by dealer
[2025-01-11T19:28:54Z DEBUG librespot_connect::spirc] resolving: resolve_uri: <Some("spotify:user:fabiognr:collection")>, context_uri: <Some("spotify:user:fabiognr:collection")>, autoplay: <false>, update: <true>
[2025-01-11T19:28:54Z DEBUG librespot_core::http_client] Requesting https://gew4-spclient.spotify.com:443/context-resolve/v1/spotify:user:fabiognr:collection
[2025-01-11T19:28:55Z DEBUG librespot_connect::state::context] updated context Default from <""> (- tracks) to <Some("spotify:user:fabiognr:collection")> (3382 tracks)
[2025-01-11T19:28:55Z DEBUG librespot_connect::state] updated connect play status playing: true, paused: true, buffering: true
[2025-01-11T19:28:55Z DEBUG librespot_core::http_client] Requesting https://gew4-spclient.spotify.com:443/connect-state/v1/devices/7c28ab8a5c9512e4266ac7cb756312c82ee43d7e?product=0&country=NL&salt=1619096479
[2025-01-11T19:28:55Z ERROR librespot_connect::spirc] ContextError: Invalid state { track uri <None> contains invalid characters }

Host (what you are running librespot on):

  • OS: Linux (Ubuntu 24)
  • Platform: x86

Additional context

Also tried to transfer from Android app, with same result.
Logs show a song played from "Liked Songs", but tried with a playlist and album and got same result.

Originally created by @FabioGNR on GitHub (Jan 11, 2025). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1438 ### Description When I use the Spotify desktop application (Linux) to transfer playback to the librespot device, librespot fails to find a track "ERROR librespot_connect::spirc] ContextError: Invalid state { track uri <None> contains invalid characters }" and does not resume playback. ### Version `v0.6.0-15-g7003e98` ### How to reproduce 1. Launch `librespot` (without args) 2. Start playing a song on Spotify desktop app 3. Using the desktop app, transfer playback to the 'librespot' device ### Log ``` [2025-01-11T19:28:49Z INFO librespot] librespot 0.6.0-dev 7003e98 (Built on 2025-01-11, Build ID: 0lU6IYBT, Profile: debug) [2025-01-11T19:28:49Z TRACE librespot] Command line argument(s): [2025-01-11T19:28:49Z TRACE librespot] R "100" [2025-01-11T19:28:49Z TRACE librespot] verbose [2025-01-11T19:28:49Z DEBUG librespot_core::session] new Session [2025-01-11T19:28:49Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:43803 [2025-01-11T19:28:49Z INFO librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0) [2025-01-11T19:28:49Z DEBUG librespot_playback::player] new Player [0] [2025-01-11T19:28:49Z INFO librespot_playback::convert] Converting with ditherer: tpdf [2025-01-11T19:28:49Z INFO librespot_playback::audio_backend::rodio] Using Rodio sink with format S16 and cpal host: ALSA [2025-01-11T19:28:49Z INFO librespot_playback::audio_backend::rodio] Using audio device: default [2025-01-11T19:28:49Z DEBUG librespot_playback::audio_backend::rodio] Rodio sink was created [2025-01-11T19:28:53Z DEBUG librespot_discovery::server] POST "/" {} [2025-01-11T19:28:53Z DEBUG librespot_core::session] Shutdown: Invalidating session [2025-01-11T19:28:53Z DEBUG librespot::component] new MercuryManager [2025-01-11T19:28:53Z DEBUG librespot::component] new ChannelManager [2025-01-11T19:28:53Z DEBUG librespot_core::session] new Session [2025-01-11T19:28:53Z DEBUG librespot_playback::player] command=SetSession [2025-01-11T19:28:53Z DEBUG librespot_core::session] drop Session [2025-01-11T19:28:53Z DEBUG librespot_connect::spirc] new Spirc[0] [2025-01-11T19:28:53Z DEBUG librespot::component] drop ChannelManager [2025-01-11T19:28:53Z DEBUG librespot::component] drop MercuryManager [2025-01-11T19:28:53Z DEBUG librespot::component] new DealerManager [2025-01-11T19:28:53Z DEBUG librespot::component] new SpClient [2025-01-11T19:28:53Z DEBUG librespot_core::spclient] Client token unavailable or expired, requesting new token. [2025-01-11T19:28:53Z DEBUG librespot_core::http_client] Requesting https://clienttoken.spotify.com/v1/clienttoken [2025-01-11T19:28:53Z DEBUG librespot_core::spclient] Received a granted token [2025-01-11T19:28:53Z TRACE librespot_core::spclient] Got client token: GrantedTokenResponse { redacted } [2025-01-11T19:28:53Z DEBUG librespot::component] new ApResolver [2025-01-11T19:28:53Z DEBUG librespot_core::http_client] Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient [2025-01-11T19:28:53Z INFO librespot_core::session] Connecting to AP "ap-gew4.spotify.com:4070" [2025-01-11T19:28:53Z DEBUG librespot_core::connection] Authenticating with AP using AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS [2025-01-11T19:28:53Z INFO librespot_core::session] Authenticated as 'fabiognr' ! [2025-01-11T19:28:53Z DEBUG librespot::component] new Login5Manager [2025-01-11T19:28:53Z DEBUG librespot_core::http_client] Requesting https://login5.spotify.com/v3/login [2025-01-11T19:28:53Z TRACE librespot_core::session] Received Ping [2025-01-11T19:28:53Z TRACE librespot_core::session] keep-alive state: PendingPong, timeout in 60.0 [2025-01-11T19:28:53Z DEBUG librespot_core::session] Session strong=5 weak=6 [2025-01-11T19:28:53Z INFO librespot_core::session] Country: "NL" [2025-01-11T19:28:53Z TRACE librespot_core::session] Received product info: { "ab-android-push-notifications": "1", "ad-formats-video-takeover": "1", "dma-mode-enabled": "0", "on-demand": "1", "apply-child-content-restrictions": "0", "autoplay": "1", "high-bitrate": "1", "shuffle-algorithm": "1", "explicit-content": "1", "publish-activity": "1", "ab_recently_played_feature_time_filter_threshold": "com.spotify.gaia=30,driving-mode=120,spotify%3Ainternal%3Astartpage=30", "is-cheetara": "0", "video-keyframe-url": "http://keyframes-fa.cdn.spotify.com/keyframes/v1/sources/{source_id}/keyframe/heights/{height}/timestamps/{timestamp_ms}.jpg", "arsenal_country": "1", "has-audiobooks-subscription": "0", "ab-test-group": "483", "ab-watch-now": "0", "key-memory-cache-mode": "1:15,300", "ab-mobile-social-feed": "1", "ab-collection-union": "1", "ab-mobile-running-tempo-detection": "Control", "payments-locked-state": "0", "fb-grant-permission-local-render": "0", "mobile-payment": "0", "playlist-annotations-markup": "0", "unrestricted": "1", "backend-advised-bitrate": "1", "social-session": "1", "dsa-mode-available": "1", "use-fb-publish-backend": "2", "pause-after": "0", "app-developer": "0", "video-cdn-sampling": "100", "dsa-mode-enabled": "0", "ad-persist-reward-time": "0", "ab-moments-experience": "0", "capping-bar-threshold": "3601", "dma-mode-available": "1", "enable-autostart": "1", "prefetch-window-max": "2", "ab-mobile-discover": "0", "ab-mobile-startpage": "0", "audiobook-onboarding-dismissed": "0", "enable-crossfade": "1", "buffering-strategy-parameters": "0.8:0.2:0.0:0.0:0.0:0.0:1.0:10:10:2000:10000:10485760", "is_maybe_in_social_session": "0", "jam": "1", "prefetch-strategy": "18", "send-email": "0", "shows-collection": "1", "employee-free-opt-in": "0", "ads": "0", "financial-product": "pr:premium,tc:0,rt:v2_NL_default_new-family-sub-1m_0_EUR_default", "is_email_verified": "1", "track-cap": "0", "profile-image-upload": "1", "use-playlist-app": "0", "use-pl3": "0", "ab-playlist-extender": "5", "preferred-locale": "en", "ab-collection-offline-mode": "0", "key-caching-max-count": "10000", "audiobook-onboarding-completed": "0", "fb-info-confirmation": "control", "ab-new-share-flow": "0", "social-session-free-tier": "0", "ugc-abuse-report": "1", "restrict-playlist-collaboration": "0", "expiry": "1", "enable-gapless": "1", "mobile-browse": "0", "player-license": "premium", "ab-play-history": "0", "key-caching-auto-offline": "0", "allow-override-internal-prefs": "0", "head-files-url": "https://heads-fa-tls13.spotifycdn.com/head/{file_id}", "image-url": "https://i.scdn.co/image/{file_id}", "instant-search-expand-sidebar": "0", "libspotify": "1", "ap-resolve-pods": "1", "ab-collection-followed-artists-only": "0", "loudness-levels": "1:-5.0,0.0,3.0:-2.0", "use-playlist-uris": "0", "video-manifest-url": "https://spclient.wg.spotify.com/manifests/v6/{type}/sources/{source_id}/options/supports_drm", "audio-quality": "1", "incognito_mode_timeout": "21600", "mobile": "1", "license-acceptance-grace-days": "30", "head-file-caching": "1", "storage-size-config": "10240,90,500,3", "payments-initial-campaign": "default", "ab-desktop-playlist-annotation-edit": "1", "video-wifi-initial-bitrate": "800000", "prefetch-keys": "1", "ab-mobile-running-onlymanualmode": "only-manual", "ad-formats-preroll-video": "0", "india-experience": "0", "video-device-blacklisted": "0", "buffering-strategy": "0", "type": "premium", "enable-annotations": "2", "instant-search": "0", "offline": "1", "widevine-license-url": "https://spclient.wg.spotify.com/widevine-license/v1/video/license", "video-initial-bitrate": "200000", "ab-browse-music-tuesday": "1", "name": "Spotify Premium", "remote-control": "6", "filter-explicit-content": "0", "ab-ad-player-targeting": "1", "network-operator-premium-activation": "1", "sidebar-navigation-enabled": "0", "streaming": "1", "rating-access": "1", "audio-preview-url-template": "https://p.scdn.co/mp3-preview/{id}", "ugc-abuse-report-url": "https://support.spotify.com/abuse/?uri={uri}", "enable-annotations-read": "0", "ab-collection-hide-unavailable-albums": "0", "ad-session-persistence": "1", "catalogue": "premium", "playlist-folders": "1", "public-toplist": "1", "ab-desktop-hide-follow": "0", "publish-playlist": "1", "browse-overview-enabled": "1", "collection": "1", "key-caching-max-offline-seconds": "1800", "nft-disabled": "1", "ab-ad-requester": "1", "shows-collection-jam": "0", "is-puffin": "0", "mobile-login": "1", "is-standalone-audiobooks": "0", "is-pigeon": "0", "local-files-import": "0", "radio": "1", "setup-headphones-changes": "0", "ab-collection-bookmark-model": "1", "shuffle": "0", "streaming-only-premium": "0", "is-tuna": "0", "user-profile-show-invitation-codes": "0", "yl-kids-restricted-content": "0", "metadata-link-lookup-modes": "0", "obfuscate-restricted-tracks": "0", } [2025-01-11T19:28:53Z DEBUG librespot::component] new MercuryManager [2025-01-11T19:28:53Z TRACE librespot_core::mercury] mercury response <hm://pusher/v1/connections/N2MyOGFiOGE1Yzk1MTJlNDI2NmFjN2NiNzU2MzEyYzgyZWU0M2Q3ZStBUCt0Y3A6Ly8wYWNhNTkyMi5pcC5nZXc0LnNwb3RpZnkubmV0OjUwMTkrRUVERTU4Njg2MzlBNDBGNDlCOEY3OTNCMjg1NDk0MDc2MTIyQUUwRDJENzI0Mjg2RDQ3ODcwMUZBQTk2OTQ4OA%3D%3D> is handled by dealer [2025-01-11T19:28:53Z TRACE librespot_core::login5] Got auth token: Token { redacted } [2025-01-11T19:28:53Z DEBUG librespot_playback::player] command=AddEventSender [2025-01-11T19:28:53Z DEBUG librespot_core::dealer::manager] Launching dealer [2025-01-11T19:28:53Z TRACE librespot_core::dealer] Sent ping [2025-01-11T19:28:53Z TRACE librespot_connect::spirc] Received connection ID update: "MmJkYmUxMjEtM2RmMy00Mjk5LTk2NTctNDJkYTc2Y2EwZmU2K2RlYWxlcit0Y3A6Ly8wYWNhNTkyMy5pcC5nZXc0LnNwb3RpZnkubmV0OjU3MDArQkNFMTM2RTY3RjdCRTY2MkJFRUEyM0VDMzM1MkFDQ0I5NkIxRDdGNjkxRENDOTMzRDQyNzhCQThDMEEzMURENw==" [2025-01-11T19:28:53Z INFO librespot_core::spclient] Resolved "gew4-spclient.spotify.com:443" as spclient access point [2025-01-11T19:28:53Z DEBUG librespot_core::http_client] Requesting https://gew4-spclient.spotify.com:443/connect-state/v1/devices/7c28ab8a5c9512e4266ac7cb756312c82ee43d7e?product=0&country=NL&salt=859094185 [2025-01-11T19:28:53Z TRACE librespot_core::dealer] Received pong [2025-01-11T19:28:53Z DEBUG librespot_connect::spirc] successfully put connect state for 7c28ab8a5c9512e4266ac7cb756312c82ee43d7e with connection-id MmJkYmUxMjEtM2RmMy00Mjk5LTk2NTctNDJkYTc2Y2EwZmU2K2RlYWxlcit0Y3A6Ly8wYWNhNTkyMy5pcC5nZXc0LnNwb3RpZnkubmV0OjU3MDArQkNFMTM2RTY3RjdCRTY2MkJFRUEyM0VDMzM1MkFDQ0I5NkIxRDdGNjkxRENDOTMzRDQyNzhCQThDMEEzMURENw== [2025-01-11T19:28:53Z INFO librespot_connect::spirc] active device is <cbd883cd9391339a6759a0f2ec6d2d6993dcd6d0> with session <4GjCyehb9xRsPWGU2IGF93> [2025-01-11T19:28:53Z TRACE librespot_core::dealer] dealer request hm://connect-state/v1/player/command [2025-01-11T19:28:53Z TRACE librespot_core::dealer::protocol] message was send with gzip encoding [2025-01-11T19:28:53Z TRACE librespot_core::dealer::protocol] websocket request: Object { "command": Object { "data": String("ChwIARAAGAAqCQoFbWVkaWESACoJCgVtZWRpYRIAEvMGCP3X3LbFMhBbGQAAAAAAAPA/IAAq3AYKABIUZGRlNDU3MWU1ZTEwNDU5MjAzODUaELEmCJ6QqEVVgRgg6P5JzQ4iLgoKZW50aXR5X3VyaRIgc3BvdGlmeTp1c2VyOmZhYmlvZ25yOmNvbGxlY3Rpb24iSgoQaW1hZ2VfeGxhcmdlX3VybBI2c3BvdGlmeTppbWFnZTphYjY3NjE2ZDAwMDBiMjczZDdiNDUzOTExMGY1YThiNzExNWJiOWJmIhUKDHRyYWNrX3BsYXllchIFYXVkaW8iGwoFdGl0bGUSElBlZWwgQmFjayB0aGUgU2tpbiIWCghhZGRlZF9hdBIKMTczNjQwNzg3MSI2Cg5pbnRlcmFjdGlvbl9pZBIkNzU5YzhiZGQtODVjOC00Y2FkLWEzZjctYmI5YTJiYjlhODRjIkkKD2ltYWdlX2xhcmdlX3VybBI2c3BvdGlmeTppbWFnZTphYjY3NjE2ZDAwMDBiMjczZDdiNDUzOTExMGY1YThiNzExNWJiOWJmIkkKD2ltYWdlX3NtYWxsX3VybBI2c3BvdGlmeTppbWFnZTphYjY3NjE2ZDAwMDA0ODUxZDdiNDUzOTExMGY1YThiNzExNWJiOWJmIi8KC2NvbnRleHRfdXJpEiBzcG90aWZ5OnVzZXI6ZmFiaW9nbnI6Y29sbGVjdGlvbiIOCglpdGVyYXRpb24SATAiGgoLYWxidW1fdGl0bGUSC0hhcmQgMiBLaWxsIioKIGFjdGlvbnMuc2tpcHBpbmdfcHJldl9wYXN0X3RyYWNrEgZyZXN1bWUiQwoJaW1hZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMDFlMDJkN2I0NTM5MTEwZjVhOGI3MTE1YmI5YmYiOAoQcGFnZV9pbnN0YW5jZV9pZBIkZTA3OTFjMjItNzk4YS00ZDRkLWIyNDAtYzBlMjA0MTA5Nzg1IioKIGFjdGlvbnMuc2tpcHBpbmdfbmV4dF9wYXN0X3RyYWNrEgZyZXN1bWUiMwoKYXJ0aXN0X3VyaRIlc3BvdGlmeTphcnRpc3Q6N2RRTlBka3E5OVFHaVVJTW1SanF1ciIxCglhbGJ1bV91cmkSJHNwb3RpZnk6YWxidW06M1BESnJMZmtrQTR5b3dNclhIUzVGaBrPAgpLCgx5b3VyX2xpYnJhcnkSJXhwdWlfMjAyNC0xMS0wN18xNzMwOTg1Njg1MTg0XzBiZDVjMmEaACIAKgx5b3VyX2xpYnJhcnkyAEIAElIKIHNwb3RpZnk6dXNlcjpmYWJpb2ducjpjb2xsZWN0aW9uEipjb250ZXh0Oi8vc3BvdGlmeTp1c2VyOmZhYmlvZ25yOmNvbGxlY3Rpb24iADABGhRkZGU0NTcxZTVlMTA0NTkyMDM4NSICCAEqADJMMiQ3NTljOGJkZC04NWM4LTRjYWQtYTNmNy1iYjlhMmJiOWE4NGM6JGUwNzkxYzIyLTc5OGEtNGQ0ZC1iMjQwLWMwZTIwNDEwOTc4NToqc3RhYmxlOjFhMWI3Y2YwKGRiYjIwOTJkNDZmZTYyY2YuMDAwMDAwMDApShY0R2pDeWVoYjl4UnNQV0dVMklHRjkzIgIQACoA"), "endpoint": String("transfer"), "from_device_identifier": String("cbd883cd9391339a6759a0f2ec6d2d6993dcd6d0"), "logging_params": Object { "command_id": String("174251d236265cd5d240677f51b3157d"), "interaction_ids": Array [ String("bdfcd085-5930-4679-b2dd-9ee02d711c35"), ], }, "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(1456946977), "play_on_secondary_stream": Null, "sent_by_device_id": String("cbd883cd9391339a6759a0f2ec6d2d6993dcd6d0"), "target_alias_id": Null, } [2025-01-11T19:28:53Z DEBUG librespot_connect::spirc] handling: 'endpoint: transfer' from cbd883cd9391339a6759a0f2ec6d2d6993dcd6d0 [2025-01-11T19:28:53Z DEBUG librespot_connect::state::context] couldn't load context info because: context is not available. type: Default [2025-01-11T19:28:53Z WARN librespot_connect::spirc] didn't find initial track: Invalid state { track uri <None> contains invalid characters } [2025-01-11T19:28:53Z DEBUG librespot_connect::spirc] add resolve request: resolve_uri: <Some("spotify:user:fabiognr:collection")>, context_uri: <Some("spotify:user:fabiognr:collection")>, autoplay: <false>, update: <true> [2025-01-11T19:28:53Z DEBUG librespot_connect::spirc] current track is none, stopping playback [2025-01-11T19:28:53Z WARN librespot_connect::spirc] failed filling up next_track during stopping: context is not available. type: Default [2025-01-11T19:28:53Z DEBUG librespot_connect::state] updated connect play status playing: true, paused: true, buffering: true [2025-01-11T19:28:53Z DEBUG librespot_playback::player] command=Stop [2025-01-11T19:28:53Z DEBUG librespot_core::http_client] Requesting https://gew4-spclient.spotify.com:443/connect-state/v1/devices/7c28ab8a5c9512e4266ac7cb756312c82ee43d7e?product=0&country=NL&salt=3570203966 [2025-01-11T19:28:53Z DEBUG librespot_core::dealer::manager] replying to ws request: Success [2025-01-11T19:28:53Z WARN librespot_core::dealer] No subscriber for msg.uri: social-connect/v2/broadcast_status_update [2025-01-11T19:28:53Z DEBUG librespot_core::mercury] unknown subscription uri=social-connect/v2/broadcast_status_update [2025-01-11T19:28:53Z TRACE librespot_core::mercury] response pushed over Mercury: MercuryResponse { uri: "social-connect/v2/broadcast_status_update", status_code: 200, payload: [[123, 34, 100, 101, 118, 105, 99, 101, 66, 114, 111, 97, 100, 99, 97, 115, 116, 83, 116, 97, 116, 117, 115, 34, 58, 123, 34, 116, 105, 109, 101, 115, 116, 97, 109, 112, 34, 58, 34, 49, 55, 51, 54, 54, 50, 51, 55, 51, 51, 56, 50, 51, 34, 44, 34, 98, 114, 111, 97, 100, 99, 97, 115, 116, 95, 115, 116, 97, 116, 117, 115, 34, 58, 34, 66, 82, 79, 65, 68, 67, 65, 83, 84, 95, 79, 78, 34, 44, 34, 100, 101, 118, 105, 99, 101, 95, 105, 100, 34, 58, 34, 55, 99, 50, 56, 97, 98, 56, 97, 53, 99, 57, 53, 49, 50, 101, 52, 50, 54, 54, 97, 99, 55, 99, 98, 55, 53, 54, 51, 49, 50, 99, 56, 50, 101, 101, 52, 51, 100, 55, 101, 34, 125, 125]] } [2025-01-11T19:28:53Z DEBUG librespot_core::session] could not dispatch command: Service unavailable { error handling Mercury response: MercuryResponse { uri: "social-connect/v2/broadcast_status_update", status_code: 200, payload: [[123, 34, 100, 101, 118, 105, 99, 101, 66, 114, 111, 97, 100, 99, 97, 115, 116, 83, 116, 97, 116, 117, 115, 34, 58, 123, 34, 116, 105, 109, 101, 115, 116, 97, 109, 112, 34, 58, 34, 49, 55, 51, 54, 54, 50, 51, 55, 51, 51, 56, 50, 51, 34, 44, 34, 98, 114, 111, 97, 100, 99, 97, 115, 116, 95, 115, 116, 97, 116, 117, 115, 34, 58, 34, 66, 82, 79, 65, 68, 67, 65, 83, 84, 95, 79, 78, 34, 44, 34, 100, 101, 118, 105, 99, 101, 95, 105, 100, 34, 58, 34, 55, 99, 50, 56, 97, 98, 56, 97, 53, 99, 57, 53, 49, 50, 101, 52, 50, 54, 54, 97, 99, 55, 99, 98, 55, 53, 54, 51, 49, 50, 99, 56, 50, 101, 101, 52, 51, 100, 55, 101, 34, 125, 125]] } } [2025-01-11T19:28:53Z INFO librespot_connect::spirc] session update: <Ok(NEW_SESSION)> for self, current session_id 8bd19ab6f57544819b923ee705c22875, new session_id d8b9ae094270984fc13ec87e40737a44 [2025-01-11T19:28:53Z TRACE librespot_core::mercury] mercury response <social-connect/v2/session_update> is handled by dealer [2025-01-11T19:28:54Z ERROR librespot_connect::spirc] could not parse session_update: Invalid state { Unknown enum variant name: `WIFI_BROADCAST_CHANGED` at 1:11 } [2025-01-11T19:28:54Z TRACE librespot_core::mercury] mercury response <social-connect/v2/session_update> is handled by dealer [2025-01-11T19:28:54Z DEBUG librespot_connect::spirc] resolving: resolve_uri: <Some("spotify:user:fabiognr:collection")>, context_uri: <Some("spotify:user:fabiognr:collection")>, autoplay: <false>, update: <true> [2025-01-11T19:28:54Z DEBUG librespot_core::http_client] Requesting https://gew4-spclient.spotify.com:443/context-resolve/v1/spotify:user:fabiognr:collection [2025-01-11T19:28:55Z DEBUG librespot_connect::state::context] updated context Default from <""> (- tracks) to <Some("spotify:user:fabiognr:collection")> (3382 tracks) [2025-01-11T19:28:55Z DEBUG librespot_connect::state] updated connect play status playing: true, paused: true, buffering: true [2025-01-11T19:28:55Z DEBUG librespot_core::http_client] Requesting https://gew4-spclient.spotify.com:443/connect-state/v1/devices/7c28ab8a5c9512e4266ac7cb756312c82ee43d7e?product=0&country=NL&salt=1619096479 [2025-01-11T19:28:55Z ERROR librespot_connect::spirc] ContextError: Invalid state { track uri <None> contains invalid characters } ``` ### Host (what you are running `librespot` on): - OS: Linux (Ubuntu 24) - Platform: x86 ### Additional context Also tried to transfer from Android app, with same result. Logs show a song played from "Liked Songs", but tried with a playlist and album and got same result.
kerem 2026-02-27 19:31:46 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@FabioGNR commented on GitHub (Jan 11, 2025):

In the playback.current_track field of TransferState I only see uid filled in, uri is None.
I have not yet been able to find a reference to the track uri or index in the Liked Songs.
However, the metadata field of ContextTrack does have the correct title of the song.

<!-- gh-comment-id:2585389033 --> @FabioGNR commented on GitHub (Jan 11, 2025): In the `playback.current_track` field of `TransferState` I only see `uid` filled in, `uri` is None. I have not yet been able to find a reference to the track uri or index in the Liked Songs. However, the `metadata` field of `ContextTrack` does have the correct title of the song.
Author
Owner

@FabioGNR commented on GitHub (Jan 11, 2025):

I now see it should be able to get the track based on gid, but it appears because "uri" is an empty string instead of None, it does not reach that branch. I'll try to see if handling empty uri string fixes this.

<!-- gh-comment-id:2585391245 --> @FabioGNR commented on GitHub (Jan 11, 2025): I now see it should be able to get the track based on gid, but it appears because "uri" is an empty string instead of None, it does not reach that branch. I'll try to see if handling empty uri string fixes this.
Author
Owner

@photovoltex commented on GitHub (Jan 11, 2025):

Seems like you are probably on the right track already. Thanks for the deeper investigation on the issue^^

<!-- gh-comment-id:2585396876 --> @photovoltex commented on GitHub (Jan 11, 2025): Seems like you are probably on the right track already. Thanks for the deeper investigation on the issue^^
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#651
No description provided.