Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search fails with "General transient error" #89

Closed
timothylhuillier opened this issue Feb 3, 2016 · 26 comments
Closed

Search fails with "General transient error" #89

timothylhuillier opened this issue Feb 3, 2016 · 26 comments
Assignees
Labels
C-bug Category: This is a bug
Milestone

Comments

@timothylhuillier
Copy link

Sometimes when I start mopidy since today, I have this error :

INFO     Logged in to Spotify in online mode
INFO     Searching Spotify for: "worakls"
ERROR    SpotifyBackend backend caused an exception.
Traceback (most recent call last):
  File "/Users/tim/Documents/Sites/python/mopidy-dev/mopidy/mopidy/core/library.py", line 19, in _backend_error_handling
    yield
  File "/Users/tim/Documents/Sites/python/mopidy-dev/mopidy/mopidy/core/library.py", line 347, in search
    result = future.get()
  File "/usr/local/lib/python2.7/site-packages/pykka/threading.py", line 52, in get
    compat.reraise(*self._data['exc_info'])
  File "/usr/local/lib/python2.7/site-packages/pykka/compat.py", line 12, in reraise
    exec('raise tp, value, tb')
  File "/usr/local/lib/python2.7/site-packages/pykka/actor.py", line 201, in _actor_loop
    response = self._handle_receive(message)
  File "/usr/local/lib/python2.7/site-packages/pykka/actor.py", line 295, in _handle_receive
    return callee(*message['args'], **message['kwargs'])
  File "/usr/local/lib/python2.7/site-packages/mopidy_spotify/library.py", line 42, in search
    query, uris, exact)
  File "/usr/local/lib/python2.7/site-packages/mopidy_spotify/search.py", line 44, in search
    sp_search.load()
  File "/usr/local/lib/python2.7/site-packages/spotify/search.py", line 110, in load
    return utils.load(self._session, self, timeout=timeout)
  File "/usr/local/lib/python2.7/site-packages/spotify/utils.py", line 242, in load
    _check_error(obj)
  File "/usr/local/lib/python2.7/site-packages/spotify/utils.py", line 206, in _check_error
    error_type, ignores=[spotify.ErrorType.IS_LOADING])
  File "/usr/local/lib/python2.7/site-packages/spotify/error.py", line 31, in maybe_raise
    raise LibError(error_type)
LibError: General transient error

And when I exit mopidy (^C) and restart more times, that oki. I don't understand why

Thanks

@trygveaa
Copy link
Member

trygveaa commented Feb 3, 2016

Hm, I also got this earlier today. And now I'm getting:

ERROR    Spotify streaming error: <ErrorType.NO_STREAM_AVAILABLE: 18>

Not sure if it's related or not.

@albinekb
Copy link

albinekb commented Feb 3, 2016

Can't play anything today! Getting same kind of errors

@kingosticks
Copy link
Member

https://twitter.com/SpotifyStatus/status/694855504930148352

We’re investigating some issues and finding out more. Thanks for your reports - we’ll keep you updated here.

So the specific problems we see today are probably nothing to do with mopidy-spotify.

@timothylhuillier
Copy link
Author

Thanks @kingosticks

@adamcik
Copy link
Member

adamcik commented Feb 3, 2016

Wonder if we should catch these though and make it a warning or error log entry and then have a debug entry for the traceback? Though these might be hard to reproduce, so maybe better just to leave the traceback and just make sure to have a better error message?

@kingosticks
Copy link
Member

@timothylhuillier but your exception should be handled.

@kingosticks
Copy link
Member

And Spotify is working again for me now. See if you are still having issues @timothylhuillier

@timothylhuillier
Copy link
Author

I confirm, I have already this problem when I looking for artist but when I go to playlist : http://screencloud.net/v/wQFh in bottom, my spotify music start.

I develop my frontend app for sync my light so, I cancel and start mopidy every time. Before already oki but Since this morning I must reboot my computer that my search work.

I don't know why

edit :

Now, I reboot my computer and I have already the bug

@robin92
Copy link

robin92 commented Feb 3, 2016

Affected as well since today.

