Cannot add spotify tracks using mpc

Hi. I tried almost everything the last two days and could not come to a solution so it is time to ask some more experienced mopidy people. I had a perfectly working setup on my first raspberry pi 3b and now started to make a second mopidy install on my raspberry pi zero w with a justboom dac phat. Everything works like charm accept from the fact that it does nog accept spotify tracks. When I do:

mpc add spotify:user:spotify:playlist:3ZgmfR6lsnCwdffZUan8EA

I get:

error adding spotify:user:spotify:playlist:3ZgmfR6lsnCwdffZUan8EA: directory or file not found

Here are all the debug outputs and configs I checked, but could not find the issue. Anyone who can?

I’m driving myself crazy with this same issue! Did you ever have any luck fixing this?

I find this works to load a playlist I use the name of the playlist ie
mpc stop; mpc clear; mpc load “Pink Floyd – Relics (1996 Remastered Version)”; mpc play;
Then to add another to play after just use
mpc load “Paul Simon – There Goes Rhymin’ Simon”
this will load the tracks to play after current album has finished.

Not sure about adding individual tracks though if that’s what you wanted to do.

I can add albums and playlist with
mpc add spotify:album:1xpGyKyV26uPstk1Elgp9Q
mpc add spotify:playlist:3ZgmfR6lsnCwdffZUan8EA (this is a personal one)

Same here, I didn’t try with the Spotify URI before because I preferred to use the actual name of the file, but it does work for me.

If there is a problem here can we treat this as new report with mopidy deps, logs and config showing the problem. The original post is over a year old and Mopidy has changed.

mpc add spotify:XXXXX all return the same no such directory error. Doesn’t matter if it’s tracks, albums, or playlists. I guess I’m going to reinstall Mopidy-Spotify and see if that helps.

I’ll post the logs as soon as I’m home. Thanks everyone.

Sorry for the delay. Thanks for the help everyone.

https://gist.github.com/cullenparrish/deed551c2a560121fcdc379f7c609f9c

config

https://gist.githubusercontent.com/cullenparrish/deed551c2a560121fcdc379f7c609f9c/raw/c592ef8b8afc952d595709e77f6ec8b19d6df755/config

deps

https://gist.githubusercontent.com/cullenparrish/deed551c2a560121fcdc379f7c609f9c/raw/c592ef8b8afc952d595709e77f6ec8b19d6df755/deps

logs

https://gist.githubusercontent.com/cullenparrish/deed551c2a560121fcdc379f7c609f9c/raw/c592ef8b8afc952d595709e77f6ec8b19d6df755/log

And crucially, what exact mpc command did you use to add tracks? Because the log you provided does not show any MPD connections being made to Mopidy.

Are you aware you have decided to configure Mopidy’s MPD frontend to listen on the non-standard port 6681? If you configure Mopidy like that then you MUST specify that same non-standard port when using mpc else you won’t be talking to Mopidy, you’ll be talking to whatever is listening at the default MPD protocol port 6600. The only other software that normally listens on port 6600 is mpd and mpd does not know anything about Spotify.

So:

  • If you are not using mpd, save yourself some headaches by uninstalling mpd and reconfiguring Mopidy’s MPD frontend to use port 6600. Then your regular mpc commands above will work.
  • If you are using mpd, realise it’s entirely separate to Mopidy. If you want to use both Mopidy’s MPD frontend and mpd on the same machine, that’s fine, but make sure you specify the correct port when using an MPD client such as mpc. e.g. mpc -p 6681 add spotify:blah:blah.

You truly are a saint. I swear I tried to find the “obvious” things. I feel like I’m sooo close now. Uninstalled MPD, switch mopidy-MPD port back to 6680 and successfully queued a track with mpc add spotify:xxxxxxxxx but mpc play spotify:xxxxxxxxxx resulted in mpd error: connection closed by server.

relevant log:

