mopidy / mopidy-spotify

Mopidy extension for playing music from Spotify
https://mopidy.com/ext/spotify/
Apache License 2.0
933 stars 108 forks source link

Error while starting mopidy ErrorType.USER_NEEDS_PREMIUM: 15 #339

Closed TCke83 closed 2 years ago

TCke83 commented 2 years ago

When I start mopidy with the spotify extension i get an error in the logs and i'm unable to play songs, loading playlists is possible however.

I have a premium family account, so the ERROR seems wrong.

The system is running raspbian with all updates install and i'm using:

Requirement already up-to-date: Mopidy-Spotify in /usr/lib/python3/dist-packages (4.1.1)
INFO     [MainThread] mopidy.__main__ Starting Mopidy 3.2.0
INFO     [MainThread] mopidy.config Loading config from builtin defaults
INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
INFO     [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
INFO     [MainThread] mopidy.config Loading config from command line options
INFO     [MainThread] mopidy.__main__ Enabled extensions: softwaremixer, http, stream, spotify, iris
INFO     [MainThread] mopidy.__main__ Disabled extensions: file, m3u
INFO     [MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer
INFO     [MainThread] mopidy.commands Mixer volume set to 10
INFO     [MainThread] mopidy.commands Starting Mopidy audio
INFO     [MainThread] mopidy.commands Starting Mopidy backends: StreamBackend, SpotifyBackend
INFO     [Audio-2] mopidy.audio.actor Audio output set to "alsasink device=pcm.source1"
ERROR    [SpotifyEventLoop] spotify.session Spotify login error: <ErrorType.USER_NEEDS_PREMIUM: 15>
INFO     [SpotifyBackend-4] mopidy_spotify.web Logged into Spotify Web API as tcke83
INFO     [SpotifyBackend-4] mopidy_spotify.playlists Refreshed 2 Spotify playlists
INFO     [MainThread] mopidy.commands Starting Mopidy core
INFO     [MainThread] mopidy.commands Starting Mopidy frontends: IrisFrontend, HttpFrontend
INFO     [IrisFrontend-8] mopidy_iris.core Starting Iris 3.62.0
INFO     [HttpFrontend-10] mopidy.http.actor HTTP server running at [::ffff:192.168.118.7]:6680
INFO     [MainThread] mopidy.commands Starting GLib mainloop

My running mopidy config:

pi@raspberrypi:/etc/mopidy $ sudo mopidyctl config
Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config" as user mopidy
[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
verbosity = 0
format = %(levelname)-8s [%(threadName)s] %(name)s %(message)s
color = false
config_file =

[audio]
mixer = software
mixer_volume = 10
output = alsasink device=pcm.source1
buffer_time = 

[proxy]
scheme = 
hostname = 
port = 
username = 
password = 

[iris]
enabled = true
country = BE
locale = nl_BE
verify_certificates = true
snapcast_enabled = false
snapcast_host = localhost
snapcast_port = 1780
snapcast_ssl = false
snapcast_stream = Default
spotify_authorization_url = https://jamesbarnsley.co.nz/iris/auth_spotify.php
lastfm_authorization_url = https://jamesbarnsley.co.nz/iris/auth_lastfm.php
genius_authorization_url = https://jamesbarnsley.co.nz/iris/auth_genius.php
data_dir = $XDG_DATA_DIR/iris

[file]
enabled = false  ; Extension disabled by user config.

[http]
enabled = true
hostname = 192.168.118.7
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins = 
csrf_protection = true
default_app = iris

[m3u]
enabled = false  ; Extension disabled by user config.

[softwaremixer]
enabled = true

[stream]
enabled = true
protocols = 
  http
  https
  mms
  rtmp
  rtmps
  rtsp
metadata_blacklist = 
timeout = 5000

[spotify]
enabled = true
username = tcke83
password = ********
client_id = 13f2aa52-9657-478c-97a4-e898c39953c0
client_secret = ********
bitrate = 320
volume_normalization = true
private_session = false
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =
goforthanddie commented 2 years ago

I can confirm the same problem, also having a family premium account.

themarti commented 2 years ago

As promised last month (https://developer.spotify.com/community/news/2022/04/12/libspotify-sunset), Spotify disabled access to libspotify on May 16 2022. As of today, seven years after libspotify was deprecated, there is still no official replacement library available.

TCke83 commented 2 years ago

So this basically means that mopidy will no longer work with spotify integration?

adamcik commented 2 years ago

See #110 which covers possibly migrating to librespot, until that is solved mopidy-spotify can't stream music.