Feb 03 16:27:19 gladius systemd[590]: Started Mopidy music server.
Feb 03 16:27:19 gladius mopidy[2215]: ** Message: pygobject_register_sinkfunc is deprecated (GstObject)
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Starting Mopidy 1.1.2
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Loading config from builtin defaults
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Loading config from /home/robin/.config/mopidy/mopidy.conf
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Loading config from command line options
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Enabled extensions: spotify, mpd, softwaremixer, file
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Disabled extensions: local, m3u, http, stream
Feb 03 16:27:20 gladius mopidy[2215]: WARNING  Found local configuration errors, the extension has been automatically disabled:
Feb 03 16:27:20 gladius mopidy[2215]: WARNING    local/media_dir must be set.
Feb 03 16:27:20 gladius mopidy[2215]: WARNING  Please fix the extension configuration errors or disable the extensions to silence these messages.
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Starting Mopidy mixer: SoftwareMixer
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Starting Mopidy audio
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Starting Mopidy backends: FileBackend, SpotifyBackend
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Audio output set to "autoaudiosink"
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Starting Mopidy core
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Logged in to Spotify in offline mode
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Starting Mopidy frontends: MpdFrontend
Feb 03 16:27:20 gladius mopidy[2215]: INFO     MPD server running at [::ffff:127.0.0.1]:6600
Feb 03 16:27:20 gladius mopidy[2215]: INFO     Logged in to Spotify in online mode
Feb 03 16:27:21 gladius mopidy[2215]: INFO     New MPD connection from [::ffff:127.0.0.1]:47832
Feb 03 16:27:30 gladius mopidy[2215]: INFO     Searching Spotify for: artist:"Dream Theater"
Feb 03 16:27:30 gladius mopidy[2215]: ERROR    SpotifyBackend backend caused an exception.
Feb 03 16:27:30 gladius mopidy[2215]: Traceback (most recent call last):
Feb 03 16:27:30 gladius mopidy[2215]: File "/usr/lib/python2.7/site-packages/mopidy/core/library.py", line 19, in _backend_error_handling
Feb 03 16:27:30 gladius mopidy[2215]: yield
Feb 03 16:27:30 gladius mopidy[2215]: File "/usr/lib/python2.7/site-packages/mopidy/core/library.py", line 344, in search
Feb 03 16:27:30 gladius mopidy[2215]: result = future.get()
Feb 03 16:27:30 gladius mopidy[2215]: File "/usr/lib/python2.7/site-packages/pykka/future.py", line 299, in get
Feb 03 16:27:30 gladius mopidy[2215]: exec('raise exc_info[0], exc_info[1], exc_info[2]')
Feb 03 16:27:30 gladius mopidy[2215]: File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 200, in _actor_loop
Feb 03 16:27:30 gladius mopidy[2215]: response = self._handle_receive(message)
Feb 03 16:27:30 gladius mopidy[2215]: File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 294, in _handle_receive
Feb 03 16:27:30 gladius mopidy[2215]: return callee(*message['args'], **message['kwargs'])
Feb 03 16:27:30 gladius mopidy[2215]: File "/usr/lib/python2.7/site-packages/mopidy_spotify/library.py", line 42, in search
Feb 03 16:27:30 gladius mopidy[2215]: query, uris, exact)
Feb 03 16:27:30 gladius mopidy[2215]: File "/usr/lib/python2.7/site-packages/mopidy_spotify/search.py", line 44, in search
Feb 03 16:27:30 gladius mopidy[2215]: sp_search.load()
Feb 03 16:27:30 gladius mopidy[2215]: File "/usr/lib/python2.7/site-packages/spotify/search.py", line 110, in load
Feb 03 16:27:30 gladius mopidy[2215]: return utils.load(self._session, self, timeout=timeout)
Feb 03 16:27:30 gladius mopidy[2215]: File "/usr/lib/python2.7/site-packages/spotify/utils.py", line 242, in load
Feb 03 16:27:30 gladius mopidy[2215]: _check_error(obj)
Feb 03 16:27:30 gladius mopidy[2215]: File "/usr/lib/python2.7/site-packages/spotify/utils.py", line 206, in _check_error
Feb 03 16:27:30 gladius mopidy[2215]: error_type, ignores=[spotify.ErrorType.IS_LOADING])
Feb 03 16:27:30 gladius mopidy[2215]: File "/usr/lib/python2.7/site-packages/spotify/error.py", line 31, in maybe_raise
Feb 03 16:27:30 gladius mopidy[2215]: raise LibError(error_type)
Feb 03 16:27:30 gladius mopidy[2215]: LibError: General transient error

@trygveaa
Copy link
Member

trygveaa commented Feb 4, 2016

Seems like there still are some issues, but Spotify doesn't report any issues on their twitter now.

@bartroff
Copy link

bartroff commented Feb 4, 2016

It seems you are able to do a search right after mopidy starts and after that it breaks. Weird.

@kingosticks
Copy link
Member

Historically I don't think 'Transient' errors are something they ever report since they don't affect all users.

@Ticalie
Copy link

Ticalie commented Feb 4, 2016

The strange thing is if you continue to retry the search, eventually a result will come back.
As a hacky fix I've created a loop that re-searches if it fails...

