home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.72k stars 30.45k forks source link

Spotify Integration: No Devices or Entities Displayed in Home Assistant #104478

Closed KejjRod closed 11 months ago

KejjRod commented 11 months ago

The problem

I successfully added the Spotify integration without encountering any issues. However, after the integration was added, I noticed that there are no entities or devices visible. I attempted to use different URIs, including my local address, Nabu Casa address, reverse proxy, and the "https://my.home-assistant.io/redirect/oauth" URI. Unfortunately, the result was the same.

In the logs, the following error is repeated multiple times with the same HTTP status, 404, and code: -1.

What version of Home Assistant Core has the issue?

core-2023.11.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Spotify

Link to integration documentation on our website

https://www.home-assistant.io/integrations/spotify/

Diagnostics information

home-assistant_spotify_2023-11-24T22-19-08.185Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

This is repeated on multiple lines:

spotipy.exceptions.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/playlists/37i9dQZF1EYkqdzj48dyYq?additional_types=track:
 Not found., reason: None

Additional information

I'm relatively new to raising issues on GitHub, so please forgive any unconventional mistakes. As Hanlon once wrote: "Never attribute to malice that which is adequately explained by stupidity."

home-assistant[bot] commented 11 months ago

Hey there @frenck, @joostlek, mind taking a look at this issue as it has been labeled with an integration (spotify) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `spotify` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign spotify` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


spotify documentation spotify source (message by IssueLinks)

joostlek commented 11 months ago

I don't think this problem is at the Callback URLs, that part is only used with authentication, which succeeded otherwise you could not have created an entry.

It's trying to request a playlist and fails in doing so. Can you maybe try playing a more straightforward playlist and reload the integration?

KejjRod commented 11 months ago

I don't think this problem is at the Callback URLs, that part is only used with authentication, which succeeded otherwise you could not have created an entry.

It's trying to request a playlist and fails in doing so. Can you maybe try playing a more straightforward playlist and reload the integration?

Oh my god, I didn't realize that it used the currently playing playlist as the entity... Spent the last 2 hours troubleshooting with the DJ playlist on. Started a regular playlist, reloaded the integration, and voila, it worked like a charm. Thanks for the swift response! 🎉

joostlek commented 11 months ago

Ah yes the DJ playlist. I can't test that as I'm a Dutch user and I don't have access to it yet.