[GH-ISSUE #279] TrackId in FullTrack can be null #85

Closed
opened 2026-02-27 20:23:02 +03:00 by kerem · 1 comment
Owner

Originally created by @aome510 on GitHub (Nov 8, 2021).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/279

Describe the bug
According the specs defined in docs.rs, TrackId in FullTrack is not null. However, get playlist items can return a track object will null id.

To Reproduce
Steps to reproduce the behavior:

  1. To get the playlist having a track with null ID, run
curl -X "GET" \
"https://api.spotify.com/v1/playlists/2RI4NLi6npcHfCNQQxP3nM/tracks?limit=100&offset=900" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
> /tmp/data.txt
  1. Then run jq .items[].track.id /tmp/data.txt to view the list of track's ids

Expected behavior
There should be at least one null entry

Originally created by @aome510 on GitHub (Nov 8, 2021). Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/279 **Describe the bug** According the specs defined in [docs.rs](https://docs.rs/rspotify-model/0.11.2/rspotify_model/track/struct.FullTrack.html), `TrackId` in `FullTrack` is not null. However, [get playlist items](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-playlists-tracks) can return a track object will null id. **To Reproduce** Steps to reproduce the behavior: 1. To get the playlist having a track with null ID, run ``` curl -X "GET" \ "https://api.spotify.com/v1/playlists/2RI4NLi6npcHfCNQQxP3nM/tracks?limit=100&offset=900" \ -H "Accept: application/json" -H "Content-Type: application/json" \ -H "Authorization: Bearer <TOKEN>" \ > /tmp/data.txt ``` 2. Then run `jq .items[].track.id /tmp/data.txt` to view the list of track's ids **Expected behavior** There should be at least one null entry
kerem 2026-02-27 20:23:02 +03:00
Author
Owner

@marioortizmanero commented on GitHub (Nov 19, 2021):

Oh nice, the docs have been updated and look a bit more detailed now. Which means that the links are broken... I've opened #281 for that.

I was able to reproduce your issue with your indications, which should be fixed with #282. As far as I can tell this happens with local tracks only.

Thanks for the report!

<!-- gh-comment-id:973971048 --> @marioortizmanero commented on GitHub (Nov 19, 2021): Oh nice, the docs have been updated and look a bit more detailed now. Which means that the links are broken... I've opened #281 for that. I was able to reproduce your issue with your indications, which should be fixed with #282. As far as I can tell this happens with local tracks only. Thanks for the report!
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/rspotify#85
No description provided.