mopidy.library.search(uri).then(function (results) {
   if(results.length == 0) { //mopidy-spotify done gone broke
      //SearchAgain
   }
}

This usually completes within 10 tries.

@timothylhuillier
Copy link
Author

I don't modifed anything but now, it's rework ... lol

Edit : And not, I restart mopidy and I have again the problem...

@jodal jodal added the C-bug Category: This is a bug label Feb 5, 2016
@jodal jodal modified the milestones: v2.3, v2.x Feb 5, 2016
@connrs
Copy link

connrs commented Feb 11, 2016

I've been watching this thread for a few days, but didn't want to weigh in if I had nothing useful to say.

This issue only really appears to have impacted Spotify search; generally browsing for specific albums and artists seems to be working fine. The workaround at my office, has been to use browser history to find our favourites to add music to our play queue (our mopidy web client embeds the Spotify URI in to the URL (/#albums/spotify:album:44Ig8dzqOkvkGDzaUof9lK/Led%20Zeppelin/Led%20Zeppelin%20IV) as you browse, so we haven't been badly impacted.

One final note: The issue has gone from intermittent to continuous over the last 24 hours for me.

I'm not sure if I can do anything to help here as I know too little Python and have no experience with Spotify's APIs. If you need anything (even if it's just moral support!) please let me know.

@trygveaa trygveaa changed the title Sometimes when I start mopidy Search fails with "General transient error" Feb 11, 2016
@kingosticks
Copy link
Member

This is indeed affecting numerous people today, possibly everyone. I've asked Spotify for information but they have not responded. Note that the search at play.spotify.com is working fine so this issue is probably confined to whatever Spotify service endpoint libspotify searches use; there probably isn't anything we can do other than handle the exception better.

@liamhendricks
Copy link

Still receiving this error today.

@adamcik
Copy link
Member

adamcik commented Feb 11, 2016

https://developer.spotify.com/web-api/migration-guide/ - so it turns out Spotify turned off their old metadata API, which it turns out libspotify used... So this is basically going to be broken until someone scrambles to get a workaround using the web apis in place :/

@insunaa
Copy link

insunaa commented Feb 12, 2016

The only client I currently have that works with this is mopify... mopidy springs the same error, but the results show up regardless.

@adamcik
Copy link
Member

adamcik commented Feb 13, 2016

For the record, the reason mopify still works is that it doesn't use mopidy for search or metadata lookup. It just uses the new web apis directly from your browser.

trygveaa added a commit to trygveaa/mopidy-spotify that referenced this issue Feb 14, 2016
Spotify has discontinued their Metadata API, which libspotify uses. This
means that search in libspotify, and thus pyspotify is not working. This
changes the search to use the new Web API which is supported.

This is a first step for fixing search, and makes it work again. We
probably want to further improve this, and possibly move calling the API
into pyspotify. Note that some parts of the Web API require OAuth (i.e.
different auth than libspotify requires), but luckily search doesn't
require any auth.

The search results from the Web API misses some data compared to what
libspotify does. The fields that are missing is bitrate and date from
tracks, and artists and date from albums. It is possible to additional
requests to get the artists and release date for albums, but this is
left for a later improvement.

Fixes mopidy#89.
trygveaa added a commit to trygveaa/mopidy-spotify that referenced this issue Feb 14, 2016
Spotify has discontinued their Metadata API, which libspotify uses. This
means that search in libspotify, and thus pyspotify is not working. This
changes the search to use the new Web API which is supported.

This is a first step for fixing search, and makes it work again. We
probably want to further improve this, and possibly move calling the API
into pyspotify. Note that some parts of the Web API require OAuth (i.e.
different auth than libspotify requires), but luckily search doesn't
require any auth.

The search results from the Web API misses some data compared to what
libspotify does. The fields that are missing is bitrate and date from
tracks, and artists and date from albums. It is possible to additional
requests to get the artists and release date for albums, but this is
left for a later improvement.

Fixes mopidy#89.
@jodal
Copy link
Member

jodal commented Feb 14, 2016

Fixed in release-2.3 branch by using the Web API for search. Will be released soon.

Leaving the issue open until the fix has landed in the develop branch.

@jodal
Copy link
Member

jodal commented Feb 14, 2016

Fixed in Mopidy-Spotify 2.3.1 which has just been released. Thanks to @trygveaa for making Mopidy-Spotify use the Spotify Web API for searching.

@johnedvard
Copy link

Very good work with the fix. I was just wondering if the update is added to homebrew? I am still stuck with version 2.2.0.

brew install mopidy/mopidy/mopidy-spotify
==> Installing mopidy-spotify from mopidy/mopidy
Error: mopidy-spotify-2.2.0 already installed

Maybe I am doing something wrong?

@dsdeiz
Copy link

dsdeiz commented Feb 15, 2016

Mine is 2.3.1. Maybe do a brew update first?

@bartroff
Copy link

Works like a charm. Thanks!

@johnedvard
Copy link

I had to do a brew update and then a brew unlink mopidy-spotify, and then install it again
brew install mopidy-spotify. Thanks for the feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests