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

Mopidy Application Error on Search (Docker instance) #411

Closed
fam4r opened this issue Jun 22, 2019 · 5 comments
Closed

Mopidy Application Error on Search (Docker instance) #411

fam4r opened this issue Jun 22, 2019 · 5 comments
Labels

Comments

@fam4r
Copy link

fam4r commented Jun 22, 2019

Describe the bug
Got 3 red error boxes in bottom-right corner after searching for a song.

(I enabled Test mode and got a Mopidy log traceback in the browser's console, which is at the bottom of the issue)

To Reproduce
Steps to reproduce the behavior:

  1. Pull the docker image
$ docker pull jaedb/iris
  1. Run the container (actually taken the docker run command from here because there is no way to find it in your documentation)
$ docker run -d -p 6600:6600 -p 6680:6680 --user $UID:$GID jaedb/iris mopidy
  1. Go to http://localhost:6680/iris and log in
  2. Go to Search
  3. Type something
  4. Press Enter
  5. See error

Expected behavior
I'm expected to get search results, don't know in which way: it's the first time I'm trying Iris and I'm already getting errors...

Environment details:

  • OS: Docker instance
docker --version
Docker version 18.09.6-ce, build 481bc77156
  • Browser:
firefox --version
Mozilla Firefox 67.0.4
  • Iris version: 3.35.1
    (btw I see "Upgrade available" icon on the right and after clicking on "Upgrade to 3.39.0" i get the following error
Permission denied
Password-less access to /usr/local/lib/python2.7/dist-packages/mopidy_iris/system.sh was refused. Check your /etc/sudoers file.

and I see that the DockerHub Dockerfile is different than the one in that repo: the first ones downloades Mopidy-Iris with pip (which is on pypy at the version 3.39.0)
)

Additional context

Mopidy traceback

Traceback (most recent call last):
 File \"/usr/lib/python2.7/dist-packages/mopidy/internal/jsonrpc.py\", line 133, in _handle_single_request
 result = self._unwrap_result(result)
 File \"/usr/lib/python2.7/dist-packages/mopidy/internal/jsonrpc.py\", line 222, in _unwrap_result
 result = result.get()
 File \"/usr/lib/python2.7/dist-packages/pykka/threading.py\", line 52, in get
 compat.reraise(*self._data['exc_info'])
 File \"/usr/lib/python2.7/dist-packages/pykka/compat.py\", line 12, in reraise
 exec('raise tp, value, tb')
 File \"/usr/lib/python2.7/dist-packages/pykka/actor.py\", line 201, in _actor_loop
 response = self._handle_receive(message)
 File \"/usr/lib/python2.7/dist-packages/pykka/actor.py\", line 295, in _handle_receive
 return callee(*message['args'], **message['kwargs'])
 File \"/usr/lib/python2.7/dist-packages/mopidy/core/library.py\", line 348, in search
 result = future.get()
 File \"/usr/lib/python2.7/dist-packages/pykka/threading.py\", line 52, in get
 compat.reraise(*self._data['exc_info'])
 File \"/usr/lib/python2.7/dist-packages/pykka/compat.py\", line 12, in reraise
 exec('raise tp, value, tb')
 File \"/usr/lib/python2.7/dist-packages/pykka/actor.py\", line 201, in _actor_loop
 response = self._handle_receive(message)
 File \"/usr/lib/python2.7/dist-packages/pykka/actor.py\", line 295, in _handle_receive
 return callee(*message['args'], **message['kwargs'])
 File \"/usr/local/lib/python2.7/dist-packages/mopidy_youtube/backend.py\", line 192, in search
 tracks=search_youtube(search_query)
 File \"/usr/local/lib/python2.7/dist-packages/mopidy_youtube/backend.py\", line 102, in search_youtube
 playlist = [item['id']['videoId'] for item in data['items']]
KeyError: u'items'
@fam4r fam4r added the bug label Jun 22, 2019
@go2tom42
Copy link

go2tom42 commented Jul 7, 2019

Same for me too

@jaedb
Copy link
Owner

jaedb commented Aug 1, 2019

Thanks for the detailed logs - from those I can tell you the error appears to be with the Mopidy-Youtube extension. This extension no longer works as it used to (see natumbri/mopidy-youtube#92), so I would recommend disabling by editing your config with:

[mopidy-youtube]
enabled = false

Or you can just uncheck it from sources within Iris (Search > Sources).

Regarding upgrades within Iris, this is something that's a work in progress. The idea is to build the Docker image with sudo access already enabled. Watch this space.

@jaedb
Copy link
Owner

jaedb commented Aug 13, 2019

Mopidy-Youtube has been removed from the Docker image, and will be included in the next release.

@jaedb jaedb closed this as completed Aug 13, 2019
@natumbri
Copy link

natumbri commented Nov 3, 2019

@jaedb are you interested in including a working version of mopidy-youtube in your docker image?
Maybe check out my fork (which I've submitted as a pull request against the official version here).

The Google API is optional. If you have an API key, and want to use it, you can (for speed and reliability). Use of the API can be activated in mopidy.conf, where an API key can be provided.

However, by default, the API is not used, and the plugin works without a key.

Best of both worlds.

@jaedb
Copy link
Owner

jaedb commented Nov 4, 2019

Ideally only the bare minimum would be included to get things up and running (also less for me to have to maintain). What is lacking is the documentation on how users can add other backends to their docker setup. This might be a nicer way to include your repo.

PS. Nice work getting YouTube support despite the original extension being well broken :-)

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

No branches or pull requests

4 participants