[GH-ISSUE #1046] Autoplay failing to get attribute #492

Closed
opened 2026-02-27 19:30:57 +03:00 by kerem · 8 comments
Owner

Originally created by @musshorn on GitHub (Aug 18, 2022).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1046

Describe the bug
Autoplay fails with the warning WARN librespot_connect::spirc] Unable to get autoplay user attribute. Continuing with autoplay disabled. but it's enabled in the windows desktop UI
image

To reproduce
Steps to reproduce the behavior:

  1. Play the last song in a playlist, observe the following warning.

Log

[2022-08-18T10:22:28Z DEBUG librespot_connect::spirc] At track 12 of 11 <"spotify:playlist:7t5BQs06tsKXCXUCAouxYc"> update [true]
[2022-08-18T10:22:28Z WARN  librespot_connect::spirc] Unable to get autoplay user attribute. Continuing with autoplay disabled.
[2022-08-18T10:22:28Z DEBUG librespot_connect::spirc] Looping around back to start, repeat is false
[2022-08-18T10:22:28Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause]
[2022-08-18T10:22:28Z DEBUG librespot_playback::player] command=Load(SpotifyId("spotify:track:5rQriQOlPspqLyO38OYBUM"), false, 0)
[2022-08-18T10:22:28Z TRACE librespot_playback::player] == Stopping sink ==
[2022-08-18T10:22:29Z TRACE librespot_connect::spirc] ==> kPlayStatusPause
[2022-08-18T10:22:29Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause]

Host (what you are running librespot on):

  • OS: Linux
  • Platform: Rpi 4b
  • librespot 0.5.0-dev 27e1274 (Built on 2022-08-18, Build ID: SbfdVjDd, Profile: release)

Additional context
Looks like it's almost certainly related to the new-api efforts, but I'm not familiar enough with rust to debug it further.

Originally created by @musshorn on GitHub (Aug 18, 2022). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1046 **Describe the bug** Autoplay fails with the warning `WARN librespot_connect::spirc] Unable to get autoplay user attribute. Continuing with autoplay disabled.` but it's enabled in the windows desktop UI ![image](https://user-images.githubusercontent.com/874740/185354061-148dbe2e-ef96-4af0-80a5-48a2326fb757.png) **To reproduce** Steps to reproduce the behavior: 1. Play the last song in a playlist, observe the following warning. **Log** ``` [2022-08-18T10:22:28Z DEBUG librespot_connect::spirc] At track 12 of 11 <"spotify:playlist:7t5BQs06tsKXCXUCAouxYc"> update [true] [2022-08-18T10:22:28Z WARN librespot_connect::spirc] Unable to get autoplay user attribute. Continuing with autoplay disabled. [2022-08-18T10:22:28Z DEBUG librespot_connect::spirc] Looping around back to start, repeat is false [2022-08-18T10:22:28Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] [2022-08-18T10:22:28Z DEBUG librespot_playback::player] command=Load(SpotifyId("spotify:track:5rQriQOlPspqLyO38OYBUM"), false, 0) [2022-08-18T10:22:28Z TRACE librespot_playback::player] == Stopping sink == [2022-08-18T10:22:29Z TRACE librespot_connect::spirc] ==> kPlayStatusPause [2022-08-18T10:22:29Z TRACE librespot_connect::spirc] Sending status to server: [kPlayStatusPause] ``` **Host (what you are running `librespot` on):** - OS: Linux - Platform: Rpi 4b - librespot 0.5.0-dev 27e1274 (Built on 2022-08-18, Build ID: SbfdVjDd, Profile: release) **Additional context** Looks like it's almost certainly related to the new-api efforts, but I'm not familiar enough with rust to debug it further.
kerem 2026-02-27 19:30:57 +03:00
Author
Owner

@roderickvd commented on GitHub (Aug 18, 2022):

Can you please post the full debug log, right from the start, including all messages from the initial login?

<!-- gh-comment-id:1219391177 --> @roderickvd commented on GitHub (Aug 18, 2022): Can you please post the full debug log, right from the start, including all messages from the initial login?
Author
Owner

@musshorn commented on GitHub (Aug 19, 2022):

Certainly!

librespot.log

Not sure if this is a factor but when I was recording that log, the first run it worked (as in the next song autoplayed) it was only after i added the --onevent flag it stopped working. It continued to fail though even when I removed the flag again.

