spotifyd
spotifyd copied to clipboard
DBUS/MPRIS-interface broken? Unable to fetch metadata
Description DBUS/MPRIS seems to be broken. Since yesterday I'm unable to get metadata via a DBUS request and if I request the current playback status it is always on "Stopped". I also set up a CLIENT_ID and set it in my service file as described here. This problem occurs on two devices and I didn't change anything on those systems. To me it looks like Spotify changed something in their API structure on first glance.
To Reproduce
- Play some song on Spotify via spotifyd
- Send a DBUS request (e.g
playerctl -p spotifyd status,playerctl -p spotifyd metadata)
Expected behavior If I remember correctly, before yesterday it was always either "play" or "pause" but I'm not sure about that. And metadata should be returned.
Logs
Click to show logs
Couldn't fetch metadata from spotify: Err(ErrorMessage { msg: "convert result failed, reason: Error(\"unknown variant `collection`, expected one of `artist`, `album`, `track`, `playlist`, `user`\", line: 8, column: 25); content: [\"{\\n \\\"timestamp\\\" : 1648293069860,\\n \\\"context\\\" : {\\n \\\"external_urls\\\" : {\\n \\\"spotify\\\" : \\\"https://open.spotify.com/collection/tracks\\\"\\n },\\n \\\"href\\\" : \\\"https://api.spotify.com/v1/me/tracks\\\",\\n \\\"type\\\" : \\\"collection\\\",\\n \\\"uri\\\" : \\\"spotify:user:nmus39bbn66uc8uwayopyc0b8:collection\\\"\\n },\\n \\\"progress_ms\\\" : 2546,\\n \\\"item\\\" : {\\n \\\"album\\\" : {\\n \\\"album_type\\\" : \\\"album\\\",\\n \\\"artists\\\" : [ {\\n \\\"external_urls\\\" : {\\n \\\"spotify\\\" : \\\"https://open.spotify.com/artist/2yEwvVSSSUkcLeSTNyHKh8\\\"\\n },\\n \\\"href\\\" : \\\"https://api.spotify.com/v1/artists/2yEwvVSSSUkcLeSTNyHKh8\\\",\\n \\\"id\\\" : \\\"2yEwvVSSSUkcLeSTNyHKh8\\\",\\n \\\"name\\\" : \\\"TOOL\\\",\\n \\\"type\\\" : \\\"artist\\\",\\n \\\"uri\\\" : \\\"spotify:artist:2yEwvVSSSUkcLeSTNyHKh8\\\"\\n } ],\\n \\\"available_markets\\\" : [ \\\"AD\\\", \\\"AE\\\", \\\"AG\\\", \\\"AL\\\", \\\"AM\\\", \\\"AO\\\", \\\"AR\\\", \\\"AT\\\", \\\"AU\\\", \\\"AZ\\\", \\\"BA\\\", \\\"BB\\\", \\\"BD\\\", \\\"BE\\\", \\\"BF\\\", \\\"BG\\\", \\\"BH\\\", \\\"BI\\\", \\\"BJ\\\", \\\"BN\\\", \\\"BO\\\", \\\"BR\\\", \\\"BS\\\", \\\"BT\\\", \\\"BW\\\", \\\"BY\\\", \\\"BZ\\\", \\\"CA\\\", \\\"CD\\\", \\\"CG\\\", \\\"CH\\\", \\\"CI\\\", \\\"CL\\\", \\\"CM\\\", \\\"CO\\\", \\\"CR\\\", \\\"CV\\\", \\\"CW\\\", \\\"CY\\\", \\\"CZ\\\", \\\"DE\\\", \\\"DJ\\\", \\\"DK\\\", \\\"DM\\\", \\\"DO\\\", \\\"DZ\\\", \\\"EC\\\", \\\"EE\\\", \\\"EG\\\", \\\"ES\\\", \\\"FI\\\", \\\"FJ\\\", \\\"FM\\\", \\\"FR\\\", \\\"GA\\\", \\\"GB\\\", \\\"GD\\\", \\\"GE\\\", \\\"GH\\\", \\\"GM\\\", \\\"GN\\\", \\\"GQ\\\", \\\"GR\\\", \\\"GT\\\", \\\"GW\\\", \\\"GY\\\", \\\"HK\\\", \\\"HN\\\", \\\"HR\\\", \\\"HT\\\", \\\"HU\\\", \\\"ID\\\", \\\"IE\\\", \\\"IL\\\", \\\"IN\\\", \\\"IQ\\\", \\\"IS\\\", \\\"IT\\\", \\\"JM\\\", \\\"JO\\\", \\\"JP\\\", \\\"KE\\\", \\\"KG\\\", \\\"KH\\\", \\\"KI\\\", \\\"KM\\\", \\\"KN\\\", \\\"KR\\\", \\\"KW\\\", \\\"KZ\\\", \\\"LA\\\", \\\"LB\\\", \\\"LC\\\", \\\"LI\\\", \\\"LK\\\", \\\"LR\\\", \\\"LS\\\", \\\"LT\\\", \\\"LU\\\", \\\"LV\\\", \\\"LY\\\", \\\"MA\\\", \\\"MC\\\", \\\"MD\\\", \\\"ME\\\", \\\"MG\\\", \\\"MH\\\", \\\"MK\\\", \\\"ML\\\", \\\"MN\\\", \\\"MO\\\", \\\"MR\\\", \\\"MT\\\", \\\"MU\\\", \\\"MV\\\", \\\"MW\\\", \\\"MX\\\", \\\"MY\\\", \\\"MZ\\\", \\\"NA\\\", \\\"NE\\\", \\\"NG\\\", \\\"NI\\\", \\\"NL\\\", \\\"NO\\\", \\\"NP\\\", \\\"NR\\\", \\\"NZ\\\", \\\"OM\\\", \\\"PA\\\", \\\"PE\\\", \\\"PG\\\", \\\"PH\\\", \\\"PK\\\", \\\"PL\\\", \\\"PS\\\", \\\"PT\\\", \\\"PW\\\", \\\"PY\\\", \\\"QA\\\", \\\"RO\\\", \\\"RS\\\", \\\"RU\\\", \\\"RW\\\", \\\"SA\\\", \\\"SB\\\", \\\"SC\\\", \\\"SE\\\", \\\"SG\\\", \\\"SI\\\", \\\"SK\\\", \\\"SL\\\", \\\"SM\\\", \\\"SN\\\", \\\"SR\\\", \\\"ST\\\", \\\"SV\\\", \\\"SZ\\\", \\\"TD\\\", \\\"TG\\\", \\\"TH\\\", \\\"TJ\\\", \\\"TL\\\", \\\"TN\\\", \\\"TO\\\", \\\"TR\\\", \\\"TT\\\", \\\"TV\\\", \\\"TW\\\", \\\"TZ\\\", \\\"UA\\\", \\\"UG\\\", \\\"US\\\", \\\"UY\\\", \\\"UZ\\\", \\\"VC\\\", \\\"VE\\\", \\\"VN\\\", \\\"VU\\\", \\\"WS\\\", \\\"XK\\\", \\\"ZA\\\", \\\"ZM\\\", \\\"ZW\\\" ],\\n \\\"external_urls\\\" : {\\n \\\"spotify\\\" : \\\"https://open.spotify.com/album/3Esn6LoXuWtLZNYq8FCzr0\\\"\\n },\\n \\\"href\\\" : \\\"https://api.spotify.com/v1/albums/3Esn6LoXuWtLZNYq8FCzr0\\\",\\n \\\"id\\\" : \\\"3Esn6LoXuWtLZNYq8FCzr0\\\",\\n \\\"images\\\" : [ {\\n \\\"height\\\" : 640,\\n \\\"url\\\" : \\\"https://i.scdn.co/image/ab67616d0000b27382298636c94b8167c4793db2\\\",\\n \\\"width\\\" : 640\\n }, {\\n \\\"height\\\" : 300,\\n \\\"url\\\" : \\\"https://i.scdn.co/image/ab67616d00001e0282298636c94b8167c4793db2\\\",\\n \\\"width\\\" : 300\\n }, {\\n \\\"height\\\" : 64,\\n \\\"url\\\" : \\\"https://i.scdn.co/image/ab67616d0000485182298636c94b8167c4793db2\\\",\\n \\\"width\\\" : 64\\n } ],\\n \\\"name\\\" : \\\"Undertow\\\",\\n \\\"release_date\\\" : \\\"1993-04-06\\\",\\n \\\"release_date_precision\\\" : \\\"day\\\",\\n \\\"total_tracks\\\" : 10,\\n \\\"type\\\" : \\\"album\\\",\\n \\\"uri\\\" : \\\"spotify:album:3Esn6LoXuWtLZNYq8FCzr0\\\"\\n },\\n \\\"artists\\\" : [ {\\n \\\"external_urls\\\" : {\\n \\\"spotify\\\" : \\\"https://open.spotify.com/artist/2yEwvVSSSUkcLeSTNyHKh8\\\"\\n },\\n \\\"href\\\" : \\\"https://api.spotify.com/v1/artists/2yEwvVSSSUkcLeSTNyHKh8\\\",\\n \\\"id\\\" : \\\"2yEwvVSSSUkcLeSTNyHKh8\\\",\\n \\\"name\\\" : \\\"TOOL\\\",\\n \\\"type\\\" : \\\"artist\\\",\\n \\\"uri\\\" : \\\"spotify:artist:2yEwvVSSSUkcLeSTNyHKh8\\\"\\n } ],\\n \\\"available_markets\\\" : [ \\\"AD\\\", \\\"AE\\\", \\\"AG\\\", \\\"AL\\\", \\\"AM\\\", \\\"AO\\\", \\\"AR\\\", \\\"AT\\\", \\\"AU\\\", \\\"AZ\\\", \\\"BA\\\", \\\"BB\\\", \\\"BD\\\", \\\"BE\\\", \\\"BF\\\", \\\"BG\\\", \\\"BH\\\", \\\"BI\\\", \\\"BJ\\\", \\\"BN\\\", \\\"BO\\\", \\\"BR\\\", \\\"BS\\\", \\\"BT\\\", \\\"BW\\\", \\\"BY\\\", \\\"BZ\\\", \\\"CA\\\", \\\"CD\\\", \\\"CG\\\", \\\"CH\\\", \\\"CI\\\", \\\"CL\\\", \\\"CM\\\", \\\"CO\\\", \\\"CR\\\", \\\"CV\\\", \\\"CW\\\", \\\"CY\\\", \\\"CZ\\\", \\\"DE\\\", \\\"DJ\\\", \\\"DK\\\", \\\"DM\\\", \\\"DO\\\", \\\"DZ\\\", \\\"EC\\\", \\\"EE\\\", \\\"EG\\\", \\\"ES\\\", \\\"FI\\\", \\\"FJ\\\", \\\"FM\\\", \\\"FR\\\", \\\"GA\\\", \\\"GB\\\", \\\"GD\\\", \\\"GE\\\", \\\"GH\\\", \\\"GM\\\", \\\"GN\\\", \\\"GQ\\\", \\\"GR\\\", \\\"GT\\\", \\\"GW\\\", \\\"GY\\\", \\\"HK\\\", \\\"HN\\\", \\\"HR\\\", \\\"HT\\\", \\\"HU\\\", \\\"ID\\\", \\\"IE\\\", \\\"IL\\\", \\\"IN\\\", \\\"IQ\\\", \\\"IS\\\", \\\"IT\\\", \\\"JM\\\", \\\"JO\\\", \\\"JP\\\", \\\"KE\\\", \\\"KG\\\", \\\"KH\\\", \\\"KI\\\", \\\"KM\\\", \\\"KN\\\", \\\"KR\\\", \\\"KW\\\", \\\"KZ\\\", \\\"LA\\\", \\\"LB\\\", \\\"LC\\\", \\\"LI\\\", \\\"LK\\\", \\\"LR\\\", \\\"LS\\\", \\\"LT\\\", \\\"LU\\\", \\\"LV\\\", \\\"LY\\\", \\\"MA\\\", \\\"MC\\\", \\\"MD\\\", \\\"ME\\\", \\\"MG\\\", \\\"MH\\\", \\\"MK\\\", \\\"ML\\\", \\\"MN\\\", \\\"MO\\\", \\\"MR\\\", \\\"MT\\\", \\\"MU\\\", \\\"MV\\\", \\\"MW\\\", \\\"MX\\\", \\\"MY\\\", \\\"MZ\\\", \\\"NA\\\", \\\"NE\\\", \\\"NG\\\", \\\"NI\\\", \\\"NL\\\", \\\"NO\\\", \\\"NP\\\", \\\"NR\\\", \\\"NZ\\\", \\\"OM\\\", \\\"PA\\\", \\\"PE\\\", \\\"PG\\\", \\\"PH\\\", \\\"PK\\\", \\\"PL\\\", \\\"PS\\\", \\\"PT\\\", \\\"PW\\\", \\\"PY\\\", \\\"QA\\\", \\\"RO\\\", \\\"RS\\\", \\\"RU\\\", \\\"RW\\\", \\\"SA\\\", \\\"SB\\\", \\\"SC\\\", \\\"SE\\\", \\\"SG\\\", \\\"SI\\\", \\\"SK\\\", \\\"SL\\\", \\\"SM\\\", \\\"SN\\\", \\\"SR\\\", \\\"ST\\\", \\\"SV\\\", \\\"SZ\\\", \\\"TD\\\", \\\"TG\\\", \\\"TH\\\", \\\"TJ\\\", \\\"TL\\\", \\\"TN\\\", \\\"TO\\\", \\\"TR\\\", \\\"TT\\\", \\\"TV\\\", \\\"TW\\\", \\\"TZ\\\", \\\"UA\\\", \\\"UG\\\", \\\"US\\\", \\\"UY\\\", \\\"UZ\\\", \\\"VC\\\", \\\"VE\\\", \\\"VN\\\", \\\"VU\\\", \\\"WS\\\", \\\"XK\\\", \\\"ZA\\\", \\\"ZM\\\", \\\"ZW\\\" ],\\n \\\"disc_number\\\" : 1,\\n \\\"duration_ms\\\" : 306853,\\n \\\"explicit\\\" : true,\\n \\\"external_ids\\\" : {\\n \\\"isrc\\\" : \\\"USVR10000011\\\"\\n },\\n \\\"external_urls\\\" : {\\n \\\"spotify\\\" : \\\"https://open.spotify.com/track/6DyywdbmTzlmXBzG9ym7Rt\\\"\\n },\\n \\\"href\\\" : \\\"https://api.spotify.com/v1/tracks/6DyywdbmTzlmXBzG9ym7Rt\\\",\\n \\\"id\\\" : \\\"6DyywdbmTzlmXBzG9ym7Rt\\\",\\n \\\"is_local\\\" : false,\\n \\\"name\\\" : \\\"Sober\\\",\\n \\\"popularity\\\" : 72,\\n \\\"preview_url\\\" : \\\"https://p.scdn.co/mp3-preview/fcf02adecaf0323f95c30427b29fbb6d8a90515d?cid=14e48d315bb649dba1a37ce4c764f58c\\\",\\n \\\"track_number\\\" : 3,\\n \\\"type\\\" : \\\"track\\\",\\n \\\"uri\\\" : \\\"spotify:track:6DyywdbmTzlmXBzG9ym7Rt\\\"\\n },\\n \\\"currently_playing_type\\\" : \\\"track\\\",\\n \\\"actions\\\" : {\\n \\\"disallows\\\" : {\\n \\\"toggling_repeat_track\\\" : true\\n }\\n },\\n \\\"is_playing\\\" : true\\n}\"]" })
Compilation flags
- [x] dbus_mpris
- [x] dbus_keyring
- [x] alsa_backend
- [ ] portaudio_backend
- [ ] pulseaudio_backend
- [ ] rodio_backend
Versions:
- OS: Raspberry Pi OS
- Spotifyd: ae6dac7a54f899316674ba57ce4a0f9890cd2b1c and 603bcc4d802d2b8f45ac517c0513eb4096252d7b
- cargo: 1.46.0
Yeah that is indeed a change in the Spotify API. @NNEU-1 has written a comment that explains this further here. So to fix this, we basically need an update of the rspotify crate in spotifyd.
is anything being done about this?
@wael444 I started working on updating the crate. However, there were quite some changes between 0.8.0 and 0.11.5, so it is not too easy. I'll push a WIP PR later, but it still needs some work.
seems to be resolved with the latest commits when building it by myself
@Exceen which "latest commits" are you referring to, because I have built it with the latest master branch and I still have the issue.
sorry my bad, I did this a few weeks ago and wanted to close this issue. I thought those commits were merged already
I built it from this pull request https://github.com/Spotifyd/spotifyd/pull/1079/commits/12309ba4e1d8f06a157c27260d920d85c8b9d4ab
git fetch origin pull/1079/head:rspotify_upgrade
This should be fixed on master now.