Spotify API broken?

For a few days, my Spotify automations are not working anymore. I haven’t changed anything.

Cannot read properties of null (reading '$error') is the only thing I see for my operation “Get User’s Playlists”. What happened? Does anybody know what changed?

n8n Version: 1.69.2
Database: SQLite
Run via Docker on Linux (unRAID)

I tried it manually with a HTTP response that works but the whole structure looks different now: Web API Reference | Spotify for Developers

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

This is the only code that could be throwing that error.

lineResult.json there should either be a proper error, or be undefined. It being null suggests to me that something has changed in the Spotify API.

As suspected, this is caused by Spotify returning null as playlists.
image

How can I overcome this problem? All of my automations stopped working because of this. They must have changed several things. Not sure if the limit was always only 50 playlists. I mean I use the maximal limit of 50 now and have 57 total (the API says) and why the hell is one null then?

It’s the API as expected that changed:

We are going to put a workaround for this fix(Spotify Node): Fix issue with null values breaking the response by Joffcom · Pull Request #12080 · n8n-io/n8n · GitHub

1 Like

:thinking: This looks like it should most likely be handled in user land, if someone’s expecting a playlist and that playlist is is null, the user definitely needs to know, or a chackbox to exclude null entries…

yeah we discussed the PR internally, and are considering handling this better, but still throwing a more descriptive error, and then adding an option to filter out invalid entries.

1 Like