<!-- gh-comment-id:1220336393 --> @musshorn commented on GitHub (Aug 19, 2022): Certainly! [librespot.log](https://github.com/librespot-org/librespot/files/9379929/librespot.log) Not sure if this is a factor but when I was recording that log, the first run it worked (as in the next song autoplayed) it was only after i added the `--onevent` flag it stopped working. It continued to fail though even when I removed the flag again.
Author
Owner

@roderickvd commented on GitHub (Aug 20, 2022):

That’s interesting. When you toggle the autoplay switch in the client while playing in librespot, what do the logs then say?

<!-- gh-comment-id:1221260921 --> @roderickvd commented on GitHub (Aug 20, 2022): That’s interesting. When you toggle the autoplay switch in the client while playing in `librespot`, what do the logs then say?
Author
Owner

@musshorn commented on GitHub (Aug 21, 2022):

I've attached a full log, but this appears to be the only message when I toggle autoplay in the client
[2022-08-21T02:09:20Z TRACE librespot_connect::spirc] Received attribute mutation for autoplay but key was not found!

librespot.log

I was toggling it before the song ended as well as after

<!-- gh-comment-id:1221451258 --> @musshorn commented on GitHub (Aug 21, 2022): I've attached a full log, but this appears to be the only message when I toggle autoplay in the client `[2022-08-21T02:09:20Z TRACE librespot_connect::spirc] Received attribute mutation for autoplay but key was not found!` [librespot.log](https://github.com/librespot-org/librespot/files/9388294/librespot.log) I was toggling it before the song ended as well as after
Author
Owner

@roderickvd commented on GitHub (Aug 22, 2022):

It's really interesting that apparently, Spotify is not consistent in sending the same product info on login. In your case, you are not being pushed an autoplay property, which myself I do get consistently, at least from The Netherlands. We need to know the initial state, because the mutation message doesn't send a new value, just signals the fact that it's being toggled.

I don't see any other property either that could replace it.

It seems that you have blocked apresolve.spotify.com, correct? Could you try what happens if you unblock it, so that you don't use a fallback access point?

This brings me to a couple of thoughts:

  1. Can anyone verify from other countries or access points?
  2. Does anyone see some alternative way of getting the initial state?
  3. We might need to re-introduce an --autoplay {auto|on|off} command line option to allow for an override.
<!-- gh-comment-id:1222962037 --> @roderickvd commented on GitHub (Aug 22, 2022): It's really interesting that apparently, Spotify is not consistent in sending the same product info on login. In your case, you are not being pushed an `autoplay` property, which myself I do get consistently, at least from The Netherlands. We need to know the initial state, because the mutation message doesn't send a new value, just signals the fact that it's being toggled. I don't see any other property either that could replace it. It seems that you have blocked `apresolve.spotify.com`, correct? Could you try what happens if you unblock it, so that you don't use a fallback access point? This brings me to a couple of thoughts: 1. Can anyone verify from other countries or access points? 2. Does anyone see some alternative way of getting the initial state? 3. We might need to re-introduce an `--autoplay {auto|on|off}` command line option to allow for an override.
Author
Owner

@musshorn commented on GitHub (Aug 23, 2022):

Bizzare.

I've attached a log with the apresolve.spotify.com block removed, still fails the same way. I'd initially blocked that as I was having the same issue as #972 but I just saw your comment that it's no longer required.
librespot.log

<!-- gh-comment-id:1223716623 --> @musshorn commented on GitHub (Aug 23, 2022): Bizzare. I've attached a log with the `apresolve.spotify.com` block removed, still fails the same way. I'd initially blocked that as I was having the same issue as #972 but I just saw your comment that it's no longer required. [librespot.log](https://github.com/librespot-org/librespot/files/9400420/librespot.log)
Author
Owner

@roderickvd commented on GitHub (Sep 28, 2022):

This should now be fixed in 6dc7a11b09 which re-introduces an autoplay command-line option as a manual override.

<!-- gh-comment-id:1261460530 --> @roderickvd commented on GitHub (Sep 28, 2022): This should now be fixed in 6dc7a11b09b5eea8f333805374ce0b45757e9539 which re-introduces an `autoplay` command-line option as a manual override.
Author
Owner

@musshorn commented on GitHub (Sep 29, 2022):

Confirmed that's working a treat! Thanks for the fix

<!-- gh-comment-id:1262798523 --> @musshorn commented on GitHub (Sep 29, 2022): Confirmed that's working a treat! Thanks for the fix
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#492
No description provided.