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 (101) Trackbacks (1)
  1. hi, thanks for the app, but i don’t know why it isn’t working.

    instructions in question 4 helped a lot, but now i enter my servify folder’s location and my details (user pass and port – i don’t know what to enter for bitrate or if i have to enter anything at all… so i just leave bitrate debug as they are) and i think this is all done correctly because now i get this line after pressing enter:
    >

    entered my ip correctly into respot on phone and same local port, however error is could not connect to servify.

    thanks in advance 😀

    Elliott

  2. Bitrate can be either 160 or 320. So soemthing like this:

    mono Servify.exe username password 1337 320 debug

  3. Hi!

    Great app! But how can i make it start and log in when my computer boots? So i dont have to start it and log in every time..

  4. I’ve updated the FAQ.

  5. I have character “ä” on my username and mono is complaining about MONO_EXTERNAL_ENCODINGS. How to use character ä on .sh script?

  6. Getting 406 even though I have Premium.

    Latest Android and OSX.

  7. not sure how to get it working in a .sh script with other charsets.

  8. metz: 406 is returned from libspotify. you will have to contact spotify in order to see why libspotify applications is not working for you. have you tried other libspotify based applications?
    also please make sure you do not have a “unlimited” spotify account.

  9. Hello, I use mac os x leopard on powermac (powerpc).

    I unzipped servify, installed Monoframework , even installed http://connect.creativelabs.com/openal/Downloads/OpenAL_Installer_OSX.dmg.

    I can start it log in etc, after that i get lost of error messages , see below. Can anybody help me out with this.

    When i try to connect with respot i get Could not connect to Servify, i/ exception

    Thanks Douwe
    email:duckstad@hotmail.com

    artsciences-power-mac-g5:~ artscience$ mono /Applications/servify/servify.exe

    Servify/C# v2011.01.23

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

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

    Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for OpenTK.Audio.AudioContext —> System.TypeInitializationException: An exception was thrown by the type initializer for OpenTK.Audio.AudioDeviceEnumerator —> System.ExecutionEngineException: SIGILL
    at (wrapper managed-to-native) OpenTK.Audio.OpenAL.Alc:OpenDevice (string)
    at OpenTK.Audio.AudioDeviceEnumerator..cctor () [0x00000] in :0
    — End of inner exception stack trace —
    at OpenTK.Audio.AudioContext..cctor () [0x00000] in :0
    — End of inner exception stack trace —
    at Servify.AudioPlayer.OpenALPlayer..ctor () [0x00000] in :0
    at Servify.AudioPlayer.Player.CreatePlayer () [0x00000] in :0
    at Servify.MainClass.Main (System.String[] args) [0x00000] in :0
    in :0
    — End of inner exception stack trace —
    at OpenTK.Audio.AudioContext..cctor () [0x00000] in :0
    — End of inner exception stack trace —
    at Servify.AudioPlayer.OpenALPlayer..ctor () [0x00000] in :0
    at Servify.AudioPlayer.Player.CreatePlayer () [0x00000] in :0
    at Servify.MainClass.Main (System.String[] args) [0x00000] in :0

    Please help me

  10. Update to my earlier post

    I used another port while setting up 17500 ipv 1337.

    I got still the same error messages, see below.

    However i can log in with respot, when i am logged in with respot i however see no data

    Hope you can help !

    Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for OpenTK.Audio.AudioContext —> System.TypeInitializationException: An exception was thrown by the type initializer for OpenTK.Audio.AudioDeviceEnumerator —> System.ExecutionEngineException: SIGILL
    at (wrapper managed-to-native) OpenTK.Audio.OpenAL.Alc:OpenDevice (string)
    at OpenTK.Audio.AudioDeviceEnumerator..cctor () [0x00000] in :0
    — End of inner exception stack trace —
    at OpenTK.Audio.AudioContext..cctor () [0x00000] in :0
    — End of inner exception stack trace —
    at Servify.AudioPlayer.OpenALPlayer..ctor () [0x00000] in :0
    at Servify.AudioPlayer.Player.CreatePlayer () [0x00000] in :0
    at Servify.MainClass.Main (System.String[] args) [0x00000] in :0

  11. MONO_EXTERNAL_ENCODINGS problem solved. I just created a new .sh file in shell text editor and now it’s working fine.

  12. This is what I get in Lion. Apparently it can’t get my local IP. There is no output in Console.app giving leads to why. Is there a way to manually feed the address to it? Or tell it to ignore it – I guess it’s only there to print in the output anyway?

    Servify/C# v2011.01.23

    Servify Server listening on port: ‘5601’

    Unhandled Exception: System.Net.Sockets.SocketException: No such host is known
    at System.Net.Dns.hostent_to_IPHostEntry (System.String h_name, System.String[] h_aliases, System.String[] h_addrlist) [0x00000] in :0
    at System.Net.Dns.GetHostByName (System.String hostName) [0x00000] in :0
    at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) [0x00000] in :0
    at Servify.NetworkInfo.GetLocalIP () [0x00000] in :0
    at Servify.MainClass.PrintLocalIP () [0x00000] in :0
    at Servify.MainClass.Main (System.String[] args) [0x00000] in :0

  13. I will need to investigate further!

    The “System.Net.Dns.GetHostByName()” has been only for “cosmetic” purposes and the “discovery” function, so I should be able to disable it. I will have to investigate. Please contact me by email, that way I can create a custom build and we can debug the issue further (i have no access to OS X!)

  14. hello johannes: thanks for such a great program. It works great except that when on the Search screen, when you hold thown an item and choose “Browse Album” or “Browse Artist” it does nothing. What could it be? Thanks again!

  15. Wow, greate app! Just got my boxee and this was what was missing. If I could just get it working.

    It starts good and I get connected but then I get:

    Logging on to Spotify servers…
    Cache path: C:\Users\xxx\AppData\Roaming\libspotify-cache
    Settings path: C:\Users\xxx\AppData\Roaming\libspotify-settings
    Libspotify log: 08:01:12.462 I [ap:1368] Connecting to AP A1.spotify.com:4070
    Waiting for broadcast
    Login result from spotify: OK
    Client connected to server.
    Could not unqueue data: InvalidValue
    Libspotify log: 08:02:19.691 I [file_picker.cpp:88] File picker: track=29afaa04e
    abd4c28ac6ca40876df00fa, file=6f5b76b0b691b15bce8d7e048dcbbfa79159f4a2, bitrate=
    320000, max=320000, target=320000, num=3
    Libspotify log: 08:02:19.955 I [file_streamer_simple.cpp:757] Request for file 6
    f5b76b0b691b15bce8d7e048dcbbfa79159f4a2 complete (code: 0)
    Libspotify log: 08:02:20.200 I [file_streamer_simple.cpp:757] Request for file 6
    f5b76b0b691b15bce8d7e048dcbbfa79159f4a2 complete (code: 0)
    Libspotify log: 08:02:31.818 I [file_streamer_simple.cpp:757] Request for file 6
    f5b76b0b691b15bce8d7e048dcbbfa79159f4a2 complete (code: 0)

    Thx for any help in advance

    Running Win 7 as servify
    with D-Link Boxee as client

  16. Add to previous post…. I get no sound… even that I can c data stored in:
    C:\Users\xxx\AppData\Roaming\libspotify-cache

  17. I’m installing the Windows version of Servify using WINE and I’m getting the following issue:

    When I run servify.exe, it prompts me for my Username first, and after I hit enter it starts running before I get a chance to enter my Password and other info.
    “Thread 00000000 may have been prematurely finalized”

  18. Awesome app, fitting perfectly to my one-linux-to-control-them-all setup at home. Quick question. Would you take a feature-request ? Since I dabble in almost any code myself, including android-flavored java, I would really like to have a onTouch highlight when touching a listView item in the lists. Just some green background or what-have-you, but It would be really nice to see the item one selected. Small fix, great feature I think.

    Again, awesome work.

    Cheers
    //Stefan

  19. Nate: I would recommend using mono.
    WINE may or may not work…

  20. Andreas: Everything looks alright.. Has the problem persisted? Tried rebooting?

  21. Pere: I’ll have a look.

  22. Stefan: thanks!
    The issue with the android gui is really that i’m not a graphical tools guru… but ill look into adding a highlight feature, think it got dropped in one of the UI re-vamps..

  23. If you need help with the code for the highlight or anything, just drop me an email

    //Stefan

  24. Hi,

    I have installed Mono and unzipped servify. Trying to run servify from Terminal in OSX, I get this response:

    Ketils-musikkMac:servify ketiloppedal$ mono Servify.exe

    Servify/C# v2011.01.23

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

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

    Logging on to Spotify servers…
    Cache path: /Users/ketiloppedal/.config/libspotify-cache
    Settings path: /Users/ketiloppedal/.config/libspotify-settings
    dyld: lazy symbol binding failed: Symbol not found: ___bzero
    Referenced from: /Users/ketiloppedal/Downloads/servify/libspotify
    Expected in: /usr/lib/libSystem.B.dylib

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

    Trace/BPT trap
    Ketils-musikkMac:servify ketiloppedal$

    I cannot get it to work. Can you help me out?

    Best regards,

    Ketil

  25. Ketil, I have added a new question in the Mac OS X. Unfortunately the answer is that I have not been able to resolve this issue. It seems to be happening to older versions of OS X. Much likely an incompatible 3rd party library or even missing library on the older distributions.

  26. All is working except to start a song?

  27. p: that seems weird.. are there exceptions being printed in Servify? for quicker replies you can email me at johannes AT h3x.se…

  28. Great app! I got servify working under Voyage Linux on a Alix board for a minimal setup. I use my Desire-S with respot as a remote. The response is fast and all functions seem to work!

    Any change of a iPad version of Respot in the feature for some more screen space?

  29. I do not know if the ios version of respot will be released.
    Glad you like respot and that it is working with your setup!

    Do you have more details and maybe even pictures of your server setup? Would be interesting to see!

  30. It’s a headless Alix 3D3 board (on board audio) connected to an amp. Voyage Linux and Servify run of a 4GB compact-flash. I don’t have any pictures but if you Google it you will find some examples. I really like the small form factor and low power of this setup and it’s cheap to ;). I use to run Mopidy on this system but for some reason the response between server and client was very slow. Servify with Respot and SWUIJify works very fast.

    I now also got SWUIJify running on the server and can use that for control from my iPad beside my Desire-S with Respot. Still would be nice to have a native iPad app…

  31. I can’t wait to try this app, but I am continuously getting a 401 error. I’m wondering if it’s because I used Facebook credentials to signup for Spotify and not a Spotify username?

  32. Thad: I dont know. Does your username or password contain “special” characters? Which OS are you using?

  33. John: cool thing.. maybe i’ll get one to play around with! :)

  34. Windows 7. The only special character (maybe) is “@” since the username is my email address. Sorry I was so vague before.

  35. Thanks for this, works great on my Mac!
    Do you have any plans to add folders? I use them quite a lot to play a mix of playlists.
    Thanks again!

  36. Thad: ok. so the “@”, may be the culprit. I think there’s a bug with the windows commandline input (windows uses some weird codepage and it doesnt always convert characters correctly to UTF). Please contact me by email and we can work to sort this out.

  37. Ian: there’s a need to update servify to a newer version of libspotify (which then allows folders, local files etc). there’s no roadmap/timeline for this however, i would like to do it – but other things are competing for my time.

  38. Johannes: Thanks for the response. Do you have any plans to open up some of the source code so some of us could help out?

  39. We may indeed open it under a GPL license.

  40. please help! thanks!
    unable to use (osx, 10.6.8, macmini):

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

    Logging on to Spotify servers…
    Cache path: /Users/admin/.config/libspotify-cache
    Settings path: /Users/admin/.config/libspotify-settings

    Exception caught in Login
    Exception Type : System.TypeInitializationException
    Exception Message: An exception was thrown by the type initializer for System.Drawing.GDIPlus
    Exception Stack : at System.Drawing.Imaging.ImageCodecInfo.GetImageEncoders () [0x00000] in :0
    at Servify.OnImageLoadedHandler.FindJpegImageCodec () [0x00000] in :0
    at Servify.OnImageLoadedHandler..ctor (Brodcaster broadcaster) [0x00000] in :0
    at Servify.ServifyServer.Login () [0x00000] in :0

    Servify failed to login – terminating application. Above stacktrace can be submitted to support@h3x.se in order to debug.
    gardner:servify admin$

  41. Hi – on runing the repot app (HTC wildfire)- i get the prompt to “discover” this sends broad cast messages that show on servify (windows)- i have mulitple “discovery” broadcasts then a final message “unable to save file metadata.bnk” . If I try and connect instead of discover – i cannot connect to servify due to i/o exception

    any ideas how this is resolved?? I am using the servify default settings listen port 1337 and bitrate 320

    many thanks in advance

  42. Adrian, the UI with the discovery is a bit wonky.. When you click discovery, does it populate a list with IP addresses? If so – click on of the items in the list… The UI for this piece should really be updated.

  43. Thanks Johannes – just updated the IP showing on the phone to the one showing in servify window and all is working fine. many thanks!!

  44. Hi

    I have installed this on xp mediacenter 2005. I have installed Servify and it gets inputs from the android app Respot. But when i add songs to que it does not appear in spotify and i can not start or control music when playing music on spotify on the pc.
    I have installed the newest spotify and you download for Servify and respot. I have restarted the pc.

  45. Sitdown: not necessary to use the official spotify.client with Servify. But anyhow – from your stacktrace it seems as if you have not installed “OpenAL”. A link to the OpenAL library is provided from install & download page here on h3x.se

    Let me know how it goes. good luck

  46. Ok, lol. Embarressd.. I can not read. Mayby its because of fast reading technics, because of using computers a lot..

    Working good now, thanks a lot.

    I have tried unified remote before, paid version. It lacks this feature and i asked in theire forum about theese features. But it was deleted as spam.. I contacted them through support mail, no answer. Just want to warn everybody about them..

  47. I get the following error when I try to connect on my mac:

    Servify/C# v2011.01.23

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

    Logging on to Spotify servers…
    Cache path: /Users/bt/.config/libspotify-cache
    Settings path: /Users/bt/.config/libspotify-settings
    Waiting for broadcast
    Libspotify log: 18:55:43.433 I [ap:1368] Connecting to AP A4.spotify.com:4070
    Login result from spotify: OK
    Libspotify log: 18:55:53.799 E [xml_sax_parser_expat.cpp:75] no element found at line 152, column 4
    Libspotify log: 18:56:01.800 E [xml_sax_parser_expat.cpp:75] no element found at line 152, column 4
    Libspotify log: 18:56:17.951 E [xml_sax_parser_expat.cpp:75] no element found at line 152, column 4
    Libspotify log: 18:56:49.913 E [xml_sax_parser_expat.cpp:75] no element found at line 152, column 4

  48. Ben: Those are libspotify internal errors. Please let me know how these affect the client? (Ie: can you see your playlists at all etc?).
    I have not seen these before. Please contact me by mail: johannes{AT}h3x.se

  49. Sitdown; happens to all of us every now and then 😉 Hope you’ll enjoy respot.


Leave a comment