h3x.se spotify remote

Support

If your question is not covered below post a comment here on h3x.se, or contact me: johannes [@.@] h3x.se

General Issues

These apply to all OS's (windows-linux-osx)

Q: Help, getting password error. I have a facebook login!

A: You will need a device login, see this page on how to get one: https://sonos.custhelp.com/cgi-bin/sonos.cfg/php/enduser/std_adp.php?p_faqid=1166

Q: Help I'm getting "Connection Error: XYZ"!

401: wrong Username/password

These are connectivity/firewall related - can also be that the Spotify servers are unstable / having issues - try again in a couple of hours.
116: unable to contact spotify servers (Have you allowed servify to bypass your firewall?)
117: unable to contact spotify servers (Have you allowed servify to bypass your firewall?)
405: unable to contact spotify servers (Have you allowed servify to bypass your firewall?)
406: a Spotify Premium account is required to use libspotify. Spotify error codes
409: a Spotify Premium account is required to use libspotify. Spotify error codes

Q: Do you need Spotify premium or other Spotify products you have to pay a monthly fee for this to work?

A: Yes. Libspotify requires a Spotify Premium account.

Q:Could not connect to Servify, i/o exception - chosen connection may be unavailable

A: This can be due to a host of reasons. A few steps to debug is as follows; (most likely cycling your WiFi connectivity will resolve the issue).
x) Make sure you have tried connecting to all of the IP adresses listed in the Servify window, while being connected to the local network!
x) I'd suggest turning off/on the WiFi on the android device and then try again. Sometimes the WiFi-radio icon is on even though your device has been de-registered from the access point (the router).
x) Try surfing to servify from another computer on your network, http://IP:PORT , where ip/port is what servify is using. If you dont have another computer you can download ConnecBot and open a 'telnet' session to servify.
x) Open access to servify from the Internet - then use your 2g/3g internet access to try to connect to servify

Q: What is the listen_port / local_port?

A: The listen port is a port you yourself set when starting Servify. This is later the port which ReSpot will connect to, valid values are usually between 1100 to 65000.
In ReSpot you would then connect to the IP of the computer running Servify and on port 1111

Q: How do I autostart servify? (assuming windows here - but it would be fairly similar on osx/linux)

A: That’s what I do, I have a .bat with the full parameters in autostart (for anyone who doesn’t know how to do this in win – open notepad and input “servify path\servify.exe usr psw port bitrate” then save the file as file_name.bat and include it in your autostart folder. E.g. c:\servify\servify.exe user password 1337 320) – means servify is launched on start up and you won’t have to input user details each time. Even if you don’t want it to autostart, you can use the .bat as a shortcut or “config file” of sorts.
Thanks to wb for the long explanation!

Windows Issues

Update to the latest .NET framework, typically done via Windows Update.

Q:I'm getting "HRESULT: 0x800703E6 invalid access to memory location

A: Solved with libspotify v10. Download a new version of Servify (clear your browser cache before, otherwise you may be re-downloading an old version)

Linux Issues

Q: I get this libasound error: Unhandled Exception: System.DllNotFoundException: libasound

A: the solution is to do the following (assuming ubuntu at least):

sudo ln -s /usr/lib/libasound.so.2 /usr/lib/libasound.so

Q: Getting alot of: ALSA write error code 127. AlsaPlayer bailing out. What do I do?

A: User supplied solution (Thanks Lammert!):
fixed it by adding the following lines to /etc/asound.conf

pcm.!default {
type pulse
}

ctl.!default {
type pulse
}

pcm.pulse {
type pulse
}

ctl.pulse {
type pulse
}

Also see: https://wiki.ubuntu.com/PulseAudio

Q:Help, I'm using Linux and there's no sound!?

A: This may be due to MONO hogging OSS. Please try starting Servify/C# with: "padsp Servify.exe username password localport bitrate debug"
Update: see other entry in the FAQ below.
If this does not help - please let me know!

Q: Getting NewtonSoft.Json.Net.dll error (ubuntu 10.10)


