Closed spudje closed 2 years ago
I have the same problem since the update. Log file looks a little bit different.
[2022-07-24T20:21:48Z WARN librespot_connect::spirc] Skipping track <uri: "spotify:meta:page:25"> at position [36] of 41
[2022-07-24T20:21:48Z WARN librespot_connect::spirc] Skipping track <uri: "spotify:meta:page:26"> at position [37] of 41
[2022-07-24T20:21:48Z WARN librespot_connect::spirc] Skipping track <uri: "spotify:meta:page:27"> at position [38] of 41
[2022-07-24T20:21:48Z WARN librespot_connect::spirc] Skipping track <uri: "spotify:meta:page:28"> at position [39] of 41
[2022-07-24T20:21:48Z WARN librespot_connect::spirc] Skipping track <uri: "spotify:meta:page:29"> at position [40] of 41
[2022-07-24T20:21:48Z INFO librespot_playback::player] Loading
So apparently, according to Frenck, this is releated to https://github.com/librespot-org/librespot/issues/972
Can anyone explain to me how I can apply following workaround listed in the linked thread:
Just a little heads up. As outlined before there's no need to fiddle with DNS, hosts files, IP addresses etc. You can work around this issue using a librespot parameter:
Used the "fallback ap hack". Set --ap-port=[some random port]. Log then said Using fallback "ap.spotify.com:443" and it works!
Same issue here :-( It seems that V0.4.2 of librespot is released which solves the issue? Would be grateful for merging :-)
Here a work around to get 0.4.2 running:
Tested today for half an hour without problems.
Here a work around to get 0.4.2 running:
- Uninstall official spotify connect addon
- Open https://github.com/hassio-addons/addon-spotify-connect
- Click Code > Download Zip
- Open file addon-spotify-connect/spotify/config.yaml and remove line URL
- Open file addon-spotify-connect/spotify/Dockerfile and change version 0.4.1 to version 0.4.2
- Install SAMBA add-on in Home Assistant and connect to SAMBA drive
- Upload folder spotify to SAMBA folder addons
- In Home Assistant AddOn Store click Update
- Install local spotify connect addon
- Enjoy :-)
Tested today for half an hour without problems.
Good to know that it fixes the problem :) Can you make a pull request for the change?
Dear @frenck - librespot released 0.4.2 to hopefully work around these failing new API endpoints.
On My raspberry pi-3b, with a hifiberry DAC, I could not get the above method to run (It was worth a shot, because this API change by Spotify disabled my install anyway).
Thanks for everything ๐ ๐ช
@nimbling Thanks, I am aware of the new release, no need to ping me for that. Thanks ๐
Problem/Motivation
Addon doesn't play audio anymore. It's still possible to connect to the addon with spotify, but tracks either don't play at all anymore, or play without any audio.
Connecting to any other Spotify connect device works just fine.
Expected behavior
Tracks playing with audio.
Actual behavior
Not playing: Paul van Dyk - But not Tonigh won't play. Pressing play doesn't do anything Playing without auio: Priest - A Signal in the Noise
On latest winodws & android versions of Spotify client On 0.12.1 of Addon
All sorts of error appearing in the logs:
[2022-07-21T13:16:51Z ERROR librespot_core::channel] channel error: 2 1 [2022-07-21T13:16:51Z ERROR librespot_playback::player] Unable to load encrypted file: ChannelError [2022-07-21T13:16:51Z WARN librespot_playback::player] Skipping to next track, unable to load track <SpotifyId { id: 202506075945977101681045687470755102351, audio_type: Track }>: () [2022-07-21T13:16:51Z DEBUG librespot_connect::spirc] At track 2 of 1 <"spotify:album:6lGkCBrIcKltWNnah5w9oV"> update [true] [2022-07-21T13:16:51Z DEBUG librespot_connect::spirc] Looping around back to start, repeat is false [2022-07-21T13:16:51Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] [2022-07-21T13:16:51Z DEBUG librespot_playback::player] command=Load(SpotifyId { id: 202506075945977101681045687470755102351, audio_type: Track }, false, 0) [2022-07-21T13:16:51Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] [2022-07-21T13:16:51Z INFO librespot_playback::player] Loading <But Not Tonight> with Spotify URI <spotify:track:4DtCy79x9OqJ4UebQrHUcL> [2022-07-21T13:16:51Z DEBUG librespot_audio::fetch] Downloading file 6acbe55b8b1ecd52a1a5a79824346e57812a0769 [2022-07-21T13:16:51Z ERROR librespot_core::channel] channel error: 2 1 [2022-07-21T13:16:51Z ERROR librespot_playback::player] Unable to load encrypted file: ChannelError [2022-07-21T13:16:51Z WARN librespot_playback::player] Skipping to next track, unable to load track <SpotifyId { id: 202506075945977101681045687470755102351, audio_type: Track }>: () [2022-07-21T13:16:51Z DEBUG librespot_connect::spirc] At track 2 of 1 <"spotify:album:6lGkCBrIcKltWNnah5w9oV"> update [true] [2022-07-21T13:16:51Z DEBUG librespot_connect::spirc] Looping around back to start, repeat is false [2022-07-21T13:16:51Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] [2022-07-21T13:16:51Z DEBUG librespot_playback::player] command=Load(SpotifyId { id: 202506075945977101681045687470755102351, audio_type: Track }, false, 0) [2022-07-21T13:16:51Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] [2022-07-21T13:16:51Z INFO librespot_playback::player] Loading <But Not Tonight> with Spotify URI <spotify:track:4DtCy79x9OqJ4UebQrHUcL> [2022-07-21T13:16:51Z DEBUG librespot_audio::fetch] Downloading file 6acbe55b8b1ecd52a1a5a79824346e57812a0769 [2022-07-21T13:16:51Z ERROR librespot_core::channel] channel error: 2 1 [2022-07-21T13:16:51Z ERROR librespot_playback::player] Unable to load encrypted file: ChannelError [2022-07-21T13:16:51Z WARN librespot_playback::player] Skipping to next track, unable to load track <SpotifyId { id: 202506075945977101681045687470755102351, audio_type: Track }>: () [2022-07-21T13:16:51Z DEBUG librespot_connect::spirc] kMessageTypePlay "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552036104 1658409411587 kPlayStatusPause [2022-07-21T13:16:51Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] [2022-07-21T13:16:51Z DEBUG librespot_playback::player] command=Play [2022-07-21T13:16:51Z WARN librespot_playback::player] Player::play called from invalid state thread '<unnamed>' panicked at 'Map must not be polled after it returned
Poll::Ready', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/future/map.rs:62:17 stack backtrace: [2022-07-21T13:16:51Z DEBUG librespot_connect::spirc] At track 2 of 1 <"spotify:album:6lGkCBrIcKltWNnah5w9oV"> update [true] [2022-07-21T13:16:51Z DEBUG librespot_connect::spirc] Looping around back to start, repeat is false [2022-07-21T13:16:51Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] 0: 0xaaaae1f935c4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9b8bb3f9d805faf3 1: 0xaaaae1fb7a54 - core::fmt::write::h91ea32714d26275d 2: 0xaaaae1f8d07c - std::io::Write::write_fmt::h602b1b06849e4582 3: 0xaaaae1f95bc0 - std::panicking::default_hook::{{closure}}::hddceeb145633278f 4: 0xaaaae1f9588c - std::panicking::default_hook::h83f78d0a824c7799 5: 0xaaaae1f96238 - std::panicking::rust_panic_with_hook::h011eb1759be0fd43 6: 0xaaaae1cbd018 - std::panicking::begin_panic::{{closure}}::h9ac89225383b04a3 7: 0xaaaae1cbcca4 - std::sys_common::backtrace::__rust_end_short_backtrace::h49a6a0486c0b5340 8: 0xaaaae1b75520 - std::panicking::begin_panic::h33799aabcc9cb77c 9: 0xaaaae1cc8e34 - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::hc0c18ba5beb99347 10: 0xaaaae1caddc8 - <librespot_playback::player::PlayerInternal as core::future::future::Future>::poll::h238ba51ebc798950 11: 0xaaaae1c30c80 - std::thread::local::LocalKey<T>::with::h4c6395a169609448 12: 0xaaaae1bece38 - futures_executor::local_pool::block_on::h347f6316b1301df9 13: 0xaaaae1c35c38 - std::sys_common::backtrace::__rust_begin_short_backtrace::he694cc5efa05d1c0 14: 0xaaaae1c27548 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h5c2a51082edbba66 15: 0xaaaae1f9b820 - std::sys::unix::thread::Thread::new::thread_start::h6a0111deef204528 16: 0xffff8e0b3bc0 - <unknown> [2022-07-21T13:16:51Z DEBUG librespot_playback::player] drop PlayerInternal[0] [2022-07-21T13:16:53Z DEBUG librespot_connect::spirc] kMessageTypePlay "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552038330 1658409411680 kPlayStatusPause [2022-07-21T13:16:53Z ERROR librespot_playback::player] Player Commands Error: channel closed [2022-07-21T13:16:53Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] [2022-07-21T13:16:56Z DEBUG librespot_connect::spirc] kMessageTypePlay "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552040535 1658409413971 kPlayStatusPause [2022-07-21T13:16:56Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] [2022-07-21T13:17:02Z DEBUG librespot_connect::spirc] kMessageTypeLoad "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552047155 1658409416068 kPlayStatusPlay [2022-07-21T13:17:02Z DEBUG librespot_connect::spirc] State: context_uri: "spotify:album:4D1hHnuL49Sx2C013W7fzW" index: 0 position_ms: 0 status: kPlayStatusPlay position_measured_at: 1658409422721 context_description: "Body Machine" shuffle: false repeat: false playing_from_fallback: true row: 0 playing_track_index: 0 track {gid: "A6\347\307\014\000Cb\265\316\220\371\337zw\031"} track {gid: "Po3\350\347HO\204\213\213c\006\026\261\314x"} track {gid: "\307j%\244y\210M\277\202f\330\327\025\t\336z"} track {gid: "\355\371Y\035\315\323At\275_\342\031t\220o\016"} track {gid: "g9\027^\324\001J\320\214+^\014\024\345\212\323"} track {gid: "?;\037\323\345SD}\230\023\003\333O\266RY"} track {gid: "\335b\242\244\324\234C\014\260W\227\303\222{\265\016"} track {gid: "\"\245\363ss\314EE\263\217\345\371\320\214\013<"} track {gid: "*\331\245\232\3357C\325\244\275\016l5\224P*"} track {gid: "\256|\376\213Q\322E\277\263\223l\377?\354m\237"} [2022-07-21T13:17:02Z DEBUG librespot_connect::spirc] Frame has 10 tracks [2022-07-21T13:17:02Z ERROR librespot_playback::player] Player Commands Error: channel closed [2022-07-21T13:17:02Z ERROR librespot_playback::player] Player Commands Error: channel closed [2022-07-21T13:17:02Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2022-07-21T13:17:02Z DEBUG librespot_core::mercury] unknown subscription uri=social-connect/v2/session_update [2022-07-21T13:17:07Z DEBUG librespot_connect::spirc] kMessageTypeSeek "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552052428 1658409422986 kPlayStatusPlay [2022-07-21T13:17:07Z ERROR librespot_playback::player] Player Commands Error: channel closed [2022-07-21T13:17:07Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2022-07-21T13:17:10Z DEBUG librespot_connect::spirc] kMessageTypeVolume "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552054920 1658409427951 kPlayStatusStop [2022-07-21T13:17:10Z DEBUG librespot_playback::mixer::mappings] Input volume 40526 mapped to: 7.16% [2022-07-21T13:17:10Z ERROR librespot_playback::player] Player Commands Error: channel closed [2022-07-21T13:17:10Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2022-07-21T13:17:11Z DEBUG librespot_connect::spirc] kMessageTypeVolume "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552055707 1658409430453 kPlayStatusStop [2022-07-21T13:17:11Z DEBUG librespot_playback::mixer::mappings] Input volume 41550 mapped to: 7.98% [2022-07-21T13:17:11Z ERROR librespot_playback::player] Player Commands Error: channel closed [2022-07-21T13:17:11Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2022-07-21T13:17:11Z DEBUG librespot_connect::spirc] kMessageTypeVolume "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552056104 1658409431234 kPlayStatusStop [2022-07-21T13:17:11Z DEBUG librespot_playback::mixer::mappings] Input volume 42574 mapped to: 8.89% [2022-07-21T13:17:11Z ERROR librespot_playback::player] Player Commands Error: channel closed [2022-07-21T13:17:11Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2022-07-21T13:17:12Z DEBUG librespot_connect::spirc] kMessageTypeVolume "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552056502 1658409431628 kPlayStatusStop [2022-07-21T13:17:12Z DEBUG librespot_playback::mixer::mappings] Input volume 45646 mapped to: 12.29% [2022-07-21T13:17:12Z ERROR librespot_playback::player] Player Commands Error: channel closed [2022-07-21T13:17:12Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2022-07-21T13:17:27Z DEBUG librespot_core::session] Session[0] strong=2 weak=3 [2022-07-21T13:19:27Z DEBUG librespot_core::session] Session[0] strong=2 weak=3 [2022-07-21T13:21:04Z DEBUG librespot_connect::spirc] kMessageTypeSeek "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552288764 1658409432024 kPlayStatusPlay [2022-07-21T13:21:04Z ERROR librespot_playback::player] Player Commands Error: channel closed [2022-07-21T13:21:04Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2022-07-21T13:21:05Z DEBUG librespot_connect::spirc] kMessageTypePause "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552290046 1658409664289 kPlayStatusPlay [2022-07-21T13:21:05Z ERROR librespot_playback::player] Player Commands Error: channel closed [2022-07-21T13:21:05Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2022-07-21T13:21:06Z DEBUG librespot_connect::spirc] kMessageTypePause "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552290728 1658409665587 kPlayStatusPlay [2022-07-21T13:21:06Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2022-07-21T13:21:17Z DEBUG librespot_connect::spirc] kMessageTypeNext "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552302226 1658409666251 kPlayStatusStop [2022-07-21T13:21:17Z DEBUG librespot_connect::spirc] At track 2 of 10 <"spotify:album:4D1hHnuL49Sx2C013W7fzW"> update [false] [2022-07-21T13:21:17Z ERROR librespot_playback::player] Player Commands Error: channel closed [2022-07-21T13:21:17Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2022-07-21T13:21:18Z DEBUG librespot_connect::spirc] kMessageTypeNext "Pixel 5" 94d3e706d0d18ac1edd291474f612d21b9483123 552303228 1658409677757 kPlayStatusStop [2022-07-21T13:21:18Z DEBUG librespot_connect::spirc] At track 3 of 10 <"spotify:album:4D1hHnuL49Sx2C013W7fzW"> update [false] [2022-07-21T13:21:18Z ERROR librespot_playback::player] Player Commands Error: channel closed [2022-07-21T13:21:18Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPlay] [2022-07-21T13:21:27Z DEBUG librespot_core::session] Session[0] strong=2 weak=3
Steps to reproduce
Proposed changes