Spotify Browse hangs in endless 'Loading data from Musicbox. Please wait...'

Hi,

Since a few month I am experience the issue that Spotify Browse hangs with ‘Loading data from Musicbox.’ and does not come back at all. Spotify is working quite smooth, no issue at all, I can search for music, listen to music, etc.
So I do not have the same issue with a wrong user / password as in this post

I check the log files under /var/logs/mopidy/mopidy.log.1 (as mopidy.log was empty) but could not really figure out where the problem is. When I click on Spotify browse, genre & moods I see only
2016-11-20 18:14:13,475 - INFO Starting new HTTPS connection (1): api.tunigo.com

When I switch to a radiostation I can find the following entry in the log file:
2016-11-20 17:22:22,012 - WARNING GStreamer encountered a general stream error. Debug message: gstbasesink.c(3638): gst_base_sink_chain_unlocked (): /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:abin/GstBin:bin0/GstAlsaSink:alsasink0:
Received buffer without a new-segment. Assuming timestamps start from 0.

Does anyone experience the same issue with Spotify Browse? Any ideas?

Thanks,
Ralph

Hi,

any ideas on this? Could that be a caching problem? If so, which / where are the cache files that need to be deleted?

Thanks
Ralph

Is it just ‘Spotify Browse’ that does this? That particular service does go down occasionally as Spotify are pretty incompetent when it comes to managing their APIs. But, saying that, it is working for me right now. I’m not sure it’s a caching problem. Can you run mopidy deps and remind me what version of mopidy-spotify-tunigo you have installed?

Hi Nick,

Yes, it is only Spotify Browse. On Musicbox > Browse I have Spotify (with global tracks, …), Soma.FM, TuneIn. And all are running perfectly. It is just Spotify Browse that hangs.
If I use the search and find results from Spotify they are also running like a charm.

To your question:
I was running mopidy deps it returns:

Mopidy-Spotify-Tunigo: 0.2.1 from /usr/local/lib/python2.7/dist-packages
setuptools: 11.3.1 from /usr/local/lib/python2.7/dist-packages
Mopidy>=0.19.0: 0.19.5 from /usr/local/lib/python2.7/dist-packages
setuptools: 11.3.1 from /usr/local/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.0 from /usr/lib/python2.7/dist-packages
tornado>=2.3: 4.0.2 from /usr/local/lib/python2.7/dist-packages
certifi: 14.5.14 from /usr/local/lib/python2.7/dist-packages
backports.ssl-match-hostname: 3.4.0.2 from /usr/local/lib/python2.7/dist-packages

I have made a clean install from the pimusicbox with 0.6.0 (lastest version) so it should be the standard installation everybody has.

I finally managed to set mopidy to debug mode. When I switch to Spotify Browse it returns:

2016-12-21 20:42:54,224 - DEBUG No message received before timeout. Processing events
2016-12-21 20:42:54,225 - DEBUG Will wait 1.315s for next message
2016-12-21 20:42:54,924 - DEBUG Received WebSocket message from 192.168.2.201: u'{"method":"core.library.browse","params":["spotifytunigo:genres"],"jsonrpc":"2.0","id":13}'
2016-12-21 20:42:54,938 - INFO Starting new HTTPS connection (1): api.tunigo.com
2016-12-21 20:42:55,121 - DEBUG Exception returned from.SpotifyTunigoBackend (urn:uuid:bo49cf33-38e7-4ee9-afb4-5c55d267b13a) to caller:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 200, in _actor_loop
response = self._handle_receive(message)
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 294, in _handle_receive
return callee(*message['args'], **message['rwargs'])
File "/usr/local/lib/python2.7/dist-packages/mopidy_spotify_tunigo/library.py", line 56, in browse
self._tunigo.get_genres())
File "/usr/local/lib/python2.7/dist-packages/tunigo/api.py", line 70, in get_genres
for item in self._get('genres'):
File "/usr/local/lib/python2.7/dist-packages/tunigo/api.py", line 36, in _get
result = requests.get(uri)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 65, in get
return request('get', url, **rwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 49, in request
response = session.request(method=method, url=url, **rwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 461, in request
resp = self.send(prep, **send_rwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **rwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 431, in send
raise SSLError(e, request=request)
SSLError: [Errno 1] _ssl.c:504: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
2016-12-21 20:42:55,128 - DEBUG Exception returned from Core (urn:uuid:07b8a6af-5010-4985-8751-35451c146fco) to caller:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 200, in _actor_loop
response = self._handle_receive(message)
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 294, in _handle_receive
return callee(*message['args'], **message['rwargs'])
File "/usr/local/lib/python2.7/dist-packages/mopidy/core/library.py", line 73, in browse
return backend.library.browse(uri).get()
File "/usr/lib/python2.7/dist-packages/pykka/future.py", line 299, in get
exec('raise exc_info[0], exc_info[1], exc_info[2]')
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 200, in _actor_loop
response = self._handle_receive(message)
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 294, in _handle_receive
return callee(*message['args'], **message['rwargs'])
File "/usr/local/lib/python2.7/dist-packages/mopidy_spotify_tunigo/library.py", line 56, in browse
self._tunigo.get_genres())
File "/usr/local/lib/python2.7/dist-packages/tunigo/api.py", line 70, in get_genres
for item in self._get('genres'):
File "/usr/local/lib/python2.7/dist-packages/tunigo/api.py", line 36, in _get
fl result = requests.get(uri)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 65, in get
return request('get', url, **rwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 49, in request
response = session.request(method=method, url=url, **rwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 461, in request
resp = self.send(prep, **send_rwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **rwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 431, in send
raise SSLError(e, request=request)
SSLError: [Errno 1] _ssl.c:504: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
2016-12-21 20:42:55,131 - DEBUG Request from [::ffff:127.0.0.1]:46067: status

This seems pretty much like a problem with an outdated OpenSSL lib (if I have googled correctly).
But what seems strange to me is if this would be really the case than everybody should have this issue.

Merry Christmas!

Thanks,
Ralph

Hi, i found a solution for Pi Musicbox, thanks to Ralph_Nagel for publish the app debug log.

upgrade the system

$ rm /etc/apt/sources.list.d/mopidy.list
$ wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
$ wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/jessie.list
$ apt-get update
$ apt-get dist-upgrade
$ apt-get install gcc make python-dev libssl-dev libffi-dev
$ pip install requests[security]
$ reboot

Merry Christmas!

Sk3

A full system upgrade will break parts of the pimusicbox system. If you are happy to fix them yourself (or if you don’t care) then go for it, there’s probably information dotted around on here that’ll help you fix things.

But if it’s only requests that actually needs updating, then it’s worth trying to find a way to do just that, and leave everything else alone.

The minimal mods required to fix the ssl problem are

$ apt-get update
$ apt-get install gcc make python-dev libssl-dev libffi-dev
$ pip install requests[security]
$ reboot

These update the component python-requests to the new version of SSL.

There are any know issue about new SSL lib in Musicbox ?

Thanks
Sk3

Hi,

thanks, I’ll try that one out. But could it be that the Spotify Authentication issue is exactly what is described here: https://github.com/pimusicbox/pimusicbox/issues/387

Best,
Ralph

Only if you are trying to use mopidy-mopify. You don’t appear to be doing that.

Ok, so that was a misunderstanding. I am using just the downloaded Pi Musicbox (0.6.0) and I am not aware which libs are included there or not.

Not that I know of. This should be OK,

Just tried it – it works – Spotify Browse working again… thanks to skizzo3000

Finally found the time to try it. It’s working again :grinning:. Thanks a lot @skizzo3000 for the great help

@skizzo3000 Your fiks works fine, many thanks. I did get a command suggestion for ‘pip install --upgrade pip’. Maybe something to add to the minimal mods?

Regards,

Wilbert

@Wilbertvdbeek did you need this for the latest RC6 release?

Hey @kingosticks yes. After I installed RC6 it used pip version 9.0.1.

Requests is already updated as part of that release so it’s a bit odd and it’s not something I have noticed.