[GH-ISSUE #519] Details of album cannot be loaded when it has been in the library for a while #1232

Closed
opened 2026-03-14 14:02:10 +03:00 by kerem · 3 comments
Owner

Originally created by @mannodermaus on GitHub (Jul 29, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/519

Describe the bug
I've been observing this with albums that I put into my library (i.e. ❤️'d) a long time ago. When trying to open their details via the library, the player gets stuck in a perpetual "Loading..." state. When I then search for the artist explicitly and select the same album from search results, the album loads as expected.

See the below for an example. I started playback of the album from my library via the official Spotify GUI client, then closed it and opened the CLI player. Playback works just fine, but I'm unable to view the album's details (either via G+Space or via the aforementioned navigation from the library) until I search for the artist again and select it from there.

To Reproduce
I'm not exactly sure, but I suppose that you:

  1. Add an album to your library
  2. Wait a few years (!?)
  3. Try to open the album's details page from the library

Expected behaviour
I see the details of the album.

Log and backtrace

1. Failing case (open old album reference via library)

2024-07-29T00:37:55.189254Z  INFO spotify_player::client::handlers: Current context ID (None) is different from the expected ID (Some(Album(AlbumId("4in34qwyUghNc9ykmH2BTO")))), update the context state
2024-07-29T00:37:55.189387Z  INFO client_request{request=GetContext(Album(AlbumId("4in34qwyUghNc9ykmH2BTO")))}: spotify_player::client: Get album context: spotify:album:4in34qwyUghNc9ykmH2BTO
2024-07-29T00:37:55.292886Z ERROR client_request{request=GetContext(Album(AlbumId("4in34qwyUghNc9ykmH2BTO")))}: spotify_player::client::handlers: Failed to handle client request: json parse error: invalid type: null, expected ID or URI for struct TrackId at line 1 column 1869: invalid type: null, expected ID or URI for struct TrackId at line 1 column 1869

The second and third lines repeat indefinitely until I cancel the action. It implies some sort of format incompatibility, maybe this is an older entry and had a different structure?

2. Succeeding case (open album reference via artist's info page)

2024-07-29T00:38:40.264654Z  INFO spotify_player::client::handlers: Current context ID (None) is different from the expected ID (Some(Album(AlbumId("25PQxi9SR1OODB5XG6m48J")))), update the context state

I see only this and then the data loads. Interestingly enough, the album ID is different from the failing case above. Has there possibly been a migration of IDs at Spotify some years back? The GUI client can keep the references (i.e. show the album even when I go to it via the library).

Screenshots

https://github.com/user-attachments/assets/d3bf1fa7-c4f8-446c-a2a1-835790f7161c

Environment

  • OS: macOS 14.5 (Intel)
  • Application version: 0.19.1
  • Application features: None (installed via brew)

Additional context
-/-

Originally created by @mannodermaus on GitHub (Jul 29, 2024). Original GitHub issue: https://github.com/aome510/spotify-player/issues/519 **Describe the bug** I've been observing this with albums that I put into my library (i.e. ❤️'d) a long time ago. When trying to open their details via the library, the player gets stuck in a perpetual "Loading..." state. When I then search for the artist explicitly and select the same album from search results, the album loads as expected. See the below for an example. I started playback of the album from my library via the official Spotify GUI client, then closed it and opened the CLI player. Playback works just fine, but I'm unable to view the album's details (either via G+Space or via the aforementioned navigation from the library) until I search for the artist again and select it from there. **To Reproduce** I'm not exactly sure, but I suppose that you: 1. Add an album to your library 2. Wait a few years (!?) 3. Try to open the album's details page from the library **Expected behaviour** I see the details of the album. **Log and backtrace** _1. Failing case (open old album reference via library)_ ``` 2024-07-29T00:37:55.189254Z INFO spotify_player::client::handlers: Current context ID (None) is different from the expected ID (Some(Album(AlbumId("4in34qwyUghNc9ykmH2BTO")))), update the context state 2024-07-29T00:37:55.189387Z INFO client_request{request=GetContext(Album(AlbumId("4in34qwyUghNc9ykmH2BTO")))}: spotify_player::client: Get album context: spotify:album:4in34qwyUghNc9ykmH2BTO 2024-07-29T00:37:55.292886Z ERROR client_request{request=GetContext(Album(AlbumId("4in34qwyUghNc9ykmH2BTO")))}: spotify_player::client::handlers: Failed to handle client request: json parse error: invalid type: null, expected ID or URI for struct TrackId at line 1 column 1869: invalid type: null, expected ID or URI for struct TrackId at line 1 column 1869 ``` The second and third lines repeat indefinitely until I cancel the action. It implies some sort of format incompatibility, maybe this is an older entry and had a different structure? _2. Succeeding case (open album reference via artist's info page)_ ``` 2024-07-29T00:38:40.264654Z INFO spotify_player::client::handlers: Current context ID (None) is different from the expected ID (Some(Album(AlbumId("25PQxi9SR1OODB5XG6m48J")))), update the context state ``` I see only this and then the data loads. Interestingly enough, the album ID is different from the failing case above. Has there possibly been a migration of IDs at Spotify some years back? The GUI client can keep the references (i.e. show the album even when I go to it via the library). **Screenshots** https://github.com/user-attachments/assets/d3bf1fa7-c4f8-446c-a2a1-835790f7161c **Environment** - OS: macOS 14.5 (Intel) - Application version: 0.19.1 - Application features: None (installed via `brew`) **Additional context** -/-
kerem 2026-03-14 14:02:10 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@mannodermaus commented on GitHub (Jul 30, 2024):

Maybe this is a wontfix, since it really seems like these two albums are different listings on Spotify. Using the official Spotify app for Android, it shows the album as "in your library " when I view it from my library, but when I open the same album via the artist page, there is no checkmark (even though it still recognizes the individual tracks as downloaded).

Unless spotify-player has a way to "alias" records together into the same album, this ticket may be closeable. It's unfortunate as it affects many entries in my library, though.

Opened from library Open from artist
Screenshot_20240730-141133 Screenshot_20240730-141127
<!-- gh-comment-id:2257519222 --> @mannodermaus commented on GitHub (Jul 30, 2024): Maybe this is a wontfix, since it really seems like these two albums are different listings on Spotify. Using the official Spotify app for Android, it shows the album as "in your library ✅" when I view it from my library, but when I open the same album via the artist page, there is no checkmark (even though it still recognizes the individual tracks as downloaded). Unless spotify-player has a way to "alias" records together into the same album, this ticket may be closeable. It's unfortunate as it affects many entries in my library, though. |Opened from library|Open from artist| |---|---| |![Screenshot_20240730-141133](https://github.com/user-attachments/assets/bfaa2978-930b-4b1d-baec-11e521d443ba)|![Screenshot_20240730-141127](https://github.com/user-attachments/assets/bca1a2ab-563e-4263-b473-0621e3c2f024)|
Author
Owner

@aome510 commented on GitHub (Aug 1, 2024):

I think the json parse error: invalid type: null, expected ID or URI for struct TrackId at line 1 column 1869: invalid type: null, expected ID or URI for struct TrackId at line 1 column 1869 is because of a bug in Spotify API, so it's not really because of specific albums. This tends to happen a lot and in the past I had to implement patch from spotify_player side to handle those.

<!-- gh-comment-id:2261708493 --> @aome510 commented on GitHub (Aug 1, 2024): I think the `json parse error: invalid type: null, expected ID or URI for struct TrackId at line 1 column 1869: invalid type: null, expected ID or URI for struct TrackId at line 1 column 1869` is because of a bug in Spotify API, so it's not really because of specific albums. This tends to happen a lot and in the past I had to implement patch from `spotify_player` side to handle those.
Author
Owner

@aome510 commented on GitHub (Aug 1, 2024):

This tends to happen a lot and in the past I had to implement patch from spotify_player side to handle those.

That said, this bug is not trivial to implement patch on. Open an issue in https://github.com/ramsayleung/rspotify/issues/486

<!-- gh-comment-id:2261727304 --> @aome510 commented on GitHub (Aug 1, 2024): > This tends to happen a lot and in the past I had to implement patch from spotify_player side to handle those. That said, this bug is not trivial to implement patch on. Open an issue in https://github.com/ramsayleung/rspotify/issues/486
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#1232
No description provided.