hass-music-assistant: Attempt to decode JSON with unexpected mimetype - music_assistant.providers.spotify

What version of Music Assistant has the issue?

2.0.0b82

The problem

Randomically Music Assistant stop playing a playlist with radio mode on. Checking the logs I have found an error very similar (I guess) to this old issue https://github.com/music-assistant/hass-music-assistant/issues/486

How to reproduce

Appears randomically. Using service mass.play_media for genereate a playlist from an URI with radio mode on.

        - service: mass.play_media
          target:
            device_id: e325948e0c54ba0b8ea12bbc6d11b162
          data:
            media_type: playlist
            media_id: "{{ uri_result.artists[0]['uri'] }}"
            radio_mode: "on"
            enqueue: replace

Relevant log output

2024-01-17 18:08:08.280 DEBUG (MainThread) [music_assistant.providers.spotify] Retrieved Spotify token using librespot in 0.76 seconds
2024-01-17 18:08:08.280 INFO (MainThread) [music_assistant.providers.spotify] Successfully logged in to Spotify as xxxxxx-yy
2024-01-17 18:08:08.403 ERROR (MainThread) [music_assistant.providers.spotify] tracks/5LeDMHIZ5YDZ2b1VOcYVcG - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/5LeDMHIZ5YDZ2b1VOcYVcG?market=from_token&country=from_token')
2024-01-17 18:08:08.403 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/5LeDMHIZ5YDZ2b1VOcYVcG took 0.12 seconds
2024-01-17 18:08:08.465 ERROR (MainThread) [music_assistant.providers.spotify] tracks/1I3cmZZmhxGvL2QViQC17h - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/1I3cmZZmhxGvL2QViQC17h?market=from_token&country=from_token')
2024-01-17 18:08:08.465 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/1I3cmZZmhxGvL2QViQC17h took 0.05 seconds
2024-01-17 18:08:08.617 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/2Rn7bVL1FVYboc4c55RUdg took 0.1 seconds
2024-01-17 18:08:08.716 ERROR (MainThread) [music_assistant.providers.spotify] tracks/2Rn7bVL1FVYboc4c55RUdg - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/2Rn7bVL1FVYboc4c55RUdg?market=from_token&country=from_token')
2024-01-17 18:08:08.717 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/2Rn7bVL1FVYboc4c55RUdg took 0.05 seconds
2024-01-17 18:08:08.717 WARNING (MainThread) [music_assistant.audio] Item 2Rn7bVL1FVYboc4c55RUdg not found
2024-01-17 18:08:08.813 ERROR (MainThread) [music_assistant.providers.spotify] tracks/43h4FonpCeaaURpFpiQsf9 - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/43h4FonpCeaaURpFpiQsf9?market=from_token&country=from_token')
2024-01-17 18:08:08.814 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/43h4FonpCeaaURpFpiQsf9 took 0.05 seconds
2024-01-17 18:08:08.928 ERROR (MainThread) [music_assistant.providers.spotify] tracks/7G67ZJRQT9nn2Fa9vA6B32 - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/7G67ZJRQT9nn2Fa9vA6B32?market=from_token&country=from_token')
2024-01-17 18:08:08.928 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/7G67ZJRQT9nn2Fa9vA6B32 took 0.05 seconds
2024-01-17 18:08:09.032 ERROR (MainThread) [music_assistant.providers.spotify] tracks/6gXrEUzibufX9xYPk3HD5p - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/6gXrEUzibufX9xYPk3HD5p?market=from_token&country=from_token')
2024-01-17 18:08:09.033 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/6gXrEUzibufX9xYPk3HD5p took 0.05 seconds
2024-01-17 18:08:09.033 WARNING (MainThread) [music_assistant.audio] Item 6gXrEUzibufX9xYPk3HD5p not found
2024-01-17 18:08:09.169 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/artists/0ECwFtbIWEVNwjlrfc6xoL took 0.09 seconds
2024-01-17 18:08:09.230 ERROR (MainThread) [music_assistant.providers.spotify] tracks/5ynO8cYFjDwELIZfFHHeYe - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/5ynO8cYFjDwELIZfFHHeYe?market=from_token&country=from_token')
2024-01-17 18:08:09.230 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/5ynO8cYFjDwELIZfFHHeYe took 0.05 seconds
2024-01-17 18:08:09.335 ERROR (MainThread) [music_assistant.providers.spotify] artists/0ECwFtbIWEVNwjlrfc6xoL/albums?include_groups=album,single,compilation - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/artists/0ECwFtbIWEVNwjlrfc6xoL/albums?include_groups=album,single,compilation&limit=50&offset=0&market=from_token&country=from_token')
2024-01-17 18:08:09.335 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/artists/0ECwFtbIWEVNwjlrfc6xoL/albums?include_groups=album,single,compilation took 0.05 seconds
2024-01-17 18:08:09.443 ERROR (MainThread) [music_assistant.providers.spotify] tracks/7fRvtXvJMpGfTLdF0M09a1 - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/7fRvtXvJMpGfTLdF0M09a1?market=from_token&country=from_token')
2024-01-17 18:08:09.443 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/7fRvtXvJMpGfTLdF0M09a1 took 0.05 seconds
2024-01-17 18:08:09.443 WARNING (MainThread) [music_assistant.audio] Item 7fRvtXvJMpGfTLdF0M09a1 not found
2024-01-17 18:08:09.549 ERROR (MainThread) [music_assistant.providers.spotify] tracks/4W4wYHtsrgDiivRASVOINL - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/4W4wYHtsrgDiivRASVOINL?market=from_token&country=from_token')
2024-01-17 18:08:09.549 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/4W4wYHtsrgDiivRASVOINL took 0.05 seconds
2024-01-17 18:08:09.676 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/0PdM2a6oIjqepoEfcJo0RO took 0.08 seconds
2024-01-17 18:08:09.755 ERROR (MainThread) [music_assistant.providers.spotify] artists/0ECwFtbIWEVNwjlrfc6xoL - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/artists/0ECwFtbIWEVNwjlrfc6xoL?market=from_token&country=from_token')
2024-01-17 18:08:09.755 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/artists/0ECwFtbIWEVNwjlrfc6xoL took 0.05 seconds
2024-01-17 18:08:09.851 ERROR (MainThread) [music_assistant.providers.spotify] tracks/0PdM2a6oIjqepoEfcJo0RO - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/0PdM2a6oIjqepoEfcJo0RO?market=from_token&country=from_token')
2024-01-17 18:08:09.852 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/0PdM2a6oIjqepoEfcJo0RO took 0.05 seconds
2024-01-17 18:08:09.852 WARNING (MainThread) [music_assistant.audio] Item 0PdM2a6oIjqepoEfcJo0RO not found
2024-01-17 18:08:10.028 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/artists/0ECwFtbIWEVNwjlrfc6xoL/top-tracks took 0.12 seconds
2024-01-17 18:08:10.108 ERROR (MainThread) [music_assistant.providers.spotify] tracks/2oSpQ7QtIKTNFfA08Cy0ku - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/2oSpQ7QtIKTNFfA08Cy0ku?market=from_token&country=from_token')
2024-01-17 18:08:10.109 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/2oSpQ7QtIKTNFfA08Cy0ku took 0.09 seconds
2024-01-17 18:08:10.109 WARNING (MainThread) [music_assistant.audio] Item 2oSpQ7QtIKTNFfA08Cy0ku not found
2024-01-17 18:08:10.188 ERROR (MainThread) [music_assistant.providers.spotify] tracks/39qYD4J4BKvZMQgxfXl5bv - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/39qYD4J4BKvZMQgxfXl5bv?market=from_token&country=from_token')
2024-01-17 18:08:10.188 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/39qYD4J4BKvZMQgxfXl5bv took 0.06 seconds
2024-01-17 18:08:10.188 WARNING (MainThread) [music_assistant.audio] Item 39qYD4J4BKvZMQgxfXl5bv not found
2024-01-17 18:08:10.287 ERROR (MainThread) [music_assistant.providers.spotify] tracks/4EFkvOhgAmlHEfDfvfSoh5 - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/4EFkvOhgAmlHEfDfvfSoh5?market=from_token&country=from_token')
2024-01-17 18:08:10.287 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/4EFkvOhgAmlHEfDfvfSoh5 took 0.05 seconds
2024-01-17 18:08:10.287 WARNING (MainThread) [music_assistant.audio] Item 4EFkvOhgAmlHEfDfvfSoh5 not found
2024-01-17 18:08:10.384 ERROR (MainThread) [music_assistant.providers.spotify] tracks/7dH1uyeLjl0OHWjaJ1GC5k - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/7dH1uyeLjl0OHWjaJ1GC5k?market=from_token&country=from_token')
2024-01-17 18:08:10.384 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/7dH1uyeLjl0OHWjaJ1GC5k took 0.05 seconds
2024-01-17 18:08:10.388 DEBUG (MainThread) [music_assistant.providers.slimproto.cli] Handling CLI-request (player: aa:aa:fb:39:1a:2c command: status - args: ['-', 2] - kwargs: {'tags': 'xcfldatgrKN'})
2024-01-17 18:08:10.391 DEBUG (MainThread) [music_assistant.providers.slimproto.cli] Handling CLI-request (player: aa:aa:fb:39:1a:2c command: time - args: ['?'] - kwargs: {})
2024-01-17 18:08:10.486 ERROR (MainThread) [music_assistant.providers.spotify] tracks/0L0T4tMAaGqLgIVj1MOj9t - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/0L0T4tMAaGqLgIVj1MOj9t?market=from_token&country=from_token')
2024-01-17 18:08:10.486 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/0L0T4tMAaGqLgIVj1MOj9t took 0.04 seconds
2024-01-17 18:08:10.599 ERROR (MainThread) [music_assistant.providers.spotify] tracks/5K3Q1gue9nWLLwh6bYQFoB - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/5K3Q1gue9nWLLwh6bYQFoB?market=from_token&country=from_token')
2024-01-17 18:08:10.599 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/5K3Q1gue9nWLLwh6bYQFoB took 0.05 seconds
2024-01-17 18:08:10.702 ERROR (MainThread) [music_assistant.providers.spotify] tracks/47M6M8qE0brSeu2dvQP36r - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/47M6M8qE0brSeu2dvQP36r?market=from_token&country=from_token')
2024-01-17 18:08:10.702 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/47M6M8qE0brSeu2dvQP36r took 0.05 seconds
2024-01-17 18:08:10.804 ERROR (MainThread) [music_assistant.providers.spotify] tracks/2gQaQUhDCNGfBVXTvxAmXQ - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/2gQaQUhDCNGfBVXTvxAmXQ?market=from_token&country=from_token')
2024-01-17 18:08:10.804 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/2gQaQUhDCNGfBVXTvxAmXQ took 0.05 seconds
2024-01-17 18:08:10.804 WARNING (MainThread) [music_assistant.audio] Item 2gQaQUhDCNGfBVXTvxAmXQ not found
2024-01-17 18:08:10.954 ERROR (MainThread) [music_assistant.providers.spotify] tracks/1Tr4K5MU5XYE44umXGDndd - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/1Tr4K5MU5XYE44umXGDndd?market=from_token&country=from_token')
2024-01-17 18:08:10.954 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/1Tr4K5MU5XYE44umXGDndd took 0.1 seconds
2024-01-17 18:08:10.954 WARNING (MainThread) [music_assistant.audio] Item 1Tr4K5MU5XYE44umXGDndd not found
2024-01-17 18:08:11.043 ERROR (MainThread) [music_assistant.providers.spotify] tracks/2uynnXFdf3wBIjOEHCB9up - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/2uynnXFdf3wBIjOEHCB9up?market=from_token&country=from_token')
2024-01-17 18:08:11.043 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/2uynnXFdf3wBIjOEHCB9up took 0.05 seconds
2024-01-17 18:08:11.141 ERROR (MainThread) [music_assistant.providers.spotify] tracks/0yfNXxlyXdmP0ue1iJijx1 - 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.spotify.com/v1/tracks/0yfNXxlyXdmP0ue1iJijx1?market=from_token&country=from_token')
2024-01-17 18:08:11.141 DEBUG (MainThread) [music_assistant.providers.spotify] Processing GET/tracks/0yfNXxlyXdmP0ue1iJijx1 took 0.05 seconds
2024-01-17 18:08:11.141 WARNING (MainThread) [music_assistant.audio] Item 0yfNXxlyXdmP0ue1iJijx1 not found

Additional information

No response

What version of Home Assistant Core are your running

2024.1.3

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Raspberry Pi

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 25 (13 by maintainers)

Most upvoted comments

Same here. … but if something related to Spotify could no be significative. we will see in the next days.