May 18 13:05:14 raspberrypi mopidy[547]: DEBUG    [MpdFrontend-13] mopidy.zeroconf Zeroconf service 'Mopidy MPD server on raspberrypi' (_mpd._tcp at []:6600): Published
May 18 13:05:14 raspberrypi mopidy[547]: DEBUG    [HttpFrontend-12] mopidy.zeroconf Zeroconf service 'Mopidy HTTP server on raspberrypi' (_http._tcp at []:6680): Publis
May 18 13:05:14 raspberrypi mopidy[547]: DEBUG    [HttpFrontend-12] mopidy.zeroconf Zeroconf service 'Mopidy HTTP server on raspberrypi' (_mopidy-http._tcp at []:6680):
May 18 13:05:16 raspberrypi mopidy[547]: INFO     [MpdSession-14] mopidy_mpd.session New MPD connection from [::ffff:127.0.0.1]:50426
May 18 13:05:16 raspberrypi mopidy[547]: DEBUG    [MpdSession-14] mopidy_mpd.session Request from [::ffff:127.0.0.1]:50426: command_list_begin
May 18 13:05:16 raspberrypi mopidy[547]: DEBUG    [MpdSession-14] mopidy_mpd.session Request from [::ffff:127.0.0.1]:50426: add "spotify:track:0mWXrr6HQZUhCQG4JMkT2e"
May 18 13:05:16 raspberrypi mopidy[547]: DEBUG    [MpdSession-14] mopidy_mpd.session Request from [::ffff:127.0.0.1]:50426: command_list_end
May 18 13:05:17 raspberrypi mopidy[547]: DEBUG    [Core-9] mopidy.core.tracklist Triggering event: tracklist_changed()
May 18 13:05:17 raspberrypi mopidy[547]: DEBUG    [Core-9] mopidy.listener Sending tracklist_changed to CoreListener: {}
May 18 13:05:17 raspberrypi mopidy[547]: DEBUG    [MpdSession-14] mopidy_mpd.session Response to [::ffff:127.0.0.1]:50426: OK
May 18 13:05:17 raspberrypi mopidy[547]: DEBUG    [MpdFrontend-13] mopidy.listener Sending playlist to MpdSession: {}
May 18 13:05:17 raspberrypi mopidy[547]: DEBUG    [MpdSession-14] mopidy_mpd.network Client most likely disconnected.
May 18 13:05:17 raspberrypi mopidy[547]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Actor is shutting down.
May 18 13:05:17 raspberrypi mopidy[547]: INFO     [MpdSession-15] mopidy_mpd.session New MPD connection from [::ffff:127.0.0.1]:50430
May 18 13:05:17 raspberrypi mopidy[547]: DEBUG    [MpdSession-15] mopidy_mpd.session Request from [::ffff:127.0.0.1]:50430: play
May 18 13:05:17 raspberrypi mopidy[547]: DEBUG    [Audio-2] mopidy.audio.gst Changing state to GST_STATE_READY: result=GST_STATE_CHANGE_SUCCESS
May 18 13:05:17 raspberrypi mopidy[547]: DEBUG    [SpotifyBackend-6] mopidy_spotify.playback Audio requested change of track; loading and starting Spotify player
May 18 13:05:17 raspberrypi mopidy[547]: DEBUG    [MainThread] mopidy.audio.gst Got STATE_CHANGED bus message: old=GST_STATE_NULL new=GST_STATE_READY pending=GST_STATE_
May 18 13:05:17 raspberrypi mopidy[547]: DEBUG    [Audio-2] mopidy.audio.gst Sending TAG event for track 'spotify:track:0mWXrr6HQZUhCQG4JMkT2e': 'taglist, artist=(strin
May 18 13:05:17 raspberrypi mopidy[547]: * failed to open vchiq instance
May 18 13:05:17 raspberrypi systemd[1]: mopidy.service: Main process exited, code=exited, status=255/EXCEPTION
May 18 13:05:17 raspberrypi systemd[1]: mopidy.service: Failed with result 'exit-code'.

I think I’ve got that resolved from other parts of the forum. No sound but it’s playing! I’m gonna try to work it out myself and will only send up the kingosticks signal if absolutely necessary. Thanks again!

The default MPD port is 6600, not 6680. 6680 is the default port for Mopidy-HTTP.

Also, just so my post might be clearer maybe, we use mpd (lowercase) when talking about the software mpd. We use MPD (uppercase) when talking about the protocol. Both mpd and Mopidy-MPD use the protocol MPD to talk to MPD clients on default port 6600.

This used to come up if you haven’t joined the video group, might not be relevant though.

From the docs;

If you used the Raspbian Desktop image you will need to add the mopidy user to the video group:

sudo adduser mopidy video

I saw your post about that and it worked like a charm. We’re officially good to go. Appreciate all the help!