[GH-ISSUE #206] Error: "invalid status code from context resolve autoplay: 204" #134

Closed
opened 2026-02-28 14:25:40 +03:00 by kerem · 4 comments
Owner

Originally created by @leodurandfr on GitHub (Sep 12, 2025).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/206

Hello 👋

Sometimes I get this error while using go-librespot: invalid status code from context resolve autoplay: 204. When this happens, the current track finishes playing and then playback stays paused.
I'm not sure if this is an expected behavior or a bug in go-librespot.
Just in case, here are the logs when the error occurs:


Sep 12 11:09:08 milo milo-go-librespot[385158]: time="2025-09-12T11:09:08+02:00" level=info msg="loaded track \"Onze\" (paused: false, position: 0ms, duration: 166620ms, prefetched: true)" uri="spotify:track:0GTtsPEsu9Mr2X125jHKRj"

Sep 12 11:11:55 milo milo-go-librespot[385158]: time="2025-09-12T11:11:55+02:00" level=error msg="failed going to next track" error="failed moving to next index 50 (page 1): failed fetching next page: invalid status code from page at radio-apollo/v3/tracks/spotify:station:album:3L28ldah7yyqnF8H69Pf0K?salt=909407&autoplay=false&count=50&isVideo=false&prev_tracks=3zyaLUK2HeTIxNC94sZT18,15ExPgkiC9SZ7p8A9oRX0B,7rRdDr0GfAMqe7SW2eTZwW,7LHOy1M05FGAaFEODpDgjH,7Jvo8aI1DcFWhgXIAxeAZ4,1lprI0YPsf1eiUFGfs8o0v,1piwxmB8YelJmJfXBBiVCb,1H1daGMtE662k2621dQiiv,6pI86cs0yWDFWIylFAsDZ2,4eLZxkwDP4RRU0Ny5BijhG,7hlxoJXexx3IgQUQI7HmH8,6WK5F4PdC55I6gsEvygQhT,1sCPGwWg8yqLE3E6hiihUe,4KUaf1EKWp9YsNMJlH6PcE,6vDNhro3HW6xEbtSvp1ZJ5,5cUwNdO0hLb7d2ustswCK2,2dCSybZtOGTlXKnOu7EsUT,20ASH9BjT45osxbjFBrWeY,2Rr0pIJpmLvDYUsOeMU28O,1m2CWZROldeH6BscxSCypN,712cCUL7oIMdyQOWJRY02o,3w2q61jD2tV4Y5VgR7idHS,27jQ2ok7oxDKT0AQV7c32l,1FSPrqmbgCxKT9VXYFVLKN,2df5EnYpqSVcGSsvyWlmXt,3aoGepSHtgHJdQJKomIvgz,63t6iBRheH3TXQqcnW9b1r,6ayhjWpsLMHKSv5bCntwkK,2hOflZqusxXXqllQY9vqdB,5Rvc5sH7oPXDtGDHHGI2P6,6bSGkogT0BdVDrY2v1rctS,0MdP44G2FU6YQQJbwi6xp7,4kMouaBAvu971gkkU9Hmb6,55gmyJeXjvblcJfheIlSWY,5WPynvBkUEDZeuIDxgAGAK,1T3EMckHaJb5Yh2UVD9DJt,3ovzms5fWVT3cayO5fGZN4,38znvDnLqYKbHoDxS4nSyi,7adGi7sRcpjFL0qQXORDVL,1CuTvQUwNBjbfOaFigqUBP,6re842omtL4FSVWBc2tUpX,7cVEIuWVPczsqgzLUHqrxX,5YizjXSFOekBdyA8IgKWp8,4nxok3RYPu51lAQxtv3Kos,4hBgGywRo6cpyzW0ZqFQPl,6IgRVlvSxPm3KAoLu2rz1t,1Qhe0zLCBMhZM2ZHhClups,1sLewGZ4nfgTmOccvb3wzF,40Ho132fvlyFAMrT6La2GH,0GTtsPEsu9Mr2X125jHKRj&minimal=true: 502" uri="spotify:station:album:3L28ldah7yyqnF8H69Pf0K"

Sep 12 11:11:55 milo milo-go-librespot[385158]: time="2025-09-12T11:11:55+02:00" level=error msg="failed fetching all tracks" error="failed moving to next index 50 (page 1): failed fetching next page: invalid status code from page at radio-apollo/v3/tracks/spotify:station:album:3L28ldah7yyqnF8H69Pf0K?salt=909407&autoplay=false&count=50&isVideo=false&prev_tracks=3zyaLUK2HeTIxNC94sZT18,15ExPgkiC9SZ7p8A9oRX0B,7rRdDr0GfAMqe7SW2eTZwW,7LHOy1M05FGAaFEODpDgjH,7Jvo8aI1DcFWhgXIAxeAZ4,1lprI0YPsf1eiUFGfs8o0v,1piwxmB8YelJmJfXBBiVCb,1H1daGMtE662k2621dQiiv,6pI86cs0yWDFWIylFAsDZ2,4eLZxkwDP4RRU0Ny5BijhG,7hlxoJXexx3IgQUQI7HmH8,6WK5F4PdC55I6gsEvygQhT,1sCPGwWg8yqLE3E6hiihUe,4KUaf1EKWp9YsNMJlH6PcE,6vDNhro3HW6xEbtSvp1ZJ5,5cUwNdO0hLb7d2ustswCK2,2dCSybZtOGTlXKnOu7EsUT,20ASH9BjT45osxbjFBrWeY,2Rr0pIJpmLvDYUsOeMU28O,1m2CWZROldeH6BscxSCypN,712cCUL7oIMdyQOWJRY02o,3w2q61jD2tV4Y5VgR7idHS,27jQ2ok7oxDKT0AQV7c32l,1FSPrqmbgCxKT9VXYFVLKN,2df5EnYpqSVcGSsvyWlmXt,3aoGepSHtgHJdQJKomIvgz,63t6iBRheH3TXQqcnW9b1r,6ayhjWpsLMHKSv5bCntwkK,2hOflZqusxXXqllQY9vqdB,5Rvc5sH7oPXDtGDHHGI2P6,6bSGkogT0BdVDrY2v1rctS,0MdP44G2FU6YQQJbwi6xp7,4kMouaBAvu971gkkU9Hmb6,55gmyJeXjvblcJfheIlSWY,5WPynvBkUEDZeuIDxgAGAK,1T3EMckHaJb5Yh2UVD9DJt,3ovzms5fWVT3cayO5fGZN4,38znvDnLqYKbHoDxS4nSyi,7adGi7sRcpjFL0qQXORDVL,1CuTvQUwNBjbfOaFigqUBP,6re842omtL4FSVWBc2tUpX,7cVEIuWVPczsqgzLUHqrxX,5YizjXSFOekBdyA8IgKWp8,4nxok3RYPu51lAQxtv3Kos,4hBgGywRo6cpyzW0ZqFQPl,6IgRVlvSxPm3KAoLu2rz1t,1Qhe0zLCBMhZM2ZHhClups,1sLewGZ4nfgTmOccvb3wzF,40Ho132fvlyFAMrT6La2GH,0GTtsPEsu9Mr2X125jHKRj&minimal=true: 502" uri="spotify:station:album:3L28ldah7yyqnF8H69Pf0K"

Sep 12 11:11:55 milo milo-go-librespot[385158]: time="2025-09-12T11:11:55+02:00" level=warning msg="failed resolving station for spotify:station:album:3L28ldah7yyqnF8H69Pf0K" error="invalid status code from context resolve autoplay: 204"

Originally created by @leodurandfr on GitHub (Sep 12, 2025). Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/206 Hello 👋 Sometimes I get this error while using go-librespot: `invalid status code from context resolve autoplay: 204`. When this happens, the current track finishes playing and then playback stays paused. I'm not sure if this is an expected behavior or a bug in go-librespot. Just in case, here are the logs when the error occurs: ``` Sep 12 11:09:08 milo milo-go-librespot[385158]: time="2025-09-12T11:09:08+02:00" level=info msg="loaded track \"Onze\" (paused: false, position: 0ms, duration: 166620ms, prefetched: true)" uri="spotify:track:0GTtsPEsu9Mr2X125jHKRj" Sep 12 11:11:55 milo milo-go-librespot[385158]: time="2025-09-12T11:11:55+02:00" level=error msg="failed going to next track" error="failed moving to next index 50 (page 1): failed fetching next page: invalid status code from page at radio-apollo/v3/tracks/spotify:station:album:3L28ldah7yyqnF8H69Pf0K?salt=909407&autoplay=false&count=50&isVideo=false&prev_tracks=3zyaLUK2HeTIxNC94sZT18,15ExPgkiC9SZ7p8A9oRX0B,7rRdDr0GfAMqe7SW2eTZwW,7LHOy1M05FGAaFEODpDgjH,7Jvo8aI1DcFWhgXIAxeAZ4,1lprI0YPsf1eiUFGfs8o0v,1piwxmB8YelJmJfXBBiVCb,1H1daGMtE662k2621dQiiv,6pI86cs0yWDFWIylFAsDZ2,4eLZxkwDP4RRU0Ny5BijhG,7hlxoJXexx3IgQUQI7HmH8,6WK5F4PdC55I6gsEvygQhT,1sCPGwWg8yqLE3E6hiihUe,4KUaf1EKWp9YsNMJlH6PcE,6vDNhro3HW6xEbtSvp1ZJ5,5cUwNdO0hLb7d2ustswCK2,2dCSybZtOGTlXKnOu7EsUT,20ASH9BjT45osxbjFBrWeY,2Rr0pIJpmLvDYUsOeMU28O,1m2CWZROldeH6BscxSCypN,712cCUL7oIMdyQOWJRY02o,3w2q61jD2tV4Y5VgR7idHS,27jQ2ok7oxDKT0AQV7c32l,1FSPrqmbgCxKT9VXYFVLKN,2df5EnYpqSVcGSsvyWlmXt,3aoGepSHtgHJdQJKomIvgz,63t6iBRheH3TXQqcnW9b1r,6ayhjWpsLMHKSv5bCntwkK,2hOflZqusxXXqllQY9vqdB,5Rvc5sH7oPXDtGDHHGI2P6,6bSGkogT0BdVDrY2v1rctS,0MdP44G2FU6YQQJbwi6xp7,4kMouaBAvu971gkkU9Hmb6,55gmyJeXjvblcJfheIlSWY,5WPynvBkUEDZeuIDxgAGAK,1T3EMckHaJb5Yh2UVD9DJt,3ovzms5fWVT3cayO5fGZN4,38znvDnLqYKbHoDxS4nSyi,7adGi7sRcpjFL0qQXORDVL,1CuTvQUwNBjbfOaFigqUBP,6re842omtL4FSVWBc2tUpX,7cVEIuWVPczsqgzLUHqrxX,5YizjXSFOekBdyA8IgKWp8,4nxok3RYPu51lAQxtv3Kos,4hBgGywRo6cpyzW0ZqFQPl,6IgRVlvSxPm3KAoLu2rz1t,1Qhe0zLCBMhZM2ZHhClups,1sLewGZ4nfgTmOccvb3wzF,40Ho132fvlyFAMrT6La2GH,0GTtsPEsu9Mr2X125jHKRj&minimal=true: 502" uri="spotify:station:album:3L28ldah7yyqnF8H69Pf0K" Sep 12 11:11:55 milo milo-go-librespot[385158]: time="2025-09-12T11:11:55+02:00" level=error msg="failed fetching all tracks" error="failed moving to next index 50 (page 1): failed fetching next page: invalid status code from page at radio-apollo/v3/tracks/spotify:station:album:3L28ldah7yyqnF8H69Pf0K?salt=909407&autoplay=false&count=50&isVideo=false&prev_tracks=3zyaLUK2HeTIxNC94sZT18,15ExPgkiC9SZ7p8A9oRX0B,7rRdDr0GfAMqe7SW2eTZwW,7LHOy1M05FGAaFEODpDgjH,7Jvo8aI1DcFWhgXIAxeAZ4,1lprI0YPsf1eiUFGfs8o0v,1piwxmB8YelJmJfXBBiVCb,1H1daGMtE662k2621dQiiv,6pI86cs0yWDFWIylFAsDZ2,4eLZxkwDP4RRU0Ny5BijhG,7hlxoJXexx3IgQUQI7HmH8,6WK5F4PdC55I6gsEvygQhT,1sCPGwWg8yqLE3E6hiihUe,4KUaf1EKWp9YsNMJlH6PcE,6vDNhro3HW6xEbtSvp1ZJ5,5cUwNdO0hLb7d2ustswCK2,2dCSybZtOGTlXKnOu7EsUT,20ASH9BjT45osxbjFBrWeY,2Rr0pIJpmLvDYUsOeMU28O,1m2CWZROldeH6BscxSCypN,712cCUL7oIMdyQOWJRY02o,3w2q61jD2tV4Y5VgR7idHS,27jQ2ok7oxDKT0AQV7c32l,1FSPrqmbgCxKT9VXYFVLKN,2df5EnYpqSVcGSsvyWlmXt,3aoGepSHtgHJdQJKomIvgz,63t6iBRheH3TXQqcnW9b1r,6ayhjWpsLMHKSv5bCntwkK,2hOflZqusxXXqllQY9vqdB,5Rvc5sH7oPXDtGDHHGI2P6,6bSGkogT0BdVDrY2v1rctS,0MdP44G2FU6YQQJbwi6xp7,4kMouaBAvu971gkkU9Hmb6,55gmyJeXjvblcJfheIlSWY,5WPynvBkUEDZeuIDxgAGAK,1T3EMckHaJb5Yh2UVD9DJt,3ovzms5fWVT3cayO5fGZN4,38znvDnLqYKbHoDxS4nSyi,7adGi7sRcpjFL0qQXORDVL,1CuTvQUwNBjbfOaFigqUBP,6re842omtL4FSVWBc2tUpX,7cVEIuWVPczsqgzLUHqrxX,5YizjXSFOekBdyA8IgKWp8,4nxok3RYPu51lAQxtv3Kos,4hBgGywRo6cpyzW0ZqFQPl,6IgRVlvSxPm3KAoLu2rz1t,1Qhe0zLCBMhZM2ZHhClups,1sLewGZ4nfgTmOccvb3wzF,40Ho132fvlyFAMrT6La2GH,0GTtsPEsu9Mr2X125jHKRj&minimal=true: 502" uri="spotify:station:album:3L28ldah7yyqnF8H69Pf0K" Sep 12 11:11:55 milo milo-go-librespot[385158]: time="2025-09-12T11:11:55+02:00" level=warning msg="failed resolving station for spotify:station:album:3L28ldah7yyqnF8H69Pf0K" error="invalid status code from context resolve autoplay: 204" ```
kerem 2026-02-28 14:25:40 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@devgianlu commented on GitHub (Sep 12, 2025):

There's a couple of things going on here:

  • Spotify fails to give us the next page for spotify:station:album:3L28ldah7yyqnF8H69Pf0K with 502
  • go-librespot assumes the context is ended and tries to fetch a station from a station
  • You cannot get a station of a station so you get 204 (No Content) which feels intended

Perhaps, it should be enough to retry the "next page" request? Is this reproducible systematically or just random?

<!-- gh-comment-id:3286076158 --> @devgianlu commented on GitHub (Sep 12, 2025): There's a couple of things going on here: - Spotify fails to give us the next page for `spotify:station:album:3L28ldah7yyqnF8H69Pf0K` with 502 - go-librespot assumes the context is ended and tries to fetch a station from a station - You cannot get a station of a station so you get 204 (No Content) which feels intended Perhaps, it should be enough to retry the "next page" request? Is this reproducible systematically or just random?
Author
Owner

@leodurandfr commented on GitHub (Sep 14, 2025):

When this issue happened, I was able to resume playback by sending a "/player/next" command through the go-librespot API.

I tried to reproduce the problem, but I couldn’t manage to trigger it again. For example, I played the last track of an album to see if it would stop or start a new queue, but playback continued normally. However, this is not the first time I’ve seen the issue occur.

<!-- gh-comment-id:3289380716 --> @leodurandfr commented on GitHub (Sep 14, 2025): When this issue happened, I was able to resume playback by sending a "/player/next" command through the go-librespot API. I tried to reproduce the problem, but I couldn’t manage to trigger it again. For example, I played the last track of an album to see if it would stop or start a new queue, but playback continued normally. However, this is not the first time I’ve seen the issue occur.
Author
Owner

@szygmunt commented on GitHub (Sep 14, 2025):

Are you using the latest version of go-librespot? Regarding the 204 error, it looks like an autoplay issue to me. The client’s behavior somewhat resembles this: https://github.com/devgianlu/go-librespot/issues/133.
The 502 error reported here: https://github.com/devgianlu/go-librespot/issues/137. Overall, it seems like autoplay issues.

<!-- gh-comment-id:3289432410 --> @szygmunt commented on GitHub (Sep 14, 2025): Are you using the latest version of go-librespot? Regarding the 204 error, it looks like an autoplay issue to me. The client’s behavior somewhat resembles this: https://github.com/devgianlu/go-librespot/issues/133. The 502 error reported here: https://github.com/devgianlu/go-librespot/issues/137. Overall, it seems like autoplay issues.
Author
Owner

@leodurandfr commented on GitHub (Sep 15, 2025):

Yes, I'm "running go-librespot 0.4.0".

<!-- gh-comment-id:3290989255 --> @leodurandfr commented on GitHub (Sep 15, 2025): Yes, I'm "running go-librespot 0.4.0".
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/go-librespot#134
No description provided.