** (./Servify.exe:2746): WARNING **: The following assembly referenced

from /path/to/servify/Newtonsoft.Json.Net20.dll could not
be loaded:
Assembly: System.Data (assemblyref_index=1)
Version: 2.0.0.0
Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed
in the MONO_PATH environment variable, or in the location of the
executing assembly (/path/to/servify/).

A: install the 'libmono-system-data2.0-cil' package and this issue should go away. Something changed between ubuntu 10.4 and 10.10 with the default mono installation, so required dependencies are no longer installed by default in ubuntu.

Mac OS X Issues

Q: I'm using Mac OS X and can't get this to work!

A:
x) Install "MONO", download and install Mono Runtime from: the mono webpage
x) make sure you're starting Servify from the directory it's unpacked in! ie:
"cd /Location/where/servify/is_unpacked"; "mono Servify.exe user pass port bitrate"
Still having issues? Drop me a mail / comment / irc msg.

Q: dyld: lazy symbol binding failed: Symbol not found: ___bzero

A: I have not found a solution to this issue. Seems to happen on older OS X versions.

Q: An exception was thrown by the type initializer for System.Drawing.GDIPlus

A: See this page: http://www.mono-project.com/FAQ:_Winforms#GDIPlus_Initializer_Exception (need to install libgdiplus)

