Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Spotify search hang indefinitely #224

Closed
JbIPS opened this issue Jun 7, 2017 · 14 comments
Closed

Spotify search hang indefinitely #224

JbIPS opened this issue Jun 7, 2017 · 14 comments

Comments

@JbIPS
Copy link

JbIPS commented Jun 7, 2017

Hi,

I'm using the latest version of mopify and whenever I search a Spotify song, it never ends. The logs do say it's searching, no error but no results.

I still can play songs in a playlist, only the search seems to have issue.

Any ideas? Thanks

@GammaZor
Copy link

GammaZor commented Jun 7, 2017

Same this side,

Seems like Spotify change their API, and OAuth is now required?
130# Related thread

@michaeldeborst
Copy link

I am having the same issue. As well as the fact that various other parts of the Mopify UI don't work like artist pages. I'm running mopidy on a raspberry pi with the pi-musicbox distro if it concerncs you. I tried logging in-and out in the services section and I turned off all the other services in the mopidy conf...

@minigopher17
Copy link

I'm having the same problem. Annoying how Spotify have changed their API on us like that.

Here's what the console prints out if I search for "Prodigy":
https://api.spotify.com/v1/search?limit=50&market=US&q=prodigy&type=album,artist,playlist
401 (Unauthorized)

@cineq
Copy link

cineq commented Jul 3, 2017

Hi
I have very similar problem. When I am using mopify search I am not able to receive any results.
But after analysing debug logs I noticed that search result was actually sent do mopidy from spotify.
Example log:

`INFO 2017-07-03 19:55:46,467 [23453:SpotifyBackend-3] mopidy_spotify.search
Searching Spotify for: "metallica"

DEBUG 2017-07-03 19:55:46,475 [23453:SpotifyBackend-3] urllib3.connectionpool
Resetting dropped connection: api.spotify.com

DEBUG 2017-07-03 19:55:46,885 [23453:SpotifyBackend-3] urllib3.connectionpool
https://api.spotify.com:443 "GET /v1/search?q=%22metallica%22&type=album%2Cartist%2Ctrack&limit=50 HTTP/1.1" 200 None

DEBUG 2017-07-03 19:55:47,009 [23453:HttpServer] mopidy.http.handlers
Sent WebSocket message to 192.168.1.131: '{"jsonrpc": "2.0", "id": 390, "result": [{"model": "SearchResult", "artists": [{"model": "Artist", "name": "Metallica", "uri": `

ncmpcpp is working and properly searching, so I dont think it is mopidy authorisation issue.

I have latest mopify version

@tobiasstrebitzer
Copy link
Contributor

I was able to resolve this issue by upgrading Mopidy-Spotify to v3.1.0:

sudo pip install --upgrade Mopidy-Spotify

(don't forget to restart the mopidy-service afterwards)

@jiridostal
Copy link

Hi,
I'm facing the same issue. All packages are up to date, I've upgraded Mopidy-Spofity to v3.1.0.

# pip show Mopidy-Mopify | grep Version
Version: 1.6.0
# dpkg -s {mopidy,mopidy-spotify} | grep -i version
Version: 2.1.0-1
Version: 3.1.0-0mopidy1

Any suggestions guys?

@kingosticks
Copy link

Did you add the required new config settings?

client_id = ...client_id goes here...
client_secret = ...client_secret goes here...

Obtained from https://www.mopidy.com/authenticate/#spotify

@jiridostal
Copy link

jiridostal commented Jul 26, 2017

Sure, I'm able to connect/play any song from my libraries. Search is the only feature that doesn't work for me so far. It keeps spinning, no errors in log just "Searching Spotify for:...".

Edit: In debug logs I had found I've successfully received some data containing found songs, which means there might be a problem with displaying them in UI.

@kingosticks
Copy link

Those new config settings are specifically required for searching, images and some parts of the MPD support. I suggest you set them.

@kingosticks
Copy link

But as I guess you have already found that's not the end of the problem, there are some errors in the developer console.

@tobiasstrebitzer
Copy link
Contributor

I've had lots of console errors as well, but managed to resolve them in #227.

@kingosticks
Copy link

@tobiasstrebitzer, great job, works well again. hopefully @dirkgroenen can merge it when he gets a chance.

@jiridostal
Copy link

Unfortunately I can't seem to make it work even after applying the patch above... I'm still getting 401 Unauthoriized. Client_id and secret is set properly. From console errors I figured out that token is being included only in certain requests - for example for 'https://api.spotify.com/v1/browse/' I get 200 and request includes token. However requests to 'https://api.spotify.com/v1/tracks/' does not include token so 401 is returned. I'm really getting confused. I've double checked installation and package versions...

@dirkgroenen
Copy link
Owner

This has been fixed in the latest release (1.6.1). Thanks to @tobiasstrebitzer for his PR!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants