Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

My Spotify Playlist has 'null' tracks with invalid properties

My Spotify Playlist has 'null' tracks with invalid properties

Plan - Premium

Country - GB

Device - Desktop

Operating System - Windows 10

My Question or Issue:

Hey!

Whilst developing some personal automation to sort a playlist, I've found several empty tracks in one of them.

 

To replicate perform the following equivalent request in Postman or Curl:

https://developer.spotify.com/console/get-playlist-tracks/?playlist_id=0nDLk7zdM3kPvyxpdUe3yL&market... 

 

If you do the above request from the Spotify developer pages, the track is not null... So I presume somethings gone amiss, but wanted to raise here.

 

 

Example response;

 

 

{
  "href": "https://api.spotify.com/v1/playlists/0nDLk7zdM3kPvyxpdUe3yL/tracks?offset=183&limit=1&market=GB",
  "items": [
    {
      "added_at": "2010-11-08T20:46:05Z",
      "added_by": {
        "external_urls": {
          "spotify": "https://open.spotify.com/user/"
        },
        "href": "https://api.spotify.com/v1/users/",
        "id": "",
        "type": "user",
        "uri": "spotify:user:"
      },
      "is_local": false,
      "primary_color": null,
      "track": null,
      "video_thumbnail": {
        "url": null
      }
    }
  ],
  "limit": 1,
  "next": "https://api.spotify.com/v1/playlists/0nDLk7zdM3kPvyxpdUe3yL/tracks?offset=184&limit=1&market=GB",
  "offset": 183,
  "previous": "https://api.spotify.com/v1/playlists/0nDLk7zdM3kPvyxpdUe3yL/tracks?offset=182&limit=1&market=GB",
  "total": 2325
}

 

 

 

 

Reply
4 Replies

I have this when I select "Liked Songs" and then go to the playlist. 

It shows many empty songs with NaN play time. 

I have attached a screenshot.

Screenshot 2021-01-06 at 14.41.14.png

I have this exact same problem with my Liked Songs list.

I get the same null result through the developer console.

If I replicate that correctly in the developer console (track offset 183, not 170) I see the same there as you have posted. So it is consistent. But I see no reason for that junk response, it seems malformed and that is Spotify's bug. I guess you just have to program defensively and ignore the track if it's null (similar to what you usually must do for local tracks).

 

Suggested posts