[GH-ISSUE #150] RSpotify de-authenticates after some time #71

Closed
opened 2026-03-02 23:44:15 +03:00 by kerem · 5 comments
Owner

Originally created by @sewnie on GitHub (Mar 2, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/150

Describe the bug
Spotify-player will 'refuse' to play any songs after a random period of time(?)

To Reproduce
You can't, and i can't.

This is completely random; but what i did to produce it:

  • Play some music
  • Pause
  • Go take a shower
  • Can't play any more music

Expected behavior
I can play any more music.

Log and backtrace

Got a panic: PanicInfo {
    payload: Any { .. },
    message: Some(
        RSpotify not authenticated,
    ),
    location: Location {
        file: "/home/sewn/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/rspotify-0.11.6/src/clients/base.rs",
        line: 99,
        col: 14,
    },
    can_unwind: true,
}

Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: <unknown>
  24: <unknown>
  25: <unknown>
  26: <unknown>
  27: <unknown>
  28: <unknown>
  29: <unknown>

Above is spammed each time i want to play a song in this state.

2023-03-02T12:16:36.893454Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 399ms
2023-03-02T12:16:37.039757Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 546ms
2023-03-02T12:21:29.444037Z  INFO spotify_player::streaming: Got an event from the integrated player: Paused { play_request_id: 93, track_id: SpotifyId { id: 314471234307603666607343732754352089375, audio_type: Track }, position_ms: 292181, duration_ms: 517693 }
2023-03-02T12:21:29.986013Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 541ms
2023-03-02T13:13:04.854185Z  INFO client_request{request=Player(StartPlayback(Context(Playlist(PlaylistId("6yYlmM3Xuq79OXZoCdKWcW")), Some(Uri("spotify:track:00nv6xVzlNwvxuRxyjT5hn")))))}: spotify_player::token: Getting new authentication token...
2023-03-02T13:13:05.151246Z ERROR client_request{request=Player(StartPlayback(Context(Playlist(PlaylistId("6yYlmM3Xuq79OXZoCdKWcW")), Some(Uri("spotify:track:00nv6xVzlNwvxuRxyjT5hn")))))}: spotify_player::client::spotify: Failed to get access token: failed to get token: MercuryError
2023-03-02T13:13:29.821318Z  INFO spotify_player::client::handlers: Current context ID (None) is different
from the expected ID (Some(Playlist(PlaylistId("6yYlmM3Xuq79OXZoCdKWcW")))), update the context state
2023-03-02T13:14:07.826981Z  INFO spotify_player::client::handlers: Current context ID (None) is different
from the expected ID (Some(Playlist(PlaylistId("6yYlmM3Xuq79OXZoCdKWcW")))), update the context state

As you can see, it begins at 13:13:04.854185Z.

Originally created by @sewnie on GitHub (Mar 2, 2023). Original GitHub issue: https://github.com/aome510/spotify-player/issues/150 **Describe the bug** Spotify-player will 'refuse' to play any songs after a random period of time(?) **To Reproduce** You can't, and i can't. This is completely random; but what i did to produce it: + Play some music + Pause + Go take a shower + Can't play any more music **Expected behavior** I can play any more music. **Log and backtrace** ``` Got a panic: PanicInfo { payload: Any { .. }, message: Some( RSpotify not authenticated, ), location: Location { file: "/home/sewn/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/rspotify-0.11.6/src/clients/base.rs", line: 99, col: 14, }, can_unwind: true, } Stack backtrace: 0: <unknown> 1: <unknown> 2: <unknown> 3: <unknown> 4: <unknown> 5: <unknown> 6: <unknown> 7: <unknown> 8: <unknown> 9: <unknown> 10: <unknown> 11: <unknown> 12: <unknown> 13: <unknown> 14: <unknown> 15: <unknown> 16: <unknown> 17: <unknown> 18: <unknown> 19: <unknown> 20: <unknown> 21: <unknown> 22: <unknown> 23: <unknown> 24: <unknown> 25: <unknown> 26: <unknown> 27: <unknown> 28: <unknown> 29: <unknown> ``` Above is spammed each time i want to play a song in this state. ``` 2023-03-02T12:16:36.893454Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 399ms 2023-03-02T12:16:37.039757Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 546ms 2023-03-02T12:21:29.444037Z INFO spotify_player::streaming: Got an event from the integrated player: Paused { play_request_id: 93, track_id: SpotifyId { id: 314471234307603666607343732754352089375, audio_type: Track }, position_ms: 292181, duration_ms: 517693 } 2023-03-02T12:21:29.986013Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 541ms 2023-03-02T13:13:04.854185Z INFO client_request{request=Player(StartPlayback(Context(Playlist(PlaylistId("6yYlmM3Xuq79OXZoCdKWcW")), Some(Uri("spotify:track:00nv6xVzlNwvxuRxyjT5hn")))))}: spotify_player::token: Getting new authentication token... 2023-03-02T13:13:05.151246Z ERROR client_request{request=Player(StartPlayback(Context(Playlist(PlaylistId("6yYlmM3Xuq79OXZoCdKWcW")), Some(Uri("spotify:track:00nv6xVzlNwvxuRxyjT5hn")))))}: spotify_player::client::spotify: Failed to get access token: failed to get token: MercuryError 2023-03-02T13:13:29.821318Z INFO spotify_player::client::handlers: Current context ID (None) is different from the expected ID (Some(Playlist(PlaylistId("6yYlmM3Xuq79OXZoCdKWcW")))), update the context state 2023-03-02T13:14:07.826981Z INFO spotify_player::client::handlers: Current context ID (None) is different from the expected ID (Some(Playlist(PlaylistId("6yYlmM3Xuq79OXZoCdKWcW")))), update the context state ``` As you can see, it begins at `13:13:04.854185Z`.
kerem 2026-03-02 23:44:15 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Mar 2, 2023):

Spotify-player will 'refuse' to play any songs after a random period of time(?)

It may happen because the computer goes to idle mode and the app can't get access to the network. You kinda can reproduce this error by turning on/off your network after a while.

This is completely random; but what i did to produce it:

  • Play some music
  • Pause
  • Go take a shower
  • Can't play any more music

Interesting, I did the same thing many times before but couldn't reproduce it =)). Joke aside, I suspect it was because of the same thing I mentioned above.

I've thought about making the app more robust to these kinds of errors (e.g networking). It's not trivial though and there is always a workaround, which is to restart the app 🤷

<!-- gh-comment-id:1452166629 --> @aome510 commented on GitHub (Mar 2, 2023): > Spotify-player will 'refuse' to play any songs after a random period of time(?) It may happen because the computer goes to idle mode and the app can't get access to the network. You kinda can reproduce this error by turning on/off your network after a while. > This is completely random; but what i did to produce it: > > + Play some music > + Pause > + Go take a shower > + Can't play any more music Interesting, I did the same thing many times before but couldn't reproduce it =)). Joke aside, I suspect it was because of the same thing I mentioned above. I've thought about making the app more robust to these kinds of errors (e.g networking). It's not trivial though and there is always a workaround, which is to restart the app 🤷
Author
Owner

@sewnie commented on GitHub (Mar 2, 2023):

I know restarting helps, but this did not use to happen on clients such as the official one and spotifyd

<!-- gh-comment-id:1452181100 --> @sewnie commented on GitHub (Mar 2, 2023): I know restarting helps, but this did not use to happen on clients such as the official one and `spotifyd`
Author
Owner

@mihalycsaba commented on GitHub (Mar 28, 2023):

I've thought about making the app more robust to these kinds of errors (e.g networking). It's not trivial though and there is always a workaround, which is to restart the app shrug

My problem is, that I have to re-enter user and password every time this happens. I have a really unstable connectios, so this happens often. Would be nice if I could save the login details somehow or enter them from the cli.

<!-- gh-comment-id:1487363823 --> @mihalycsaba commented on GitHub (Mar 28, 2023): > I've thought about making the app more robust to these kinds of errors (e.g networking). It's not trivial though and there is always a workaround, which is to restart the app shrug My problem is, that I have to re-enter user and password every time this happens. I have a really unstable connectios, so this happens often. Would be nice if I could save the login details somehow or enter them from the cli.
Author
Owner

@sewnie commented on GitHub (Apr 5, 2023):

today is the second time it happens please i just want to listen to my music

<!-- gh-comment-id:1497825490 --> @sewnie commented on GitHub (Apr 5, 2023): today is the second time it happens please i just want to listen to my music
Author
Owner

@sewnie commented on GitHub (Apr 7, 2023):

today:

Got a panic: PanicInfo {
    payload: Any { .. },
    message: Some(
        called `Result::unwrap()` on an `Err` value: SendError((178, [0, 8, 0, 0, 0, 0, 0, 0, 0, 159, 1, 0, 1, 1, 164, 10, 156, 3, 104, 109, 58, 47, 47, 107, 101, 121, 109, 97, 115, 116, 101, 114, 47, 116, 111, 107, 101, 110, 47, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100, 63, 99, 108, 105, 101, 110, 116, 95, 105, 100, 61, 101, 57, 55, 97, 52, 49, 57, 55, 99, 49, 57, 101, 52, 51, 52, 48, 57, 102, 55, 98, 50, 57, 52, 100, 55, 54, 100, 50, 97, 54, 97, 55, 38, 115, 99, 111, 112, 101, 61, 117, 115, 101, 114, 45, 114, 101, 97, 100, 45, 114, 101, 99, 101, 110, 116, 108, 121, 45, 112, 108, 97, 121, 101, 100, 44, 117, 115, 101, 114, 45, 116, 111, 112, 45, 114, 101, 97, 100, 44, 117, 115, 101, 114, 45, 114, 101, 97, 100, 45, 112, 108, 97, 121, 98, 97, 99, 107, 45, 112, 111, 115, 105, 116, 105, 111, 110, 44, 117, 115, 101, 114, 45, 114, 101, 97, 100, 45, 112, 108, 97, 121, 98, 97, 99, 107, 45, 115, 116, 97, 116, 101, 44, 117, 115, 101, 114, 45, 109, 111, 100, 105, 102, 121, 45, 112, 108, 97, 121, 98, 97, 99, 107, 45, 115, 116, 97, 116, 101, 44, 117, 115, 101, 114, 45, 114, 101, 97, 100, 45, 99, 117, 114, 114, 101, 110, 116, 108, 121, 45, 112, 108, 97, 121, 105, 110, 103, 44, 115, 116, 114, 101, 97, 109, 105, 110, 103, 44, 112, 108, 97, 121, 108, 105, 115, 116, 45, 114, 101, 97, 100, 45, 112, 114, 105, 118, 97, 116, 101, 44, 112, 108, 97, 121, 108, 105, 115, 116, 45, 109, 111, 100, 105, 102, 121, 45, 112, 114, 105, 118, 97, 116, 101, 44, 112, 108, 97, 121, 108, 105, 115, 116, 45, 109, 111, 100, 105, 102, 121, 45, 112, 117, 98, 108, 105, 99, 44, 112, 108, 97, 121, 108, 105, 115, 116, 45, 114, 101, 97, 100, 45, 99, 111, 108, 108, 97, 98, 111, 114, 97, 116, 105, 118, 101, 44, 117, 115, 101, 114, 45, 102, 111, 108, 108, 111, 119, 45, 114, 101, 97, 100, 44, 117, 115, 101, 114, 45, 102, 111, 108, 108, 111, 119, 45, 109, 111, 100, 105, 102, 121, 44, 117, 115, 101, 114, 45, 108, 105, 98, 114, 97, 114, 121, 45, 114, 101, 97, 100, 44, 117, 115, 101, 114, 45, 108, 105, 98, 114, 97, 114, 121, 45, 109, 111, 100, 105, 102, 121, 26, 3, 71, 69, 84])),
    ),
    location: Location {
        file: "/home/sewn/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/librespot-core-0.4.2/src/session.rs",
        line: 213,
        col: 48,
    },
    can_unwind: true,
}

Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: <unknown>
  24: <unknown>
  25: <unknown>
  26: <unknown>
  27: <unknown>
  28: <unknown>
  29: <unknown>
  30: <unknown>

<!-- gh-comment-id:1500311539 --> @sewnie commented on GitHub (Apr 7, 2023): today: ``` Got a panic: PanicInfo { payload: Any { .. }, message: Some( called `Result::unwrap()` on an `Err` value: SendError((178, [0, 8, 0, 0, 0, 0, 0, 0, 0, 159, 1, 0, 1, 1, 164, 10, 156, 3, 104, 109, 58, 47, 47, 107, 101, 121, 109, 97, 115, 116, 101, 114, 47, 116, 111, 107, 101, 110, 47, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100, 63, 99, 108, 105, 101, 110, 116, 95, 105, 100, 61, 101, 57, 55, 97, 52, 49, 57, 55, 99, 49, 57, 101, 52, 51, 52, 48, 57, 102, 55, 98, 50, 57, 52, 100, 55, 54, 100, 50, 97, 54, 97, 55, 38, 115, 99, 111, 112, 101, 61, 117, 115, 101, 114, 45, 114, 101, 97, 100, 45, 114, 101, 99, 101, 110, 116, 108, 121, 45, 112, 108, 97, 121, 101, 100, 44, 117, 115, 101, 114, 45, 116, 111, 112, 45, 114, 101, 97, 100, 44, 117, 115, 101, 114, 45, 114, 101, 97, 100, 45, 112, 108, 97, 121, 98, 97, 99, 107, 45, 112, 111, 115, 105, 116, 105, 111, 110, 44, 117, 115, 101, 114, 45, 114, 101, 97, 100, 45, 112, 108, 97, 121, 98, 97, 99, 107, 45, 115, 116, 97, 116, 101, 44, 117, 115, 101, 114, 45, 109, 111, 100, 105, 102, 121, 45, 112, 108, 97, 121, 98, 97, 99, 107, 45, 115, 116, 97, 116, 101, 44, 117, 115, 101, 114, 45, 114, 101, 97, 100, 45, 99, 117, 114, 114, 101, 110, 116, 108, 121, 45, 112, 108, 97, 121, 105, 110, 103, 44, 115, 116, 114, 101, 97, 109, 105, 110, 103, 44, 112, 108, 97, 121, 108, 105, 115, 116, 45, 114, 101, 97, 100, 45, 112, 114, 105, 118, 97, 116, 101, 44, 112, 108, 97, 121, 108, 105, 115, 116, 45, 109, 111, 100, 105, 102, 121, 45, 112, 114, 105, 118, 97, 116, 101, 44, 112, 108, 97, 121, 108, 105, 115, 116, 45, 109, 111, 100, 105, 102, 121, 45, 112, 117, 98, 108, 105, 99, 44, 112, 108, 97, 121, 108, 105, 115, 116, 45, 114, 101, 97, 100, 45, 99, 111, 108, 108, 97, 98, 111, 114, 97, 116, 105, 118, 101, 44, 117, 115, 101, 114, 45, 102, 111, 108, 108, 111, 119, 45, 114, 101, 97, 100, 44, 117, 115, 101, 114, 45, 102, 111, 108, 108, 111, 119, 45, 109, 111, 100, 105, 102, 121, 44, 117, 115, 101, 114, 45, 108, 105, 98, 114, 97, 114, 121, 45, 114, 101, 97, 100, 44, 117, 115, 101, 114, 45, 108, 105, 98, 114, 97, 114, 121, 45, 109, 111, 100, 105, 102, 121, 26, 3, 71, 69, 84])), ), location: Location { file: "/home/sewn/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/librespot-core-0.4.2/src/session.rs", line: 213, col: 48, }, can_unwind: true, } Stack backtrace: 0: <unknown> 1: <unknown> 2: <unknown> 3: <unknown> 4: <unknown> 5: <unknown> 6: <unknown> 7: <unknown> 8: <unknown> 9: <unknown> 10: <unknown> 11: <unknown> 12: <unknown> 13: <unknown> 14: <unknown> 15: <unknown> 16: <unknown> 17: <unknown> 18: <unknown> 19: <unknown> 20: <unknown> 21: <unknown> 22: <unknown> 23: <unknown> 24: <unknown> 25: <unknown> 26: <unknown> 27: <unknown> 28: <unknown> 29: <unknown> 30: <unknown> ```
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/spotify-player#71
No description provided.