Comments () Trackbacks (0)
  1. Sitdown; happens to all of us every now and then 😉 Hope you’ll enjoy respot.

  2. I will and am 🙂

  3. Hi!

    Great app, just got it working under Ubuntu. But I want to let you know that search does not work with Swedish characters such as åäö, there are no hits.

    regards
    Per

  4. i cant login, keep getting:

    Exception caught in Login
    Exception Type : System.DllNotFoundException
    Exception Message: Unable to load DLL ‘libspotify’: Invalid access to memory loc
    ation. (Exception from HRESULT: 0x800703E6)
    Exception Stack : at Spotify.libspotify.sp_session_init(sp_session_config& c
    onfig, IntPtr& sessionPtr)
    at Spotify.Session. .ctor(Byte[] applicationKey, String cacheLocation, String
    settingsLocation, String userAgent)
    at Spotify.Session.CreateInstance(Byte[] applicationKey, String cacheLocation
    , String settingsLocation, String userAgent)
    at Servify.ServifyServer.Login()

    any help would be appreciated

  5. Kyle: this one is covered in the FAQ. Unfortunately there is currently no solution for it. Check back in a couple of weeks though. I might change c# library that will solve this issue.

  6. Hi,

    First, thanks for the great work. Now I can finally listen to spotify from our Mythtv box (mythbuntu lucid + updates x86_64). I’m running the latest version, downloaded yesterday, with the current libspotify, libopenal1 1.12.854-0ubuntu1, and libmono-wcf3.0-cil, libmono-system-data2.0-cil and mono 2.10. My proble is that Servify, once started, seems to lock up alsa so that nothing else can use it. I haven’t found a way round it yet apart from a complete system restart with servify commented out of my startup scripts. I’ve had mythtv set to use ALSA:default but now I’m getting ALSA:default is invalid or not usable. Do you have any ideas?

    I do have a problem with

  7. First off… that should not happen 🙂
    I have not myself used the latest servify with OpenAL on linux that much. But with the older Alsa implementation you could wrap the process in “padsp” (assumes you have PulseAudio, which mythbuntu may/may not have) .. Try that perhaps?
    I dont think that OpenAL should be locking up ALSA.

  8. Hmm. Don’t have pulse installed on that machine and don’t really want to have the hassle of configuring MythTV to use it. Are ther any logs I could send you to help identify the problem?

  9. Marius: dont know of any specific log to look at for this… you are certain it is servify gaining exclusive access? (no other sound app works? or just myth?)

  10. Hei!

    Har installert Servify og oalinst på min PC med windows XP. Alt ser bra ut, får bekrefet OK ved opstart av servify!
    Har videre installert cilenten på min Samsung Galaxy S2, også det ser bra ut.

    Når jeg prøver å koble meg opp med Samsungen så får jeg opp bare menyen!
    Dvs. Search, Browser, Playback og PlayQ!

    Hva er galt??
    Har prøv å se etter servicen på PC’en, men ser ingen!? Dette er vel en service som må gå på PC’en?

    Øyvind

  11. I can’t make it work on mac…

  12. Öyvind; a bit unclear to me what is not working. “Servify” (the process on your PC) should play the sound. The client application controls it.

  13. Lars: A bit thin on information to give you any kind of advice.
    Servify does not work on all Mac OS X builds. And definitely not on the PPC arch.

  14. Hi,
    Get error mesage when starting servify.
    seems alright until,
    libspotify log xml_sax_parser….. no elements found at line ……

    any idea?

    Br, Mats

  15. Mats, contact me by email for a faster resolution.
    Would need to know a lot more as well. Does it play sound at all, can you browse songs in respot? typically whatever is prefixed with “libspotify” in the servify logs are non-fatal errors or updates (of little to no consequence).

  16. Hej,

    It sounds like I have the same problem as Öyvind. In the servify window it says:

    Could not execute command:
    System.NullReferenceException: Object reference not set to an instance of an object.
    at Spotify.Session.PlayerLoad
    at Servify.Command.TogglePauseCommand.ExecuteCommand
    at Servify.Command.JsonCommand.Execute
    at servify.ClientConnection.OnPayloadComplete

    Exception caught in OnPayloadComplete
    Exception Type: System.NullReferenceException
    Exception Message: Object reference not set to an instance of an object.
    Exception Stack: at Spotify.Session.PlayerLoad
    at Servify.Command.TogglePauseCommand.ExecuteCommand
    at Servify.Command.JsonCommand.Execute
    at servify.ClientConnection.OnPayloadComplete

    Would be nice if it would work =)

  17. Kristofer: could you please send me an email with the complete log? Also include OS. Thanks

  18. Hi, i did successfully setup this on a mac but theres one problem that i cant find any solution to. The app itself work as it should but the problem is that i have my iMac connected to my tv via HDMI and the sound do not come form the tv. I have tried to just manually set the sound to go out via HDMI but the app keeps playing the music on my computer :/.

    Do anyone have a clue whats wrong here, i dont!

  19. The last version (2012.1.23) can’t browse playlists

    Could not execute command:{“commandType”:”listPlaylists”}
    System.NullReferenceException: Object reference not set to an instance of an obj
    ect.
    at Servify.Command.ListPlaylistsCommand.ExecuteCommand()
    at Servify.Command.JsonCommand.Execute()
    at Servify.ClientConnection.OnPayloadComplete(StateObject state)

    Exception caught in OnPayloadComplete
    Exception Type : System.NullReferenceException
    Exception Message: Object reference not set to an instance of an object.
    Exception Stack : at Servify.Command.ListPlaylistsCommand.ExecuteCommand()
    at Servify.Command.JsonCommand.Execute()
    at Servify.ClientConnection.OnPayloadComplete(StateObject state)

    Don’t know if it is possible to help you with the source? Cause I don’t believe your source is shared anywhere 🙂 If you want you can contact me derekdhaas (followed by) gmail (then comes a dot) com (hopefully this will keep the spam bots out)

  20. Derek, do you have a complete log? Did servify say “login: OK”?

  21. The command line parameters aren’t working for me from my batch file on v2011.01.23

    My batch file is these two lines:

    cd “C:\Program Files (x86)\Servify\”
    Servify.exe user password 1337 320

    It launches the .exe as intended but it asks for my username and password even though I passed it as parameters.

  22. Bubba83; did you try to launch it interactively from the cmd-line? does that work?

  23. seems like i got everything up and running on Lion 10.7.2.
    and I got my android device to connect respot properly

    but i am not seeing any content, nor does the search function work…?

    the only thing i have in the way of logs is from servify …
    Servify/C# v2011.01.23

    Username: *****
    Password: *********
    Use defaults? [Y/n]: y

    Servify Server listening on port: ‘1337’
    Servify Server IP Address 0: 192.168.1.2

    Logging on to Spotify servers…
    Cache path: /Users/*****/.config/libspotify-cache
    Settings path: /Users/*****/.config/libspotify-settings
    Waiting for broadcast
    Libspotify log: 19:09:14.025 I [ap:1368] Connecting to AP A5.spotify.com:4070
    Libspotify log: 19:09:14.435 E [ap:3153] Connection error: 406

    Session disposed…

  24. Hi!
    Nice software! I have issues about two things though:
    1. Quite often when I enque a song to playlis, it show “N/A * N/A” in the playlist for that song. So for some reason it doesn’t get artist/song -information. No errors comes to Servify-log.
    2. When I put ReSpot into the background (aka I don’t close is with “Quit”), and open it again, the connection to the Servify has been closed. This means that nothing works (search doesn’t work, playlist doesn’t show etc..). I have to “Quit” ReSpot and start it again and connect. Then evrything works again.
    I’m running Servify in Win7 and ReSpot on HTC Desire S, latest versions.

  25. Matt, do you have a Spotify premium account?
    The spotify site says this about error 406:
    Error 406 and 409
    Please upgrade your subscription to Spotify Premium to access your account on this device.

  26. Ville,
    thanks..
    1) not sure why this started happening.. it’s basically libspotify that doesnt return any information.. possibly some underlying API change occurred when updating with newer libspotify version.. it’s definitely a bug in Servify though..
    2) yes.. i took away the “keep alive” packages..essentially what happens is that the phone goes to sleep and disconnects from the wifi… once you resume respot the connection is dead.. should be fixed in respot i agree.

  27. johannes,

    Yes, i have the premium account.
    I went through the password process and reset it on all devices -making sure everything works as normal, but still no access via servify/respot.

  28. wait…

    now it works!

    i had to kill some hanging processes in my shell and restart respot, but all of the sudden my stuff showed up and now i have full control.

    great work on the app. thank you so much!

  29. matt: ok, cool. glad you solved it!

  30. Hey there. I can’t get it to work, I get the “Could not connect to Servify, i/o exception – chosen connection may be unavailable” error message. Could it be because I get this message when I install via Terminal (my OS is 10.5.8):

    dyld: lazy symbol binding failed: Symbol not found: ___bzero
    Referenced from: /Applications/servify/libspotify
    Expected in: /usr/lib/libSystem.B.dylib

    dyld: Symbol not found: ___bzero
    Referenced from: /Applications/servify/libspotify
    Expected in: /usr/lib/libSystem.B.dylib

    Trace/BPT trap

  31. Rune,
    some OS X users have reported this issue. I unfortunately have no solution. From what I have witnessed it seems to happen mostly on older OS X versions.

  32. Ok, thanks for the answer. Seems like a great app.

  33. Dear Johannes,

    Is there a clear overview of how to make this app work? I don’t really get what to do in which order, to make my mobile phone (HTC desire) work as a remote controle for spotify, which is on my laptop. I do have a primium account.

    kind regards

    Henk

  34. Hi Johannes,

    Still verry happy with the Servify – ReSpot combo, I was wondering if gapless playback will be possible?

    John

  35. Seem to have the same problem as Derek. Servify says login ok, but when I try to connect with jrespot this output comes from servify:

    Could not execute command:{“commandType”:”listPlaylists”}
    System.NullReferenceException: Object reference not set to an instance of an obj
    ect.
    at Servify.Command.ListPlaylistsCommand.ExecuteCommand()
    at Servify.Command.JsonCommand.Execute()
    at Servify.ClientConnection.OnPayloadComplete(StateObject state)

    Exception caught in OnPayloadComplete
    Exception Type : System.NullReferenceException
    Exception Message: Object reference not set to an instance of an object.
    Exception Stack : at Servify.Command.ListPlaylistsCommand.ExecuteCommand()
    at Servify.Command.JsonCommand.Execute()
    at Servify.ClientConnection.OnPayloadComplete(StateObject state)

  36. John: I’m sure it is possible, but right now I am not investing much / any time in continued improvements in servify/respot. sorry.

  37. I have same problem as Bubba83 to get bat file working in Windows NT, however running in Linux then it works.??

    “The command line parameters aren’t working for me from my batch file on v2011.01.23

    My batch file is these two lines:

    cd “C:\Program Files (x86)\Servify\”
    Servify.exe user password 1337 320

    It launches the .exe as intended but it asks for my username and password even though I passed it as parameters.”

  38. Should be Wimdows XP in comment above.

    By the way, thanks for a great app!!

  39. P-G: sorry, cant help you with the .bat file. I’m no longer on windows.. When not doing it in a .bat file i guess it works as intended right?

  40. P-G your problem is that you have split the bat into two lines.
    It should not be necessary, try it on a single line
    “C:\Program Files (x86)\Servify\Servify.exe” user password 1337 320
    Works for me every time. No need to overcomplicate things 🙂

    That said, I have a question of my own. more a curiosity really.
    When I play any tune on respot in XP I get the song progress.
    When I do the same from Win 7 I do not see the progress.

    What can possibly cause this?
    Until now I simply assumed the progress was not reported to the app and left it at that, but now I tried it on XP and I get the progress there.
    Weird.

    Still very happy with respot

  41. Bat file acting up here too. Seems even when i tyoe the stuff in at command line using the .exe, it wont take the username, only the password.

    It then asks me for account, if i type it in, and then dont type the password, it logs in with the pwd frpm the command line… Wierd…

  42. Rune: that is indeed weird.. Dont know why that would happen!

  43. Is it possible for you to release a ARMv6-compatible version of Servify?

  44. Hi

    Any solution for the :
    “Could not execute command:{“commandType”:”listPlaylists”}”

    Gisle

  45. Hi

    When I login, I get the following message:
    Exception caught in Session.Login(), Exception message: Spotify.SpotifyException: libspotify error: 269381912
    at Spotify.Session.LogIn(String username, String password)
    Libspotify log: 12:21:18.312 I [ap:1766] Connecting to AP A4.spotify.com:4070
    Login result from spotify: OK

    Any idea?

  46. Hi, since the latest release of servify, the command-line parameters aren’t working. It always asks for a username/password etc. Parameters are simply ignored. Please fix this.

    I always run a batch file from a scheduled task in Windows. Works like a charm. I’ve overwritten the servify files with the latest release, and now I cannot connect because the parameters aren’t working. This has nothing to do with Windows 7/XP or Admin rights.
    The old version works with parameters, the new one doesn’t. Must be a .NET issue. Keep in mind that I’m using the latest .NET 4.0.

  47. Hey, I love the idea. But I’m having some issues getting it workign.

    Using Win7x
    Installed OpenAL
    Extracted Servify files to disk.
    Started the exe
    However, I’m getting al kind of nasty errors in the console if I click on any buttons in (j)ReSpot

    Exception caught in OnPayloadComplete
    Exception Type : System.NullReferenceException
    Exception Message: Object reference not set to an instance of an object.
    Exception Stack : at Servify.Command.ListPlaylistsCommand.ExecuteCommand()
    at Servify.Command.JsonCommand.Execute()
    at Servify.ClientConnection.OnPayloadComplete(StateObject state)

  48. Hi,

    Same problem as Fraeco, Gisle , Heljar and Derek.

    “Exception Stack : at Servify.Command.ListPlaylistsCommand.ExecuteCommand()”

    Great initiative but unfortunately it is not much of use if the playlists arent visible..
    Will there be a fix for this issue soon?

    /Fredrik

  49. Fredde, sorry – im not working on this project any longer. With the latest ubuntu update, something in the mono package broke servify.
    If i do start working on this again, it’d be a pure C implementation – Mono is just to fragile.

  50. If you arent working on it anymore, can you post the source so that others can?


Leave a comment

No trackbacks yet.